From 7828caa2efcca03f80e5e169791d82caf7dd7888 Mon Sep 17 00:00:00 2001 From: authentik-bot Date: Sat, 1 Apr 2023 15:46:40 +0000 Subject: [PATCH] Update API Client --- .openapi-generator/FILES | 42 +- .openapi-generator/VERSION | 2 +- README.md | 13 - api/openapi.yaml | 1501 +++++++++------- api_admin.go | 60 +- api_authenticators.go | 566 +++--- api_core.go | 624 ++++--- api_crypto.go | 95 +- api_events.go | 310 ++-- api_flows.go | 275 +-- api_managed.go | 80 +- api_oauth2.go | 128 +- api_outposts.go | 376 ++-- api_policies.go | 658 ++++--- api_propertymappings.go | 403 +++-- api_providers.go | 607 ++++--- api_root.go | 8 +- api_schema.go | 12 +- api_sources.go | 745 ++++---- api_stages.go | 1552 ++++++++++------- client.go | 200 ++- configuration.go | 16 +- docs/AdminApi.md | 20 +- docs/Application.md | 10 +- docs/ApplicationProviderObj.md | 281 --- docs/AuthenticatorTOTPStage.md | 14 +- docs/AuthenticatorTOTPStageRequest.md | 14 +- docs/AuthenticatorValidateStage.md | 12 +- docs/AuthenticatorValidateStageRequest.md | 12 +- docs/AuthenticatorsApi.md | 144 +- docs/BlueprintFile.md | 10 +- docs/BlueprintFileMeta.md | 72 - docs/BlueprintInstance.md | 14 +- docs/CoreApi.md | 146 +- docs/CryptoApi.md | 22 +- docs/CurrentTenant.md | 14 +- docs/EventMatcherPolicy.md | 24 +- docs/EventMatcherPolicyRequest.md | 24 +- docs/EventsApi.md | 72 +- docs/Flow.md | 38 +- docs/FlowInspectorPlan.md | 18 +- docs/FlowInspectorPlanCurrentStage.md | 270 --- docs/FlowRequest.md | 38 +- docs/FlowSet.md | 26 +- docs/FlowSetRequest.md | 26 +- docs/FlowStageBinding.md | 22 +- docs/FlowStageBindingRequest.md | 12 +- docs/FlowStageBindingStageObj.md | 182 -- docs/FlowsApi.md | 64 +- docs/Invitation.md | 18 +- docs/InvitationCreatedBy.md | 228 --- docs/InvitationFlowObj.md | 421 ----- docs/LDAPSource.md | 12 +- docs/LDAPSourceRequest.md | 12 +- docs/ManagedApi.md | 20 +- docs/Notification.md | 14 +- docs/NotificationRule.md | 22 +- docs/NotificationRuleGroupObj.md | 249 --- docs/NotificationRuleRequest.md | 12 +- docs/OAuth2Provider.md | 36 +- docs/OAuth2ProviderRequest.md | 36 +- docs/OAuthSource.md | 22 +- docs/OAuthSourceRequest.md | 12 +- docs/OAuthSourceType.md | 217 --- docs/Oauth2Api.md | 30 +- docs/Outpost.md | 10 +- docs/OutpostServiceConnectionObj.md | 182 -- docs/OutpostsApi.md | 78 +- docs/PatchedAuthenticatorTOTPStageRequest.md | 12 +- ...atchedAuthenticatorValidateStageRequest.md | 12 +- docs/PatchedEventMatcherPolicyRequest.md | 24 +- docs/PatchedFlowRequest.md | 36 +- docs/PatchedFlowStageBindingRequest.md | 12 +- docs/PatchedLDAPSourceRequest.md | 12 +- docs/PatchedNotificationRuleRequest.md | 12 +- docs/PatchedOAuth2ProviderRequest.md | 36 +- docs/PatchedOAuthSourceRequest.md | 12 +- docs/PatchedPlexSourceRequest.md | 12 +- docs/PatchedProxyProviderRequest.md | 12 +- docs/PatchedSAMLProviderRequest.md | 12 +- docs/PatchedSAMLSourceRequest.md | 24 +- docs/PlexSource.md | 12 +- docs/PlexSourceConnection.md | 10 +- docs/PlexSourceConnectionSource.md | 425 ----- docs/PlexSourceRequest.md | 12 +- docs/PoliciesApi.md | 142 +- docs/PolicyBinding.md | 26 +- docs/PolicyBindingPolicyObj.md | 203 --- docs/PolicyBindingUserObj.md | 338 ---- docs/PropertymappingsApi.md | 94 +- docs/ProvidersApi.md | 122 +- docs/ProxyOutpostConfig.md | 22 +- docs/ProxyOutpostConfigOidcConfiguration.md | 261 --- docs/ProxyProvider.md | 12 +- docs/ProxyProviderRequest.md | 12 +- docs/RootApi.md | 2 +- docs/SAMLProvider.md | 12 +- docs/SAMLProviderRequest.md | 12 +- docs/SAMLSource.md | 24 +- docs/SAMLSourceRequest.md | 24 +- docs/SchemaApi.md | 2 +- docs/Source.md | 12 +- docs/SourceRequest.md | 12 +- docs/SourcesApi.md | 162 +- docs/StagesApi.md | 366 ++-- docs/Token.md | 10 +- docs/UserOAuthSourceConnection.md | 10 +- docs/UserSAMLSourceConnection.md | 10 +- docs/UserSourceConnection.md | 10 +- go.mod | 7 - go.sum | 404 ----- model_access_denied_challenge.go | 57 +- model_app.go | 19 +- model_apple_challenge_response_request.go | 21 +- model_apple_login_challenge.go | 57 +- model_application.go | 103 +- model_application_provider_obj.go | 430 ----- model_application_request.go | 71 +- model_authenticate_web_authn_stage.go | 65 +- model_authenticate_web_authn_stage_request.go | 45 +- model_authenticated_session.go | 61 +- model_authenticated_session_geo_ip.go | 31 +- model_authenticated_session_user_agent.go | 27 +- ...authenticated_session_user_agent_device.go | 23 +- model_authenticated_session_user_agent_os.go | 31 +- ...enticated_session_user_agent_user_agent.go | 27 +- model_authenticator_duo_challenge.go | 61 +- ...nticator_duo_challenge_response_request.go | 21 +- model_authenticator_duo_stage.go | 63 +- ...icator_duo_stage_device_import_response.go | 19 +- ..._duo_stage_manual_device_import_request.go | 19 +- model_authenticator_duo_stage_request.go | 55 +- model_authenticator_sms_challenge.go | 57 +- ...nticator_sms_challenge_response_request.go | 37 +- model_authenticator_sms_stage.go | 89 +- model_authenticator_sms_stage_request.go | 69 +- model_authenticator_static_challenge.go | 53 +- ...cator_static_challenge_response_request.go | 21 +- model_authenticator_static_stage.go | 55 +- model_authenticator_static_stage_request.go | 35 +- model_authenticator_totp_challenge.go | 53 +- ...ticator_totp_challenge_response_request.go | 25 +- model_authenticator_totp_stage.go | 67 +- model_authenticator_totp_stage_request.go | 47 +- model_authenticator_validate_stage.go | 111 +- model_authenticator_validate_stage_request.go | 91 +- model_authenticator_validation_challenge.go | 57 +- ...r_validation_challenge_response_request.go | 63 +- model_authenticator_web_authn_challenge.go | 55 +- ...or_web_authn_challenge_response_request.go | 27 +- ..._auto_submit_challenge_response_request.go | 21 +- model_autosubmit_challenge.go | 57 +- model_blueprint_file.go | 45 +- model_blueprint_file_meta.go | 136 -- model_blueprint_instance.go | 111 +- model_blueprint_instance_request.go | 51 +- model_cache.go | 15 +- model_captcha_challenge.go | 57 +- model_captcha_challenge_response_request.go | 25 +- model_captcha_stage.go | 65 +- model_captcha_stage_request.go | 49 +- model_certificate_data.go | 15 +- model_certificate_generation_request.go | 29 +- model_certificate_key_pair.go | 55 +- model_certificate_key_pair_request.go | 31 +- model_challenge_types.go | 94 +- model_config.go | 35 +- model_consent_challenge.go | 69 +- model_consent_challenge_response_request.go | 25 +- model_consent_stage.go | 61 +- model_consent_stage_request.go | 41 +- model_contextual_flow_info.go | 37 +- model_coordinate.go | 19 +- model_current_tenant.go | 127 +- model_deny_stage.go | 45 +- model_deny_stage_request.go | 25 +- model_device.go | 39 +- model_device_challenge.go | 25 +- model_device_challenge_request.go | 25 +- model_docker_service_connection.go | 53 +- model_docker_service_connection_request.go | 33 +- model_dummy_challenge.go | 41 +- model_dummy_challenge_response_request.go | 21 +- model_dummy_policy.go | 73 +- model_dummy_policy_request.go | 49 +- model_dummy_stage.go | 53 +- model_dummy_stage_request.go | 33 +- model_duo_device.go | 19 +- model_duo_device_enrollment_status.go | 15 +- model_duo_device_request.go | 15 +- model_email_challenge.go | 41 +- model_email_challenge_response_request.go | 21 +- model_email_stage.go | 141 +- model_email_stage_request.go | 129 +- model_error_detail.go | 19 +- model_error_reporting_config.go | 31 +- model_event.go | 69 +- model_event_matcher_policy.go | 127 +- model_event_matcher_policy_request.go | 103 +- model_event_request.go | 61 +- model_event_top_per_user.go | 25 +- model_expiring_base_grant_model.go | 41 +- model_expression_policy.go | 53 +- model_expression_policy_request.go | 29 +- model_file_path_request.go | 15 +- model_flow.go | 168 +- model_flow_challenge_response_request.go | 78 +- model_flow_diagram.go | 15 +- model_flow_error_challenge.go | 65 +- model_flow_import_result.go | 19 +- model_flow_inspection.go | 29 +- model_flow_inspector_plan.go | 51 +- model_flow_inspector_plan_current_stage.go | 410 ----- model_flow_request.go | 142 +- model_flow_set.go | 122 +- model_flow_set_request.go | 108 +- model_flow_stage_binding.go | 119 +- model_flow_stage_binding_request.go | 87 +- model_flow_stage_binding_stage_obj.go | 292 ---- model_footer_link.go | 19 +- model_generic_error.go | 25 +- model_group.go | 61 +- model_group_member.go | 57 +- model_group_member_request.go | 49 +- model_group_request.go | 45 +- model_identification_challenge.go | 95 +- ...entification_challenge_response_request.go | 27 +- model_identification_stage.go | 93 +- model_identification_stage_request.go | 73 +- model_invitation.go | 81 +- model_invitation_created_by.go | 353 ---- model_invitation_flow_obj.go | 610 ------- model_invitation_request.go | 45 +- model_invitation_stage.go | 53 +- model_invitation_stage_request.go | 33 +- model_kubernetes_service_connection.go | 63 +- ...l_kubernetes_service_connection_request.go | 43 +- model_ldap_debug.go | 23 +- model_ldap_outpost_config.go | 81 +- model_ldap_property_mapping.go | 47 +- model_ldap_property_mapping_request.go | 27 +- model_ldap_provider.go | 115 +- model_ldap_provider_request.go | 83 +- model_ldap_source.go | 231 ++- model_ldap_source_request.go | 215 ++- model_link.go | 15 +- model_login_challenge_types.go | 14 +- model_login_metrics.go | 23 +- model_login_source.go | 23 +- model_metadata.go | 21 +- model_notification.go | 69 +- model_notification_request.go | 29 +- model_notification_rule.go | 85 +- model_notification_rule_group_obj.go | 379 ---- model_notification_rule_request.go | 63 +- model_notification_transport.go | 51 +- model_notification_transport_request.go | 43 +- model_notification_transport_test_.go | 15 +- model_notification_webhook_mapping.go | 23 +- model_notification_webhook_mapping_request.go | 19 +- model_o_auth2_provider.go | 237 ++- model_o_auth2_provider_request.go | 211 +-- model_o_auth2_provider_setup_urls.go | 39 +- model_o_auth_device_code_challenge.go | 41 +- ..._device_code_challenge_response_request.go | 25 +- model_o_auth_device_code_finish_challenge.go | 41 +- ..._code_finish_challenge_response_request.go | 21 +- model_o_auth_source.go | 185 +- model_o_auth_source_request.go | 145 +- model_o_auth_source_type.go | 289 --- model_open_id_connect_configuration.go | 55 +- model_outpost.go | 65 +- model_outpost_default_config.go | 17 +- model_outpost_health.go | 43 +- model_outpost_request.go | 35 +- model_outpost_service_connection_obj.go | 293 ---- model_paginated_application_list.go | 19 +- ...l_paginated_application_list_pagination.go | 39 +- ...nated_authenticate_web_authn_stage_list.go | 19 +- model_paginated_authenticated_session_list.go | 19 +- ..._paginated_authenticator_duo_stage_list.go | 19 +- ..._paginated_authenticator_sms_stage_list.go | 19 +- ...ginated_authenticator_static_stage_list.go | 19 +- ...paginated_authenticator_totp_stage_list.go | 19 +- ...nated_authenticator_validate_stage_list.go | 19 +- model_paginated_blueprint_instance_list.go | 19 +- model_paginated_captcha_stage_list.go | 19 +- model_paginated_certificate_key_pair_list.go | 19 +- model_paginated_consent_stage_list.go | 19 +- model_paginated_deny_stage_list.go | 19 +- ...aginated_docker_service_connection_list.go | 19 +- model_paginated_dummy_policy_list.go | 19 +- model_paginated_dummy_stage_list.go | 19 +- model_paginated_duo_device_list.go | 19 +- model_paginated_email_stage_list.go | 19 +- model_paginated_event_list.go | 19 +- model_paginated_event_matcher_policy_list.go | 19 +- ...aginated_expiring_base_grant_model_list.go | 19 +- model_paginated_expression_policy_list.go | 19 +- model_paginated_flow_list.go | 19 +- model_paginated_flow_stage_binding_list.go | 19 +- model_paginated_group_list.go | 19 +- model_paginated_identification_stage_list.go | 19 +- model_paginated_invitation_list.go | 19 +- model_paginated_invitation_stage_list.go | 19 +- ...ated_kubernetes_service_connection_list.go | 19 +- model_paginated_ldap_outpost_config_list.go | 19 +- model_paginated_ldap_property_mapping_list.go | 19 +- model_paginated_ldap_provider_list.go | 19 +- model_paginated_ldap_source_list.go | 19 +- model_paginated_notification_list.go | 19 +- model_paginated_notification_rule_list.go | 19 +- ...l_paginated_notification_transport_list.go | 19 +- ...nated_notification_webhook_mapping_list.go | 19 +- model_paginated_o_auth2_provider_list.go | 19 +- model_paginated_o_auth_source_list.go | 19 +- model_paginated_outpost_list.go | 19 +- ...l_paginated_password_expiry_policy_list.go | 19 +- model_paginated_password_policy_list.go | 19 +- model_paginated_password_stage_list.go | 19 +- ...l_paginated_plex_source_connection_list.go | 19 +- model_paginated_plex_source_list.go | 19 +- model_paginated_policy_binding_list.go | 19 +- model_paginated_policy_list.go | 19 +- model_paginated_prompt_list.go | 19 +- model_paginated_prompt_stage_list.go | 19 +- model_paginated_property_mapping_list.go | 19 +- model_paginated_provider_list.go | 19 +- model_paginated_proxy_outpost_config_list.go | 19 +- model_paginated_proxy_provider_list.go | 19 +- model_paginated_radius_outpost_config_list.go | 19 +- model_paginated_radius_provider_list.go | 19 +- model_paginated_reputation_list.go | 19 +- model_paginated_reputation_policy_list.go | 19 +- model_paginated_saml_property_mapping_list.go | 19 +- model_paginated_saml_provider_list.go | 19 +- model_paginated_saml_source_list.go | 19 +- model_paginated_scim_mapping_list.go | 19 +- model_paginated_scim_provider_list.go | 19 +- model_paginated_scope_mapping_list.go | 19 +- model_paginated_service_connection_list.go | 19 +- model_paginated_sms_device_list.go | 19 +- model_paginated_source_list.go | 19 +- model_paginated_stage_list.go | 19 +- model_paginated_static_device_list.go | 19 +- model_paginated_tenant_list.go | 19 +- model_paginated_token_list.go | 19 +- model_paginated_token_model_list.go | 19 +- model_paginated_totp_device_list.go | 19 +- model_paginated_user_consent_list.go | 19 +- model_paginated_user_delete_stage_list.go | 19 +- model_paginated_user_list.go | 19 +- model_paginated_user_login_stage_list.go | 19 +- model_paginated_user_logout_stage_list.go | 19 +- ...ated_user_o_auth_source_connection_list.go | 19 +- ...inated_user_saml_source_connection_list.go | 19 +- ...l_paginated_user_source_connection_list.go | 19 +- model_paginated_user_write_stage_list.go | 19 +- model_paginated_web_authn_device_list.go | 19 +- model_password_challenge.go | 57 +- model_password_challenge_response_request.go | 25 +- model_password_expiry_policy.go | 61 +- model_password_expiry_policy_request.go | 37 +- model_password_policy.go | 153 +- model_password_policy_request.go | 129 +- model_password_stage.go | 59 +- model_password_stage_request.go | 39 +- model_patched_application_request.go | 79 +- ...ed_authenticate_web_authn_stage_request.go | 49 +- ...patched_authenticator_duo_stage_request.go | 71 +- ...patched_authenticator_sms_stage_request.go | 89 +- ...ched_authenticator_static_stage_request.go | 39 +- ...atched_authenticator_totp_stage_request.go | 64 +- ...ed_authenticator_validate_stage_request.go | 95 +- model_patched_blueprint_instance_request.go | 55 +- model_patched_captcha_stage_request.go | 61 +- model_patched_certificate_key_pair_request.go | 39 +- model_patched_consent_stage_request.go | 45 +- model_patched_deny_stage_request.go | 29 +- ...tched_docker_service_connection_request.go | 41 +- model_patched_dummy_policy_request.go | 53 +- model_patched_dummy_stage_request.go | 37 +- model_patched_duo_device_request.go | 21 +- model_patched_email_stage_request.go | 133 +- model_patched_event_matcher_policy_request.go | 107 +- model_patched_event_request.go | 69 +- model_patched_expression_policy_request.go | 37 +- model_patched_flow_request.go | 169 +- model_patched_flow_stage_binding_request.go | 99 +- model_patched_group_request.go | 49 +- model_patched_identification_stage_request.go | 77 +- model_patched_invitation_request.go | 49 +- model_patched_invitation_stage_request.go | 37 +- ...d_kubernetes_service_connection_request.go | 47 +- ...l_patched_ldap_property_mapping_request.go | 39 +- model_patched_ldap_provider_request.go | 91 +- model_patched_ldap_source_request.go | 231 ++- model_patched_notification_request.go | 29 +- model_patched_notification_rule_request.go | 67 +- ..._patched_notification_transport_request.go | 47 +- ...ed_notification_webhook_mapping_request.go | 29 +- model_patched_o_auth2_provider_request.go | 219 ++- model_patched_o_auth_source_request.go | 165 +- model_patched_outpost_request.go | 51 +- ..._patched_password_expiry_policy_request.go | 45 +- model_patched_password_policy_request.go | 133 +- model_patched_password_stage_request.go | 47 +- ..._patched_plex_source_connection_request.go | 29 +- model_patched_plex_source_request.go | 129 +- model_patched_policy_binding_request.go | 59 +- model_patched_prompt_request.go | 93 +- model_patched_prompt_stage_request.go | 45 +- model_patched_proxy_provider_request.go | 173 +- model_patched_radius_provider_request.go | 55 +- model_patched_reputation_policy_request.go | 53 +- ...l_patched_saml_property_mapping_request.go | 41 +- model_patched_saml_provider_request.go | 141 +- model_patched_saml_source_request.go | 203 +-- model_patched_scim_mapping_request.go | 31 +- model_patched_scim_provider_request.go | 63 +- model_patched_scope_mapping_request.go | 47 +- model_patched_sms_device_request.go | 21 +- model_patched_static_device_request.go | 21 +- model_patched_tenant_request.go | 85 +- model_patched_token_request.go | 63 +- model_patched_totp_device_request.go | 21 +- model_patched_user_delete_stage_request.go | 29 +- model_patched_user_login_stage_request.go | 53 +- model_patched_user_logout_stage_request.go | 29 +- ...d_user_o_auth_source_connection_request.go | 31 +- model_patched_user_request.go | 73 +- ...hed_user_saml_source_connection_request.go | 29 +- model_patched_user_write_stage_request.go | 55 +- model_patched_web_authn_device_request.go | 21 +- model_permission.go | 19 +- model_plex_authentication_challenge.go | 49 +- ...thentication_challenge_response_request.go | 21 +- model_plex_source.go | 143 +- model_plex_source_connection.go | 51 +- model_plex_source_connection_request.go | 19 +- model_plex_source_connection_source.go | 603 ------- model_plex_source_request.go | 117 +- model_plex_token_redeem_request.go | 15 +- model_policy.go | 49 +- model_policy_binding.go | 109 +- model_policy_binding_policy_obj.go | 323 ---- model_policy_binding_request.go | 51 +- model_policy_binding_user_obj.go | 504 ------ model_policy_request.go | 25 +- model_policy_test_request.go | 27 +- model_policy_test_result.go | 23 +- model_prompt.go | 81 +- model_prompt_challenge.go | 45 +- model_prompt_challenge_response_request.go | 21 +- model_prompt_request.go | 77 +- model_prompt_stage.go | 57 +- model_prompt_stage_request.go | 37 +- model_property_mapping.go | 43 +- model_property_mapping_preview.go | 17 +- model_property_mapping_test_result.go | 19 +- model_provider.go | 59 +- model_provider_request.go | 31 +- model_proxy_outpost_config.go | 195 +-- ...proxy_outpost_config_oidc_configuration.go | 397 ----- model_proxy_provider.go | 201 +-- model_proxy_provider_request.go | 161 +- model_radius_outpost_config.go | 45 +- model_radius_provider.go | 75 +- model_radius_provider_request.go | 47 +- model_redirect_challenge.go | 45 +- model_reputation.go | 51 +- model_reputation_policy.go | 73 +- model_reputation_policy_request.go | 49 +- model_saml_metadata.go | 19 +- model_saml_property_mapping.go | 49 +- model_saml_property_mapping_request.go | 29 +- model_saml_provider.go | 183 +- model_saml_provider_request.go | 129 +- model_saml_source.go | 213 +-- model_saml_source_request.go | 187 +- model_scim_mapping.go | 43 +- model_scim_mapping_request.go | 23 +- model_scim_provider.go | 79 +- model_scim_provider_request.go | 51 +- model_scope_mapping.go | 55 +- model_scope_mapping_request.go | 35 +- model_selectable_stage.go | 27 +- model_service_connection.go | 45 +- model_service_connection_request.go | 25 +- model_service_connection_state.go | 19 +- model_session_user.go | 25 +- model_shell_challenge.go | 45 +- model_sms_device.go | 23 +- model_sms_device_request.go | 15 +- model_source.go | 115 +- model_source_request.go | 89 +- model_source_type.go | 39 +- model_stage.go | 45 +- model_stage_prompt.go | 43 +- model_stage_request.go | 25 +- model_static_device.go | 23 +- model_static_device_request.go | 15 +- model_static_device_token.go | 15 +- model_static_device_token_request.go | 15 +- model_system.go | 43 +- model_system_runtime.go | 35 +- model_task.go | 35 +- model_tenant.go | 85 +- model_tenant_request.go | 81 +- model_token.go | 93 +- model_token_model.go | 53 +- model_token_request.go | 59 +- model_token_set_key_request.go | 15 +- model_token_view.go | 15 +- model_totp_device.go | 19 +- model_totp_device_request.go | 15 +- model_type_create.go | 27 +- model_used_by.go | 31 +- model_user.go | 81 +- model_user_account_request.go | 15 +- model_user_consent.go | 41 +- model_user_delete_stage.go | 45 +- model_user_delete_stage_request.go | 25 +- model_user_group.go | 49 +- model_user_group_request.go | 37 +- model_user_login_challenge.go | 49 +- ...l_user_login_challenge_response_request.go | 25 +- model_user_login_stage.go | 69 +- model_user_login_stage_request.go | 49 +- model_user_logout_stage.go | 45 +- model_user_logout_stage_request.go | 25 +- model_user_metrics.go | 23 +- model_user_o_auth_source_connection.go | 45 +- ...l_user_o_auth_source_connection_request.go | 23 +- model_user_password_set_request.go | 15 +- model_user_path.go | 15 +- model_user_request.go | 61 +- model_user_saml_source_connection.go | 45 +- model_user_saml_source_connection_request.go | 19 +- model_user_self.go | 59 +- model_user_self_groups.go | 19 +- model_user_service_account_request.go | 41 +- model_user_service_account_response.go | 37 +- model_user_setting.go | 41 +- model_user_source_connection.go | 45 +- model_user_write_stage.go | 71 +- model_user_write_stage_request.go | 51 +- model_validation_error.go | 29 +- model_version.go | 27 +- model_web_authn_device.go | 23 +- model_web_authn_device_request.go | 15 +- model_workers.go | 15 +- utils.go | 19 + 553 files changed, 17292 insertions(+), 23633 deletions(-) delete mode 100644 docs/ApplicationProviderObj.md delete mode 100644 docs/BlueprintFileMeta.md delete mode 100644 docs/FlowInspectorPlanCurrentStage.md delete mode 100644 docs/FlowStageBindingStageObj.md delete mode 100644 docs/InvitationCreatedBy.md delete mode 100644 docs/InvitationFlowObj.md delete mode 100644 docs/NotificationRuleGroupObj.md delete mode 100644 docs/OAuthSourceType.md delete mode 100644 docs/OutpostServiceConnectionObj.md delete mode 100644 docs/PlexSourceConnectionSource.md delete mode 100644 docs/PolicyBindingPolicyObj.md delete mode 100644 docs/PolicyBindingUserObj.md delete mode 100644 docs/ProxyOutpostConfigOidcConfiguration.md delete mode 100644 model_application_provider_obj.go delete mode 100644 model_blueprint_file_meta.go delete mode 100644 model_flow_inspector_plan_current_stage.go delete mode 100644 model_flow_stage_binding_stage_obj.go delete mode 100644 model_invitation_created_by.go delete mode 100644 model_invitation_flow_obj.go delete mode 100644 model_notification_rule_group_obj.go delete mode 100644 model_o_auth_source_type.go delete mode 100644 model_outpost_service_connection_obj.go delete mode 100644 model_plex_source_connection_source.go delete mode 100644 model_policy_binding_policy_obj.go delete mode 100644 model_policy_binding_user_obj.go delete mode 100644 model_proxy_outpost_config_oidc_configuration.go diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index f5c51083b..1928ced42 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -27,7 +27,6 @@ docs/AppEnum.md docs/AppleChallengeResponseRequest.md docs/AppleLoginChallenge.md docs/Application.md -docs/ApplicationProviderObj.md docs/ApplicationRequest.md docs/AuthTypeEnum.md docs/AuthenticateWebAuthnStage.md @@ -70,7 +69,6 @@ docs/AutosubmitChallenge.md docs/BackendsEnum.md docs/BindingTypeEnum.md docs/BlueprintFile.md -docs/BlueprintFileMeta.md docs/BlueprintInstance.md docs/BlueprintInstanceRequest.md docs/BlueprintInstanceStatusEnum.md @@ -144,13 +142,11 @@ docs/FlowErrorChallenge.md docs/FlowImportResult.md docs/FlowInspection.md docs/FlowInspectorPlan.md -docs/FlowInspectorPlanCurrentStage.md docs/FlowRequest.md docs/FlowSet.md docs/FlowSetRequest.md docs/FlowStageBinding.md docs/FlowStageBindingRequest.md -docs/FlowStageBindingStageObj.md docs/FlowsApi.md docs/FooterLink.md docs/GenericError.md @@ -165,8 +161,6 @@ docs/IdentificationStageRequest.md docs/IntentEnum.md docs/InvalidResponseActionEnum.md docs/Invitation.md -docs/InvitationCreatedBy.md -docs/InvitationFlowObj.md docs/InvitationRequest.md docs/InvitationStage.md docs/InvitationStageRequest.md @@ -194,7 +188,6 @@ docs/NotConfiguredActionEnum.md docs/Notification.md docs/NotificationRequest.md docs/NotificationRule.md -docs/NotificationRuleGroupObj.md docs/NotificationRuleRequest.md docs/NotificationTransport.md docs/NotificationTransportModeEnum.md @@ -211,14 +204,12 @@ docs/OAuthDeviceCodeFinishChallenge.md docs/OAuthDeviceCodeFinishChallengeResponseRequest.md docs/OAuthSource.md docs/OAuthSourceRequest.md -docs/OAuthSourceType.md docs/Oauth2Api.md docs/OpenIDConnectConfiguration.md docs/Outpost.md docs/OutpostDefaultConfig.md docs/OutpostHealth.md docs/OutpostRequest.md -docs/OutpostServiceConnectionObj.md docs/OutpostTypeEnum.md docs/OutpostsApi.md docs/PaginatedApplicationList.md @@ -385,15 +376,12 @@ docs/PlexAuthenticationChallengeResponseRequest.md docs/PlexSource.md docs/PlexSourceConnection.md docs/PlexSourceConnectionRequest.md -docs/PlexSourceConnectionSource.md docs/PlexSourceRequest.md docs/PlexTokenRedeemRequest.md docs/PoliciesApi.md docs/Policy.md docs/PolicyBinding.md -docs/PolicyBindingPolicyObj.md docs/PolicyBindingRequest.md -docs/PolicyBindingUserObj.md docs/PolicyEngineMode.md docs/PolicyRequest.md docs/PolicyTestRequest.md @@ -416,7 +404,6 @@ docs/ProviderTypeEnum.md docs/ProvidersApi.md docs/ProxyMode.md docs/ProxyOutpostConfig.md -docs/ProxyOutpostConfigOidcConfiguration.md docs/ProxyProvider.md docs/ProxyProviderRequest.md docs/RadiusOutpostConfig.md @@ -530,7 +517,6 @@ model_app_enum.go model_apple_challenge_response_request.go model_apple_login_challenge.go model_application.go -model_application_provider_obj.go model_application_request.go model_auth_type_enum.go model_authenticate_web_authn_stage.go @@ -572,7 +558,6 @@ model_autosubmit_challenge.go model_backends_enum.go model_binding_type_enum.go model_blueprint_file.go -model_blueprint_file_meta.go model_blueprint_instance.go model_blueprint_instance_request.go model_blueprint_instance_status_enum.go @@ -643,13 +628,11 @@ model_flow_error_challenge.go model_flow_import_result.go model_flow_inspection.go model_flow_inspector_plan.go -model_flow_inspector_plan_current_stage.go model_flow_request.go model_flow_set.go model_flow_set_request.go model_flow_stage_binding.go model_flow_stage_binding_request.go -model_flow_stage_binding_stage_obj.go model_footer_link.go model_generic_error.go model_group.go @@ -663,8 +646,6 @@ model_identification_stage_request.go model_intent_enum.go model_invalid_response_action_enum.go model_invitation.go -model_invitation_created_by.go -model_invitation_flow_obj.go model_invitation_request.go model_invitation_stage.go model_invitation_stage_request.go @@ -691,7 +672,6 @@ model_not_configured_action_enum.go model_notification.go model_notification_request.go model_notification_rule.go -model_notification_rule_group_obj.go model_notification_rule_request.go model_notification_transport.go model_notification_transport_mode_enum.go @@ -708,13 +688,11 @@ model_o_auth_device_code_finish_challenge.go model_o_auth_device_code_finish_challenge_response_request.go model_o_auth_source.go model_o_auth_source_request.go -model_o_auth_source_type.go model_open_id_connect_configuration.go model_outpost.go model_outpost_default_config.go model_outpost_health.go model_outpost_request.go -model_outpost_service_connection_obj.go model_outpost_type_enum.go model_paginated_application_list.go model_paginated_application_list_pagination.go @@ -880,14 +858,11 @@ model_plex_authentication_challenge_response_request.go model_plex_source.go model_plex_source_connection.go model_plex_source_connection_request.go -model_plex_source_connection_source.go model_plex_source_request.go model_plex_token_redeem_request.go model_policy.go model_policy_binding.go -model_policy_binding_policy_obj.go model_policy_binding_request.go -model_policy_binding_user_obj.go model_policy_engine_mode.go model_policy_request.go model_policy_test_request.go @@ -908,7 +883,6 @@ model_provider_request.go model_provider_type_enum.go model_proxy_mode.go model_proxy_outpost_config.go -model_proxy_outpost_config_oidc_configuration.go model_proxy_provider.go model_proxy_provider_request.go model_radius_outpost_config.go @@ -1010,4 +984,20 @@ model_web_authn_device.go model_web_authn_device_request.go model_workers.go response.go +test/api_admin_test.go +test/api_authenticators_test.go +test/api_core_test.go +test/api_crypto_test.go +test/api_events_test.go +test/api_flows_test.go +test/api_managed_test.go +test/api_oauth2_test.go +test/api_outposts_test.go +test/api_policies_test.go +test/api_propertymappings_test.go +test/api_providers_test.go +test/api_root_test.go +test/api_schema_test.go +test/api_sources_test.go +test/api_stages_test.go utils.go diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index f4965a313..4be2c727a 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -6.0.0 \ No newline at end of file +6.5.0 \ No newline at end of file diff --git a/README.md b/README.md index afd148d14..9d862e85a 100644 --- a/README.md +++ b/README.md @@ -683,7 +683,6 @@ Class | Method | HTTP request | Description - [AppleChallengeResponseRequest](docs/AppleChallengeResponseRequest.md) - [AppleLoginChallenge](docs/AppleLoginChallenge.md) - [Application](docs/Application.md) - - [ApplicationProviderObj](docs/ApplicationProviderObj.md) - [ApplicationRequest](docs/ApplicationRequest.md) - [AuthTypeEnum](docs/AuthTypeEnum.md) - [AuthenticateWebAuthnStage](docs/AuthenticateWebAuthnStage.md) @@ -725,7 +724,6 @@ Class | Method | HTTP request | Description - [BackendsEnum](docs/BackendsEnum.md) - [BindingTypeEnum](docs/BindingTypeEnum.md) - [BlueprintFile](docs/BlueprintFile.md) - - [BlueprintFileMeta](docs/BlueprintFileMeta.md) - [BlueprintInstance](docs/BlueprintInstance.md) - [BlueprintInstanceRequest](docs/BlueprintInstanceRequest.md) - [BlueprintInstanceStatusEnum](docs/BlueprintInstanceStatusEnum.md) @@ -796,13 +794,11 @@ Class | Method | HTTP request | Description - [FlowImportResult](docs/FlowImportResult.md) - [FlowInspection](docs/FlowInspection.md) - [FlowInspectorPlan](docs/FlowInspectorPlan.md) - - [FlowInspectorPlanCurrentStage](docs/FlowInspectorPlanCurrentStage.md) - [FlowRequest](docs/FlowRequest.md) - [FlowSet](docs/FlowSet.md) - [FlowSetRequest](docs/FlowSetRequest.md) - [FlowStageBinding](docs/FlowStageBinding.md) - [FlowStageBindingRequest](docs/FlowStageBindingRequest.md) - - [FlowStageBindingStageObj](docs/FlowStageBindingStageObj.md) - [FooterLink](docs/FooterLink.md) - [GenericError](docs/GenericError.md) - [Group](docs/Group.md) @@ -816,8 +812,6 @@ Class | Method | HTTP request | Description - [IntentEnum](docs/IntentEnum.md) - [InvalidResponseActionEnum](docs/InvalidResponseActionEnum.md) - [Invitation](docs/Invitation.md) - - [InvitationCreatedBy](docs/InvitationCreatedBy.md) - - [InvitationFlowObj](docs/InvitationFlowObj.md) - [InvitationRequest](docs/InvitationRequest.md) - [InvitationStage](docs/InvitationStage.md) - [InvitationStageRequest](docs/InvitationStageRequest.md) @@ -844,7 +838,6 @@ Class | Method | HTTP request | Description - [Notification](docs/Notification.md) - [NotificationRequest](docs/NotificationRequest.md) - [NotificationRule](docs/NotificationRule.md) - - [NotificationRuleGroupObj](docs/NotificationRuleGroupObj.md) - [NotificationRuleRequest](docs/NotificationRuleRequest.md) - [NotificationTransport](docs/NotificationTransport.md) - [NotificationTransportModeEnum](docs/NotificationTransportModeEnum.md) @@ -861,13 +854,11 @@ Class | Method | HTTP request | Description - [OAuthDeviceCodeFinishChallengeResponseRequest](docs/OAuthDeviceCodeFinishChallengeResponseRequest.md) - [OAuthSource](docs/OAuthSource.md) - [OAuthSourceRequest](docs/OAuthSourceRequest.md) - - [OAuthSourceType](docs/OAuthSourceType.md) - [OpenIDConnectConfiguration](docs/OpenIDConnectConfiguration.md) - [Outpost](docs/Outpost.md) - [OutpostDefaultConfig](docs/OutpostDefaultConfig.md) - [OutpostHealth](docs/OutpostHealth.md) - [OutpostRequest](docs/OutpostRequest.md) - - [OutpostServiceConnectionObj](docs/OutpostServiceConnectionObj.md) - [OutpostTypeEnum](docs/OutpostTypeEnum.md) - [PaginatedApplicationList](docs/PaginatedApplicationList.md) - [PaginatedApplicationListPagination](docs/PaginatedApplicationListPagination.md) @@ -1033,14 +1024,11 @@ Class | Method | HTTP request | Description - [PlexSource](docs/PlexSource.md) - [PlexSourceConnection](docs/PlexSourceConnection.md) - [PlexSourceConnectionRequest](docs/PlexSourceConnectionRequest.md) - - [PlexSourceConnectionSource](docs/PlexSourceConnectionSource.md) - [PlexSourceRequest](docs/PlexSourceRequest.md) - [PlexTokenRedeemRequest](docs/PlexTokenRedeemRequest.md) - [Policy](docs/Policy.md) - [PolicyBinding](docs/PolicyBinding.md) - - [PolicyBindingPolicyObj](docs/PolicyBindingPolicyObj.md) - [PolicyBindingRequest](docs/PolicyBindingRequest.md) - - [PolicyBindingUserObj](docs/PolicyBindingUserObj.md) - [PolicyEngineMode](docs/PolicyEngineMode.md) - [PolicyRequest](docs/PolicyRequest.md) - [PolicyTestRequest](docs/PolicyTestRequest.md) @@ -1061,7 +1049,6 @@ Class | Method | HTTP request | Description - [ProviderTypeEnum](docs/ProviderTypeEnum.md) - [ProxyMode](docs/ProxyMode.md) - [ProxyOutpostConfig](docs/ProxyOutpostConfig.md) - - [ProxyOutpostConfigOidcConfiguration](docs/ProxyOutpostConfigOidcConfiguration.md) - [ProxyProvider](docs/ProxyProvider.md) - [ProxyProviderRequest](docs/ProxyProviderRequest.md) - [RadiusOutpostConfig](docs/RadiusOutpostConfig.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index 5a85bc87f..f86c561b2 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -7423,11 +7423,12 @@ paths: format: uuid type: string style: form - - description: "Configure how the flow executor should handle an invalid response\ - \ to a challenge. RETRY returns the error message and a similar challenge\ - \ to the executor. RESTART restarts the flow from the beginning, and RESTART_WITH_CONTEXT\ - \ restarts the flow while keeping the current context.\n\n* `retry` - Retry\n\ - * `restart` - Restart\n* `restart_with_context` - Restart With Context" + - description: |- + Configure how the flow executor should handle an invalid response to a challenge. RETRY returns the error message and a similar challenge to the executor. RESTART restarts the flow from the beginning, and RESTART_WITH_CONTEXT restarts the flow while keeping the current context. + + * `retry` - Retry + * `restart` - Restart + * `restart_with_context` - Restart With Context explode: true in: query name: invalid_response_action @@ -7488,9 +7489,12 @@ paths: type: string type: array style: form - - description: "* `all` - ALL, all policies must pass\n* `any` - ANY, any policy\ - \ must pass\n\n* `all` - ALL, all policies must pass\n* `any` - ANY, any\ - \ policy must pass" + - description: |- + * `all` - ALL, all policies must pass + * `any` - ANY, any policy must pass + + * `all` - ALL, all policies must pass + * `any` - ANY, any policy must pass explode: true in: query name: policy_engine_mode @@ -7924,12 +7928,16 @@ paths: - message_continue type: string style: form - - description: "Decides what this Flow is used for. For example, the Authentication\ - \ flow is redirect to when an un-authenticated user visits authentik.\n\n\ - * `authentication` - Authentication\n* `authorization` - Authorization\n\ - * `invalidation` - Invalidation\n* `enrollment` - Enrollment\n* `unenrollment`\ - \ - Unrenollment\n* `recovery` - Recovery\n* `stage_configuration` - Stage\ - \ Configuration" + - description: |- + Decides what this Flow is used for. For example, the Authentication flow is redirect to when an un-authenticated user visits authentik. + + * `authentication` - Authentication + * `authorization` - Authorization + * `invalidation` - Invalidation + * `enrollment` - Enrollment + * `unenrollment` - Unrenollment + * `recovery` - Recovery + * `stage_configuration` - Stage Configuration explode: true in: query name: designation @@ -12019,21 +12027,36 @@ paths: description: Event Matcher Policy Viewset operationId: policies_event_matcher_list parameters: - - description: "Match created events with this action type. When left empty,\ - \ all action types will be matched.\n\n* `login` - Login\n* `login_failed`\ - \ - Login Failed\n* `logout` - Logout\n* `user_write` - User Write\n* `suspicious_request`\ - \ - Suspicious Request\n* `password_set` - Password Set\n* `secret_view`\ - \ - Secret View\n* `secret_rotate` - Secret Rotate\n* `invitation_used`\ - \ - Invite Used\n* `authorize_application` - Authorize Application\n* `source_linked`\ - \ - Source Linked\n* `impersonation_started` - Impersonation Started\n*\ - \ `impersonation_ended` - Impersonation Ended\n* `flow_execution` - Flow\ - \ Execution\n* `policy_execution` - Policy Execution\n* `policy_exception`\ - \ - Policy Exception\n* `property_mapping_exception` - Property Mapping\ - \ Exception\n* `system_task_execution` - System Task Execution\n* `system_task_exception`\ - \ - System Task Exception\n* `system_exception` - System Exception\n* `configuration_error`\ - \ - Configuration Error\n* `model_created` - Model Created\n* `model_updated`\ - \ - Model Updated\n* `model_deleted` - Model Deleted\n* `email_sent` - Email\ - \ Sent\n* `update_available` - Update Available\n* `custom_` - Custom Prefix" + - description: |- + Match created events with this action type. When left empty, all action types will be matched. + + * `login` - Login + * `login_failed` - Login Failed + * `logout` - Logout + * `user_write` - User Write + * `suspicious_request` - Suspicious Request + * `password_set` - Password Set + * `secret_view` - Secret View + * `secret_rotate` - Secret Rotate + * `invitation_used` - Invite Used + * `authorize_application` - Authorize Application + * `source_linked` - Source Linked + * `impersonation_started` - Impersonation Started + * `impersonation_ended` - Impersonation Ended + * `flow_execution` - Flow Execution + * `policy_execution` - Policy Execution + * `policy_exception` - Policy Exception + * `property_mapping_exception` - Property Mapping Exception + * `system_task_execution` - System Task Execution + * `system_task_exception` - System Task Exception + * `system_exception` - System Exception + * `configuration_error` - Configuration Error + * `model_created` - Model Created + * `model_updated` - Model Updated + * `model_deleted` - Model Deleted + * `email_sent` - Email Sent + * `update_available` - Update Available + * `custom_` - Custom Prefix explode: true in: query name: action @@ -16436,9 +16459,11 @@ paths: schema: type: boolean style: form - - description: "Configure how the issuer field of the ID Token should be filled.\n\ - \n* `global` - Same identifier is used for all providers\n* `per_provider`\ - \ - Each provider has a different issuer, based on the application slug." + - description: |- + Configure how the issuer field of the ID Token should be filled. + + * `global` - Same identifier is used for all providers + * `per_provider` - Each provider has a different issuer, based on the application slug. explode: true in: query name: issuer_mode @@ -16520,13 +16545,14 @@ paths: format: uuid type: string style: form - - description: "Configure what data should be used as unique User Identifier.\ - \ For most cases, the default should be fine.\n\n* `hashed_user_id` - Based\ - \ on the Hashed User ID\n* `user_id` - Based on user ID\n* `user_username`\ - \ - Based on the username\n* `user_email` - Based on the User's Email. This\ - \ is recommended over the UPN method.\n* `user_upn` - Based on the User's\ - \ UPN, only works if user has a 'upn' attribute set. Use this method only\ - \ if you have different UPN and Mail domains." + - description: |- + Configure what data should be used as unique User Identifier. For most cases, the default should be fine. + + * `hashed_user_id` - Based on the Hashed User ID + * `user_id` - Based on user ID + * `user_username` - Based on the username + * `user_email` - Based on the User's Email. This is recommended over the UPN method. + * `user_upn` - Based on the User's UPN, only works if user has a 'upn' attribute set. Use this method only if you have different UPN and Mail domains. explode: true in: query name: sub_mode @@ -18480,8 +18506,11 @@ paths: - root /schema/: get: - description: "OpenApi3 schema for this API. Format can be selected via content\ - \ negotiation.\n\n- YAML: application/vnd.oai.openapi\n- JSON: application/vnd.oai.openapi+json" + description: |- + OpenApi3 schema for this API. Format can be selected via content negotiation. + + - YAML: application/vnd.oai.openapi + - JSON: application/vnd.oai.openapi+json operationId: schema_retrieve parameters: - explode: true @@ -19542,9 +19571,12 @@ paths: schema: type: integer style: form - - description: "* `all` - ALL, all policies must pass\n* `any` - ANY, any policy\ - \ must pass\n\n* `all` - ALL, all policies must pass\n* `any` - ANY, any\ - \ policy must pass" + - description: |- + * `all` - ALL, all policies must pass + * `any` - ANY, any policy must pass + + * `all` - ALL, all policies must pass + * `any` - ANY, any policy must pass explode: true in: query name: policy_engine_mode @@ -19591,15 +19623,14 @@ paths: schema: type: string style: form - - description: "How the source determines if an existing user should be authenticated\ - \ or a new user enrolled.\n\n* `identifier` - Use the source-specific identifier\n\ - * `email_link` - Link to a user with identical email address. Can have security\ - \ implications when a source doesn't validate email addresses.\n* `email_deny`\ - \ - Use the user's email address, but deny enrollment when the email address\ - \ already exists.\n* `username_link` - Link to a user with identical username.\ - \ Can have security implications when a username is used with another source.\n\ - * `username_deny` - Use the user's username, but deny enrollment when the\ - \ username already exists." + - description: |- + How the source determines if an existing user should be authenticated or a new user enrolled. + + * `identifier` - Use the source-specific identifier + * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. + * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. + * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. + * `username_deny` - Use the user's username, but deny enrollment when the username already exists. explode: true in: query name: user_matching_mode @@ -19856,8 +19887,9 @@ paths: - sources /sources/oauth/source_types/: get: - description: "Get all creatable source types. If ?name is set, only returns\ - \ the type for .\nIf isn't found, returns the default type." + description: |- + Get all creatable source types. If ?name is set, only returns the type for . + If isn't found, returns the default type. operationId: sources_oauth_source_types_list parameters: - explode: true @@ -19965,9 +19997,12 @@ paths: schema: type: integer style: form - - description: "* `all` - ALL, all policies must pass\n* `any` - ANY, any policy\ - \ must pass\n\n* `all` - ALL, all policies must pass\n* `any` - ANY, any\ - \ policy must pass" + - description: |- + * `all` - ALL, all policies must pass + * `any` - ANY, any policy must pass + + * `all` - ALL, all policies must pass + * `any` - ANY, any policy must pass explode: true in: query name: policy_engine_mode @@ -19993,15 +20028,14 @@ paths: schema: type: string style: form - - description: "How the source determines if an existing user should be authenticated\ - \ or a new user enrolled.\n\n* `identifier` - Use the source-specific identifier\n\ - * `email_link` - Link to a user with identical email address. Can have security\ - \ implications when a source doesn't validate email addresses.\n* `email_deny`\ - \ - Use the user's email address, but deny enrollment when the email address\ - \ already exists.\n* `username_link` - Link to a user with identical username.\ - \ Can have security implications when a username is used with another source.\n\ - * `username_deny` - Use the user's username, but deny enrollment when the\ - \ username already exists." + - description: |- + How the source determines if an existing user should be authenticated or a new user enrolled. + + * `identifier` - Use the source-specific identifier + * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. + * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. + * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. + * `username_deny` - Use the user's username, but deny enrollment when the username already exists. explode: true in: query name: user_matching_mode @@ -20258,8 +20292,9 @@ paths: - sources /sources/plex/redeem_token/: post: - description: "Redeem a plex token, check it's access to resources against what's\ - \ allowed\nfor the source, and redirect to an authentication/enrollment flow." + description: |- + Redeem a plex token, check it's access to resources against what's allowed + for the source, and redirect to an authentication/enrollment flow. operationId: sources_plex_redeem_token_create parameters: - explode: true @@ -20417,12 +20452,14 @@ paths: schema: type: string style: form - - description: "NameID Policy sent to the IdP. Can be unset, in which case no\ - \ Policy is sent.\n\n* `urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress`\ - \ - Email\n* `urn:oasis:names:tc:SAML:2.0:nameid-format:persistent` - Persistent\n\ - * `urn:oasis:names:tc:SAML:2.0:nameid-format:X509SubjectName` - X509\n*\ - \ `urn:oasis:names:tc:SAML:2.0:nameid-format:WindowsDomainQualifiedName`\ - \ - Windows\n* `urn:oasis:names:tc:SAML:2.0:nameid-format:transient` - Transient" + - description: |- + NameID Policy sent to the IdP. Can be unset, in which case no Policy is sent. + + * `urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress` - Email + * `urn:oasis:names:tc:SAML:2.0:nameid-format:persistent` - Persistent + * `urn:oasis:names:tc:SAML:2.0:nameid-format:X509SubjectName` - X509 + * `urn:oasis:names:tc:SAML:2.0:nameid-format:WindowsDomainQualifiedName` - Windows + * `urn:oasis:names:tc:SAML:2.0:nameid-format:transient` - Transient explode: true in: query name: name_id_policy @@ -20460,9 +20497,12 @@ paths: schema: type: integer style: form - - description: "* `all` - ALL, all policies must pass\n* `any` - ANY, any policy\ - \ must pass\n\n* `all` - ALL, all policies must pass\n* `any` - ANY, any\ - \ policy must pass" + - description: |- + * `all` - ALL, all policies must pass + * `any` - ANY, any policy must pass + + * `all` - ALL, all policies must pass + * `any` - ANY, any policy must pass explode: true in: query name: policy_engine_mode @@ -20550,15 +20590,14 @@ paths: schema: type: string style: form - - description: "How the source determines if an existing user should be authenticated\ - \ or a new user enrolled.\n\n* `identifier` - Use the source-specific identifier\n\ - * `email_link` - Link to a user with identical email address. Can have security\ - \ implications when a source doesn't validate email addresses.\n* `email_deny`\ - \ - Use the user's email address, but deny enrollment when the email address\ - \ already exists.\n* `username_link` - Link to a user with identical username.\ - \ Can have security implications when a username is used with another source.\n\ - * `username_deny` - Use the user's username, but deny enrollment when the\ - \ username already exists." + - description: |- + How the source determines if an existing user should be authenticated or a new user enrolled. + + * `identifier` - Use the source-specific identifier + * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. + * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. + * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. + * `username_deny` - Use the user's username, but deny enrollment when the username already exists. explode: true in: query name: user_matching_mode @@ -23303,9 +23342,12 @@ paths: format: uuid type: string style: form - - description: "* `6` - 6 digits, widely compatible\n* `8` - 8 digits, not compatible\ - \ with apps like Google Authenticator\n\n* `6` - 6 digits, widely compatible\n\ - * `8` - 8 digits, not compatible with apps like Google Authenticator" + - description: |- + * `6` - 6 digits, widely compatible + * `8` - 8 digits, not compatible with apps like Google Authenticator + + * `6` - 6 digits, widely compatible + * `8` - 8 digits, not compatible with apps like Google Authenticator explode: true in: query name: digits @@ -27253,36 +27295,44 @@ paths: schema: type: string style: form - - description: "* `text` - Text: Simple Text input\n* `text_area` - Text area:\ - \ Multiline Text Input.\n* `text_read_only` - Text (read-only): Simple Text\ - \ input, but cannot be edited.\n* `text_area_read_only` - Text area (read-only):\ - \ Multiline Text input, but cannot be edited.\n* `username` - Username:\ - \ Same as Text input, but checks for and prevents duplicate usernames.\n\ - * `email` - Email: Text field with Email type.\n* `password` - Password:\ - \ Masked input, multiple inputs of this type on the same prompt need to\ - \ be identical.\n* `number` - Number\n* `checkbox` - Checkbox\n* `radio-button-group`\ - \ - Fixed choice field rendered as a group of radio buttons.\n* `dropdown`\ - \ - Fixed choice field rendered as a dropdown.\n* `date` - Date\n* `date-time`\ - \ - Date Time\n* `file` - File: File upload for arbitrary files. File content\ - \ will be available in flow context as data-URI\n* `separator` - Separator:\ - \ Static Separator Line\n* `hidden` - Hidden: Hidden field, can be used\ - \ to insert data into form.\n* `static` - Static: Static value, displayed\ - \ as-is.\n* `ak-locale` - authentik: Selection of locales authentik supports\n\ - \n* `text` - Text: Simple Text input\n* `text_area` - Text area: Multiline\ - \ Text Input.\n* `text_read_only` - Text (read-only): Simple Text input,\ - \ but cannot be edited.\n* `text_area_read_only` - Text area (read-only):\ - \ Multiline Text input, but cannot be edited.\n* `username` - Username:\ - \ Same as Text input, but checks for and prevents duplicate usernames.\n\ - * `email` - Email: Text field with Email type.\n* `password` - Password:\ - \ Masked input, multiple inputs of this type on the same prompt need to\ - \ be identical.\n* `number` - Number\n* `checkbox` - Checkbox\n* `radio-button-group`\ - \ - Fixed choice field rendered as a group of radio buttons.\n* `dropdown`\ - \ - Fixed choice field rendered as a dropdown.\n* `date` - Date\n* `date-time`\ - \ - Date Time\n* `file` - File: File upload for arbitrary files. File content\ - \ will be available in flow context as data-URI\n* `separator` - Separator:\ - \ Static Separator Line\n* `hidden` - Hidden: Hidden field, can be used\ - \ to insert data into form.\n* `static` - Static: Static value, displayed\ - \ as-is.\n* `ak-locale` - authentik: Selection of locales authentik supports" + - description: |- + * `text` - Text: Simple Text input + * `text_area` - Text area: Multiline Text Input. + * `text_read_only` - Text (read-only): Simple Text input, but cannot be edited. + * `text_area_read_only` - Text area (read-only): Multiline Text input, but cannot be edited. + * `username` - Username: Same as Text input, but checks for and prevents duplicate usernames. + * `email` - Email: Text field with Email type. + * `password` - Password: Masked input, multiple inputs of this type on the same prompt need to be identical. + * `number` - Number + * `checkbox` - Checkbox + * `radio-button-group` - Fixed choice field rendered as a group of radio buttons. + * `dropdown` - Fixed choice field rendered as a dropdown. + * `date` - Date + * `date-time` - Date Time + * `file` - File: File upload for arbitrary files. File content will be available in flow context as data-URI + * `separator` - Separator: Static Separator Line + * `hidden` - Hidden: Hidden field, can be used to insert data into form. + * `static` - Static: Static value, displayed as-is. + * `ak-locale` - authentik: Selection of locales authentik supports + + * `text` - Text: Simple Text input + * `text_area` - Text area: Multiline Text Input. + * `text_read_only` - Text (read-only): Simple Text input, but cannot be edited. + * `text_area_read_only` - Text area (read-only): Multiline Text input, but cannot be edited. + * `username` - Username: Same as Text input, but checks for and prevents duplicate usernames. + * `email` - Email: Text field with Email type. + * `password` - Password: Masked input, multiple inputs of this type on the same prompt need to be identical. + * `number` - Number + * `checkbox` - Checkbox + * `radio-button-group` - Fixed choice field rendered as a group of radio buttons. + * `dropdown` - Fixed choice field rendered as a dropdown. + * `date` - Date + * `date-time` - Date Time + * `file` - File: File upload for arbitrary files. File content will be available in flow context as data-URI + * `separator` - Separator: Static Separator Line + * `hidden` - Hidden: Hidden field, can be used to insert data into form. + * `static` - Static: Static value, displayed as-is. + * `ak-locale` - authentik: Selection of locales authentik supports explode: true in: query name: type @@ -29344,7 +29394,7 @@ components: Application: description: Application Serializer example: - provider_obj: null + provider_obj: "" meta_launch_url: https://openapi-generator.tech meta_icon: meta_icon meta_publisher: meta_publisher @@ -29375,7 +29425,9 @@ components: nullable: true type: integer provider_obj: - $ref: '#/components/schemas/Application_provider_obj' + allOf: + - $ref: '#/components/schemas/Provider' + readOnly: true launch_url: description: Allow formatting of launch URL nullable: true @@ -30805,7 +30857,7 @@ components: BlueprintFile: example: path: path - meta: null + meta: "" last_m: 2000-01-23T04:56:07.000+00:00 hash: hash properties: @@ -30817,7 +30869,9 @@ components: hash: type: string meta: - $ref: '#/components/schemas/BlueprintFile_meta' + allOf: + - $ref: '#/components/schemas/Metadata' + readOnly: true required: - hash - last_m @@ -31639,6 +31693,7 @@ components: ui_theme: allOf: - $ref: '#/components/schemas/UiThemeEnum' + default: automatic readOnly: true flow_authentication: type: string @@ -31877,8 +31932,9 @@ components: - http://www.w3.org/2001/04/xmlenc#sha512 type: string DigitsEnum: - description: "* `6` - 6 digits, widely compatible\n* `8` - 8 digits, not compatible\ - \ with apps like Google Authenticator" + description: |- + * `6` - 6 digits, widely compatible + * `8` - 8 digits, not compatible with apps like Google Authenticator enum: - 6 - 8 @@ -32704,22 +32760,36 @@ components: action: allOf: - $ref: '#/components/schemas/EventActions' - description: "Match created events with this action type. When left empty,\ - \ all action types will be matched.\n\n* `login` - Login\n* `login_failed`\ - \ - Login Failed\n* `logout` - Logout\n* `user_write` - User Write\n*\ - \ `suspicious_request` - Suspicious Request\n* `password_set` - Password\ - \ Set\n* `secret_view` - Secret View\n* `secret_rotate` - Secret Rotate\n\ - * `invitation_used` - Invite Used\n* `authorize_application` - Authorize\ - \ Application\n* `source_linked` - Source Linked\n* `impersonation_started`\ - \ - Impersonation Started\n* `impersonation_ended` - Impersonation Ended\n\ - * `flow_execution` - Flow Execution\n* `policy_execution` - Policy Execution\n\ - * `policy_exception` - Policy Exception\n* `property_mapping_exception`\ - \ - Property Mapping Exception\n* `system_task_execution` - System Task\ - \ Execution\n* `system_task_exception` - System Task Exception\n* `system_exception`\ - \ - System Exception\n* `configuration_error` - Configuration Error\n\ - * `model_created` - Model Created\n* `model_updated` - Model Updated\n\ - * `model_deleted` - Model Deleted\n* `email_sent` - Email Sent\n* `update_available`\ - \ - Update Available\n* `custom_` - Custom Prefix" + description: |- + Match created events with this action type. When left empty, all action types will be matched. + + * `login` - Login + * `login_failed` - Login Failed + * `logout` - Logout + * `user_write` - User Write + * `suspicious_request` - Suspicious Request + * `password_set` - Password Set + * `secret_view` - Secret View + * `secret_rotate` - Secret Rotate + * `invitation_used` - Invite Used + * `authorize_application` - Authorize Application + * `source_linked` - Source Linked + * `impersonation_started` - Impersonation Started + * `impersonation_ended` - Impersonation Ended + * `flow_execution` - Flow Execution + * `policy_execution` - Policy Execution + * `policy_exception` - Policy Exception + * `property_mapping_exception` - Property Mapping Exception + * `system_task_execution` - System Task Execution + * `system_task_exception` - System Task Exception + * `system_exception` - System Exception + * `configuration_error` - Configuration Error + * `model_created` - Model Created + * `model_updated` - Model Updated + * `model_deleted` - Model Deleted + * `email_sent` - Email Sent + * `update_available` - Update Available + * `custom_` - Custom Prefix client_ip: description: "Matches Event's Client IP (strict matching, for network matching\ \ use an Expression Policy)" @@ -32727,43 +32797,56 @@ components: app: allOf: - $ref: '#/components/schemas/AppEnum' - description: "Match events created by selected application. When left empty,\ - \ all applications are matched.\n\n* `authentik.admin` - authentik Admin\n\ - * `authentik.api` - authentik API\n* `authentik.crypto` - authentik Crypto\n\ - * `authentik.events` - authentik Events\n* `authentik.flows` - authentik\ - \ Flows\n* `authentik.lib` - authentik lib\n* `authentik.outposts` - authentik\ - \ Outpost\n* `authentik.policies.dummy` - authentik Policies.Dummy\n*\ - \ `authentik.policies.event_matcher` - authentik Policies.Event Matcher\n\ - * `authentik.policies.expiry` - authentik Policies.Expiry\n* `authentik.policies.expression`\ - \ - authentik Policies.Expression\n* `authentik.policies.password` - authentik\ - \ Policies.Password\n* `authentik.policies.reputation` - authentik Policies.Reputation\n\ - * `authentik.policies` - authentik Policies\n* `authentik.providers.ldap`\ - \ - authentik Providers.LDAP\n* `authentik.providers.oauth2` - authentik\ - \ Providers.OAuth2\n* `authentik.providers.proxy` - authentik Providers.Proxy\n\ - * `authentik.providers.radius` - authentik Providers.Radius\n* `authentik.providers.saml`\ - \ - authentik Providers.SAML\n* `authentik.providers.scim` - authentik\ - \ Providers.SCIM\n* `authentik.recovery` - authentik Recovery\n* `authentik.sources.ldap`\ - \ - authentik Sources.LDAP\n* `authentik.sources.oauth` - authentik Sources.OAuth\n\ - * `authentik.sources.plex` - authentik Sources.Plex\n* `authentik.sources.saml`\ - \ - authentik Sources.SAML\n* `authentik.stages.authenticator_duo` - authentik\ - \ Stages.Authenticator.Duo\n* `authentik.stages.authenticator_sms` - authentik\ - \ Stages.Authenticator.SMS\n* `authentik.stages.authenticator_static`\ - \ - authentik Stages.Authenticator.Static\n* `authentik.stages.authenticator_totp`\ - \ - authentik Stages.Authenticator.TOTP\n* `authentik.stages.authenticator_validate`\ - \ - authentik Stages.Authenticator.Validate\n* `authentik.stages.authenticator_webauthn`\ - \ - authentik Stages.Authenticator.WebAuthn\n* `authentik.stages.captcha`\ - \ - authentik Stages.Captcha\n* `authentik.stages.consent` - authentik\ - \ Stages.Consent\n* `authentik.stages.deny` - authentik Stages.Deny\n\ - * `authentik.stages.dummy` - authentik Stages.Dummy\n* `authentik.stages.email`\ - \ - authentik Stages.Email\n* `authentik.stages.identification` - authentik\ - \ Stages.Identification\n* `authentik.stages.invitation` - authentik Stages.User\ - \ Invitation\n* `authentik.stages.password` - authentik Stages.Password\n\ - * `authentik.stages.prompt` - authentik Stages.Prompt\n* `authentik.stages.user_delete`\ - \ - authentik Stages.User Delete\n* `authentik.stages.user_login` - authentik\ - \ Stages.User Login\n* `authentik.stages.user_logout` - authentik Stages.User\ - \ Logout\n* `authentik.stages.user_write` - authentik Stages.User Write\n\ - * `authentik.tenants` - authentik Tenants\n* `authentik.blueprints` -\ - \ authentik Blueprints\n* `authentik.core` - authentik Core" + description: |- + Match events created by selected application. When left empty, all applications are matched. + + * `authentik.admin` - authentik Admin + * `authentik.api` - authentik API + * `authentik.crypto` - authentik Crypto + * `authentik.events` - authentik Events + * `authentik.flows` - authentik Flows + * `authentik.lib` - authentik lib + * `authentik.outposts` - authentik Outpost + * `authentik.policies.dummy` - authentik Policies.Dummy + * `authentik.policies.event_matcher` - authentik Policies.Event Matcher + * `authentik.policies.expiry` - authentik Policies.Expiry + * `authentik.policies.expression` - authentik Policies.Expression + * `authentik.policies.password` - authentik Policies.Password + * `authentik.policies.reputation` - authentik Policies.Reputation + * `authentik.policies` - authentik Policies + * `authentik.providers.ldap` - authentik Providers.LDAP + * `authentik.providers.oauth2` - authentik Providers.OAuth2 + * `authentik.providers.proxy` - authentik Providers.Proxy + * `authentik.providers.radius` - authentik Providers.Radius + * `authentik.providers.saml` - authentik Providers.SAML + * `authentik.providers.scim` - authentik Providers.SCIM + * `authentik.recovery` - authentik Recovery + * `authentik.sources.ldap` - authentik Sources.LDAP + * `authentik.sources.oauth` - authentik Sources.OAuth + * `authentik.sources.plex` - authentik Sources.Plex + * `authentik.sources.saml` - authentik Sources.SAML + * `authentik.stages.authenticator_duo` - authentik Stages.Authenticator.Duo + * `authentik.stages.authenticator_sms` - authentik Stages.Authenticator.SMS + * `authentik.stages.authenticator_static` - authentik Stages.Authenticator.Static + * `authentik.stages.authenticator_totp` - authentik Stages.Authenticator.TOTP + * `authentik.stages.authenticator_validate` - authentik Stages.Authenticator.Validate + * `authentik.stages.authenticator_webauthn` - authentik Stages.Authenticator.WebAuthn + * `authentik.stages.captcha` - authentik Stages.Captcha + * `authentik.stages.consent` - authentik Stages.Consent + * `authentik.stages.deny` - authentik Stages.Deny + * `authentik.stages.dummy` - authentik Stages.Dummy + * `authentik.stages.email` - authentik Stages.Email + * `authentik.stages.identification` - authentik Stages.Identification + * `authentik.stages.invitation` - authentik Stages.User Invitation + * `authentik.stages.password` - authentik Stages.Password + * `authentik.stages.prompt` - authentik Stages.Prompt + * `authentik.stages.user_delete` - authentik Stages.User Delete + * `authentik.stages.user_login` - authentik Stages.User Login + * `authentik.stages.user_logout` - authentik Stages.User Logout + * `authentik.stages.user_write` - authentik Stages.User Write + * `authentik.tenants` - authentik Tenants + * `authentik.blueprints` - authentik Blueprints + * `authentik.core` - authentik Core required: - bound_to - component @@ -32792,22 +32875,36 @@ components: action: allOf: - $ref: '#/components/schemas/EventActions' - description: "Match created events with this action type. When left empty,\ - \ all action types will be matched.\n\n* `login` - Login\n* `login_failed`\ - \ - Login Failed\n* `logout` - Logout\n* `user_write` - User Write\n*\ - \ `suspicious_request` - Suspicious Request\n* `password_set` - Password\ - \ Set\n* `secret_view` - Secret View\n* `secret_rotate` - Secret Rotate\n\ - * `invitation_used` - Invite Used\n* `authorize_application` - Authorize\ - \ Application\n* `source_linked` - Source Linked\n* `impersonation_started`\ - \ - Impersonation Started\n* `impersonation_ended` - Impersonation Ended\n\ - * `flow_execution` - Flow Execution\n* `policy_execution` - Policy Execution\n\ - * `policy_exception` - Policy Exception\n* `property_mapping_exception`\ - \ - Property Mapping Exception\n* `system_task_execution` - System Task\ - \ Execution\n* `system_task_exception` - System Task Exception\n* `system_exception`\ - \ - System Exception\n* `configuration_error` - Configuration Error\n\ - * `model_created` - Model Created\n* `model_updated` - Model Updated\n\ - * `model_deleted` - Model Deleted\n* `email_sent` - Email Sent\n* `update_available`\ - \ - Update Available\n* `custom_` - Custom Prefix" + description: |- + Match created events with this action type. When left empty, all action types will be matched. + + * `login` - Login + * `login_failed` - Login Failed + * `logout` - Logout + * `user_write` - User Write + * `suspicious_request` - Suspicious Request + * `password_set` - Password Set + * `secret_view` - Secret View + * `secret_rotate` - Secret Rotate + * `invitation_used` - Invite Used + * `authorize_application` - Authorize Application + * `source_linked` - Source Linked + * `impersonation_started` - Impersonation Started + * `impersonation_ended` - Impersonation Ended + * `flow_execution` - Flow Execution + * `policy_execution` - Policy Execution + * `policy_exception` - Policy Exception + * `property_mapping_exception` - Property Mapping Exception + * `system_task_execution` - System Task Execution + * `system_task_exception` - System Task Exception + * `system_exception` - System Exception + * `configuration_error` - Configuration Error + * `model_created` - Model Created + * `model_updated` - Model Updated + * `model_deleted` - Model Deleted + * `email_sent` - Email Sent + * `update_available` - Update Available + * `custom_` - Custom Prefix client_ip: description: "Matches Event's Client IP (strict matching, for network matching\ \ use an Expression Policy)" @@ -32815,43 +32912,56 @@ components: app: allOf: - $ref: '#/components/schemas/AppEnum' - description: "Match events created by selected application. When left empty,\ - \ all applications are matched.\n\n* `authentik.admin` - authentik Admin\n\ - * `authentik.api` - authentik API\n* `authentik.crypto` - authentik Crypto\n\ - * `authentik.events` - authentik Events\n* `authentik.flows` - authentik\ - \ Flows\n* `authentik.lib` - authentik lib\n* `authentik.outposts` - authentik\ - \ Outpost\n* `authentik.policies.dummy` - authentik Policies.Dummy\n*\ - \ `authentik.policies.event_matcher` - authentik Policies.Event Matcher\n\ - * `authentik.policies.expiry` - authentik Policies.Expiry\n* `authentik.policies.expression`\ - \ - authentik Policies.Expression\n* `authentik.policies.password` - authentik\ - \ Policies.Password\n* `authentik.policies.reputation` - authentik Policies.Reputation\n\ - * `authentik.policies` - authentik Policies\n* `authentik.providers.ldap`\ - \ - authentik Providers.LDAP\n* `authentik.providers.oauth2` - authentik\ - \ Providers.OAuth2\n* `authentik.providers.proxy` - authentik Providers.Proxy\n\ - * `authentik.providers.radius` - authentik Providers.Radius\n* `authentik.providers.saml`\ - \ - authentik Providers.SAML\n* `authentik.providers.scim` - authentik\ - \ Providers.SCIM\n* `authentik.recovery` - authentik Recovery\n* `authentik.sources.ldap`\ - \ - authentik Sources.LDAP\n* `authentik.sources.oauth` - authentik Sources.OAuth\n\ - * `authentik.sources.plex` - authentik Sources.Plex\n* `authentik.sources.saml`\ - \ - authentik Sources.SAML\n* `authentik.stages.authenticator_duo` - authentik\ - \ Stages.Authenticator.Duo\n* `authentik.stages.authenticator_sms` - authentik\ - \ Stages.Authenticator.SMS\n* `authentik.stages.authenticator_static`\ - \ - authentik Stages.Authenticator.Static\n* `authentik.stages.authenticator_totp`\ - \ - authentik Stages.Authenticator.TOTP\n* `authentik.stages.authenticator_validate`\ - \ - authentik Stages.Authenticator.Validate\n* `authentik.stages.authenticator_webauthn`\ - \ - authentik Stages.Authenticator.WebAuthn\n* `authentik.stages.captcha`\ - \ - authentik Stages.Captcha\n* `authentik.stages.consent` - authentik\ - \ Stages.Consent\n* `authentik.stages.deny` - authentik Stages.Deny\n\ - * `authentik.stages.dummy` - authentik Stages.Dummy\n* `authentik.stages.email`\ - \ - authentik Stages.Email\n* `authentik.stages.identification` - authentik\ - \ Stages.Identification\n* `authentik.stages.invitation` - authentik Stages.User\ - \ Invitation\n* `authentik.stages.password` - authentik Stages.Password\n\ - * `authentik.stages.prompt` - authentik Stages.Prompt\n* `authentik.stages.user_delete`\ - \ - authentik Stages.User Delete\n* `authentik.stages.user_login` - authentik\ - \ Stages.User Login\n* `authentik.stages.user_logout` - authentik Stages.User\ - \ Logout\n* `authentik.stages.user_write` - authentik Stages.User Write\n\ - * `authentik.tenants` - authentik Tenants\n* `authentik.blueprints` -\ - \ authentik Blueprints\n* `authentik.core` - authentik Core" + description: |- + Match events created by selected application. When left empty, all applications are matched. + + * `authentik.admin` - authentik Admin + * `authentik.api` - authentik API + * `authentik.crypto` - authentik Crypto + * `authentik.events` - authentik Events + * `authentik.flows` - authentik Flows + * `authentik.lib` - authentik lib + * `authentik.outposts` - authentik Outpost + * `authentik.policies.dummy` - authentik Policies.Dummy + * `authentik.policies.event_matcher` - authentik Policies.Event Matcher + * `authentik.policies.expiry` - authentik Policies.Expiry + * `authentik.policies.expression` - authentik Policies.Expression + * `authentik.policies.password` - authentik Policies.Password + * `authentik.policies.reputation` - authentik Policies.Reputation + * `authentik.policies` - authentik Policies + * `authentik.providers.ldap` - authentik Providers.LDAP + * `authentik.providers.oauth2` - authentik Providers.OAuth2 + * `authentik.providers.proxy` - authentik Providers.Proxy + * `authentik.providers.radius` - authentik Providers.Radius + * `authentik.providers.saml` - authentik Providers.SAML + * `authentik.providers.scim` - authentik Providers.SCIM + * `authentik.recovery` - authentik Recovery + * `authentik.sources.ldap` - authentik Sources.LDAP + * `authentik.sources.oauth` - authentik Sources.OAuth + * `authentik.sources.plex` - authentik Sources.Plex + * `authentik.sources.saml` - authentik Sources.SAML + * `authentik.stages.authenticator_duo` - authentik Stages.Authenticator.Duo + * `authentik.stages.authenticator_sms` - authentik Stages.Authenticator.SMS + * `authentik.stages.authenticator_static` - authentik Stages.Authenticator.Static + * `authentik.stages.authenticator_totp` - authentik Stages.Authenticator.TOTP + * `authentik.stages.authenticator_validate` - authentik Stages.Authenticator.Validate + * `authentik.stages.authenticator_webauthn` - authentik Stages.Authenticator.WebAuthn + * `authentik.stages.captcha` - authentik Stages.Captcha + * `authentik.stages.consent` - authentik Stages.Consent + * `authentik.stages.deny` - authentik Stages.Deny + * `authentik.stages.dummy` - authentik Stages.Dummy + * `authentik.stages.email` - authentik Stages.Email + * `authentik.stages.identification` - authentik Stages.Identification + * `authentik.stages.invitation` - authentik Stages.User Invitation + * `authentik.stages.password` - authentik Stages.Password + * `authentik.stages.prompt` - authentik Stages.Prompt + * `authentik.stages.user_delete` - authentik Stages.User Delete + * `authentik.stages.user_login` - authentik Stages.User Login + * `authentik.stages.user_logout` - authentik Stages.User Logout + * `authentik.stages.user_write` - authentik Stages.User Write + * `authentik.tenants` - authentik Tenants + * `authentik.blueprints` - authentik Blueprints + * `authentik.core` - authentik Core required: - name type: object @@ -33155,12 +33265,16 @@ components: designation: allOf: - $ref: '#/components/schemas/FlowDesignationEnum' - description: "Decides what this Flow is used for. For example, the Authentication\ - \ flow is redirect to when an un-authenticated user visits authentik.\n\ - \n* `authentication` - Authentication\n* `authorization` - Authorization\n\ - * `invalidation` - Invalidation\n* `enrollment` - Enrollment\n* `unenrollment`\ - \ - Unrenollment\n* `recovery` - Recovery\n* `stage_configuration` - Stage\ - \ Configuration" + description: |- + Decides what this Flow is used for. For example, the Authentication flow is redirect to when an un-authenticated user visits authentik. + + * `authentication` - Authentication + * `authorization` - Authorization + * `invalidation` - Invalidation + * `enrollment` - Enrollment + * `unenrollment` - Unrenollment + * `recovery` - Recovery + * `stage_configuration` - Stage Configuration background: description: |- Get the URL to the background image. If the name is /static or starts with http @@ -33300,8 +33414,9 @@ components: - diagram type: object FlowErrorChallenge: - description: "Challenge class when an unhandled error occurs during a stage.\ - \ Normal users\nare shown an error message, superusers are shown a full stacktrace." + description: |- + Challenge class when an unhandled error occurs during a stage. Normal users + are shown an error message, superusers are shown a full stacktrace. properties: type: default: native @@ -33352,19 +33467,19 @@ components: example: current_plan: session_id: session_id - next_planned_stage: null - current_stage: null + next_planned_stage: "" + current_stage: "" plan_context: key: "" plans: - session_id: session_id - next_planned_stage: null - current_stage: null + next_planned_stage: "" + current_stage: "" plan_context: key: "" - session_id: session_id - next_planned_stage: null - current_stage: null + next_planned_stage: "" + current_stage: "" plan_context: key: "" is_completed: true @@ -33385,15 +33500,19 @@ components: description: Serializer for an active FlowPlan example: session_id: session_id - next_planned_stage: null - current_stage: null + next_planned_stage: "" + current_stage: "" plan_context: key: "" properties: current_stage: - $ref: '#/components/schemas/FlowInspectorPlan_current_stage' + allOf: + - $ref: '#/components/schemas/FlowStageBinding' + readOnly: true next_planned_stage: - $ref: '#/components/schemas/FlowInspectorPlan_current_stage' + allOf: + - $ref: '#/components/schemas/FlowStageBinding' + readOnly: true plan_context: additionalProperties: {} description: "Get the plan's context, sanitized" @@ -33438,12 +33557,16 @@ components: designation: allOf: - $ref: '#/components/schemas/FlowDesignationEnum' - description: "Decides what this Flow is used for. For example, the Authentication\ - \ flow is redirect to when an un-authenticated user visits authentik.\n\ - \n* `authentication` - Authentication\n* `authorization` - Authorization\n\ - * `invalidation` - Invalidation\n* `enrollment` - Enrollment\n* `unenrollment`\ - \ - Unrenollment\n* `recovery` - Recovery\n* `stage_configuration` - Stage\ - \ Configuration" + description: |- + Decides what this Flow is used for. For example, the Authentication flow is redirect to when an un-authenticated user visits authentik. + + * `authentication` - Authentication + * `authorization` - Authorization + * `invalidation` - Invalidation + * `enrollment` - Enrollment + * `unenrollment` - Unrenollment + * `recovery` - Recovery + * `stage_configuration` - Stage Configuration policy_engine_mode: $ref: '#/components/schemas/PolicyEngineMode' compatibility_mode: @@ -33515,12 +33638,16 @@ components: designation: allOf: - $ref: '#/components/schemas/FlowDesignationEnum' - description: "Decides what this Flow is used for. For example, the Authentication\ - \ flow is redirect to when an un-authenticated user visits authentik.\n\ - \n* `authentication` - Authentication\n* `authorization` - Authorization\n\ - * `invalidation` - Invalidation\n* `enrollment` - Enrollment\n* `unenrollment`\ - \ - Unrenollment\n* `recovery` - Recovery\n* `stage_configuration` - Stage\ - \ Configuration" + description: |- + Decides what this Flow is used for. For example, the Authentication flow is redirect to when an un-authenticated user visits authentik. + + * `authentication` - Authentication + * `authorization` - Authorization + * `invalidation` - Invalidation + * `enrollment` - Enrollment + * `unenrollment` - Unrenollment + * `recovery` - Recovery + * `stage_configuration` - Stage Configuration background: description: |- Get the URL to the background image. If the name is /static or starts with http @@ -33586,12 +33713,16 @@ components: designation: allOf: - $ref: '#/components/schemas/FlowDesignationEnum' - description: "Decides what this Flow is used for. For example, the Authentication\ - \ flow is redirect to when an un-authenticated user visits authentik.\n\ - \n* `authentication` - Authentication\n* `authorization` - Authorization\n\ - * `invalidation` - Invalidation\n* `enrollment` - Enrollment\n* `unenrollment`\ - \ - Unrenollment\n* `recovery` - Recovery\n* `stage_configuration` - Stage\ - \ Configuration" + description: |- + Decides what this Flow is used for. For example, the Authentication flow is redirect to when an un-authenticated user visits authentik. + + * `authentication` - Authentication + * `authorization` - Authorization + * `invalidation` - Invalidation + * `enrollment` - Enrollment + * `unenrollment` - Unrenollment + * `recovery` - Recovery + * `stage_configuration` - Stage Configuration policy_engine_mode: $ref: '#/components/schemas/PolicyEngineMode' compatibility_mode: @@ -33624,7 +33755,7 @@ components: evaluate_on_plan: true re_evaluate_policies: true invalid_response_action: "" - stage_obj: null + stage_obj: "" pk: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 target: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 order: -1803530559 @@ -33645,7 +33776,9 @@ components: format: uuid type: string stage_obj: - $ref: '#/components/schemas/FlowStageBinding_stage_obj' + allOf: + - $ref: '#/components/schemas/Stage' + readOnly: true evaluate_on_plan: description: Evaluate policies during the Flow planning process. type: boolean @@ -33661,12 +33794,12 @@ components: invalid_response_action: allOf: - $ref: '#/components/schemas/InvalidResponseActionEnum' - description: "Configure how the flow executor should handle an invalid response\ - \ to a challenge. RETRY returns the error message and a similar challenge\ - \ to the executor. RESTART restarts the flow from the beginning, and RESTART_WITH_CONTEXT\ - \ restarts the flow while keeping the current context.\n\n* `retry` -\ - \ Retry\n* `restart` - Restart\n* `restart_with_context` - Restart With\ - \ Context" + description: |- + Configure how the flow executor should handle an invalid response to a challenge. RETRY returns the error message and a similar challenge to the executor. RESTART restarts the flow from the beginning, and RESTART_WITH_CONTEXT restarts the flow while keeping the current context. + + * `retry` - Retry + * `restart` - Restart + * `restart_with_context` - Restart With Context required: - order - pk @@ -33707,12 +33840,12 @@ components: invalid_response_action: allOf: - $ref: '#/components/schemas/InvalidResponseActionEnum' - description: "Configure how the flow executor should handle an invalid response\ - \ to a challenge. RETRY returns the error message and a similar challenge\ - \ to the executor. RESTART restarts the flow from the beginning, and RESTART_WITH_CONTEXT\ - \ restarts the flow while keeping the current context.\n\n* `retry` -\ - \ Retry\n* `restart` - Restart\n* `restart_with_context` - Restart With\ - \ Context" + description: |- + Configure how the flow executor should handle an invalid response to a challenge. RETRY returns the error message and a similar challenge to the executor. RESTART restarts the flow from the beginning, and RESTART_WITH_CONTEXT restarts the flow while keeping the current context. + + * `retry` - Retry + * `restart` - Restart + * `restart_with_context` - Restart With Context required: - order - stage @@ -34252,9 +34385,9 @@ components: expires: 2000-01-23T04:56:07.000+00:00 name: name single_use: true - flow_obj: null + flow_obj: "" pk: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - created_by: null + created_by: "" flow: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 properties: pk: @@ -34273,7 +34406,9 @@ components: additionalProperties: {} type: object created_by: - $ref: '#/components/schemas/Invitation_created_by' + allOf: + - $ref: '#/components/schemas/GroupMember' + readOnly: true single_use: description: "When enabled, the invitation will be deleted after usage." type: boolean @@ -34283,7 +34418,9 @@ components: nullable: true type: string flow_obj: - $ref: '#/components/schemas/Invitation_flow_obj' + allOf: + - $ref: '#/components/schemas/Flow' + readOnly: true required: - created_by - flow_obj @@ -34437,8 +34574,9 @@ components: - name type: object IssuerModeEnum: - description: "* `global` - Same identifier is used for all providers\n* `per_provider`\ - \ - Each provider has a different issuer, based on the application slug." + description: |- + * `global` - Same identifier is used for all providers + * `per_provider` - Each provider has a different issuer, based on the application slug. enum: - global - per_provider @@ -35011,15 +35149,14 @@ components: user_matching_mode: allOf: - $ref: '#/components/schemas/UserMatchingModeEnum' - description: "How the source determines if an existing user should be authenticated\ - \ or a new user enrolled.\n\n* `identifier` - Use the source-specific\ - \ identifier\n* `email_link` - Link to a user with identical email address.\ - \ Can have security implications when a source doesn't validate email\ - \ addresses.\n* `email_deny` - Use the user's email address, but deny\ - \ enrollment when the email address already exists.\n* `username_link`\ - \ - Link to a user with identical username. Can have security implications\ - \ when a username is used with another source.\n* `username_deny` - Use\ - \ the user's username, but deny enrollment when the username already exists." + description: |- + How the source determines if an existing user should be authenticated or a new user enrolled. + + * `identifier` - Use the source-specific identifier + * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. + * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. + * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. + * `username_deny` - Use the user's username, but deny enrollment when the username already exists. managed: description: "Objects which are managed by authentik. These objects are\ \ created and updated automatically. This is flag only indicates that\ @@ -35172,15 +35309,14 @@ components: user_matching_mode: allOf: - $ref: '#/components/schemas/UserMatchingModeEnum' - description: "How the source determines if an existing user should be authenticated\ - \ or a new user enrolled.\n\n* `identifier` - Use the source-specific\ - \ identifier\n* `email_link` - Link to a user with identical email address.\ - \ Can have security implications when a source doesn't validate email\ - \ addresses.\n* `email_deny` - Use the user's email address, but deny\ - \ enrollment when the email address already exists.\n* `username_link`\ - \ - Link to a user with identical username. Can have security implications\ - \ when a username is used with another source.\n* `username_deny` - Use\ - \ the user's username, but deny enrollment when the username already exists." + description: |- + How the source determines if an existing user should be authenticated or a new user enrolled. + + * `identifier` - Use the source-specific identifier + * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. + * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. + * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. + * `username_deny` - Use the user's username, but deny enrollment when the username already exists. user_path_template: minLength: 1 type: string @@ -35458,7 +35594,7 @@ components: transports: - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - group_obj: null + group_obj: "" name: name pk: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 group: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 @@ -35494,7 +35630,9 @@ components: nullable: true type: string group_obj: - $ref: '#/components/schemas/NotificationRule_group_obj' + allOf: + - $ref: '#/components/schemas/Group' + readOnly: true required: - group_obj - name @@ -35788,19 +35926,22 @@ components: sub_mode: allOf: - $ref: '#/components/schemas/SubModeEnum' - description: "Configure what data should be used as unique User Identifier.\ - \ For most cases, the default should be fine.\n\n* `hashed_user_id` -\ - \ Based on the Hashed User ID\n* `user_id` - Based on user ID\n* `user_username`\ - \ - Based on the username\n* `user_email` - Based on the User's Email.\ - \ This is recommended over the UPN method.\n* `user_upn` - Based on the\ - \ User's UPN, only works if user has a 'upn' attribute set. Use this method\ - \ only if you have different UPN and Mail domains." + description: |- + Configure what data should be used as unique User Identifier. For most cases, the default should be fine. + + * `hashed_user_id` - Based on the Hashed User ID + * `user_id` - Based on user ID + * `user_username` - Based on the username + * `user_email` - Based on the User's Email. This is recommended over the UPN method. + * `user_upn` - Based on the User's UPN, only works if user has a 'upn' attribute set. Use this method only if you have different UPN and Mail domains. issuer_mode: allOf: - $ref: '#/components/schemas/IssuerModeEnum' - description: "Configure how the issuer field of the ID Token should be filled.\n\ - \n* `global` - Same identifier is used for all providers\n* `per_provider`\ - \ - Each provider has a different issuer, based on the application slug." + description: |- + Configure how the issuer field of the ID Token should be filled. + + * `global` - Same identifier is used for all providers + * `per_provider` - Each provider has a different issuer, based on the application slug. jwks_sources: items: format: uuid @@ -35908,19 +36049,22 @@ components: sub_mode: allOf: - $ref: '#/components/schemas/SubModeEnum' - description: "Configure what data should be used as unique User Identifier.\ - \ For most cases, the default should be fine.\n\n* `hashed_user_id` -\ - \ Based on the Hashed User ID\n* `user_id` - Based on user ID\n* `user_username`\ - \ - Based on the username\n* `user_email` - Based on the User's Email.\ - \ This is recommended over the UPN method.\n* `user_upn` - Based on the\ - \ User's UPN, only works if user has a 'upn' attribute set. Use this method\ - \ only if you have different UPN and Mail domains." + description: |- + Configure what data should be used as unique User Identifier. For most cases, the default should be fine. + + * `hashed_user_id` - Based on the Hashed User ID + * `user_id` - Based on user ID + * `user_username` - Based on the username + * `user_email` - Based on the User's Email. This is recommended over the UPN method. + * `user_upn` - Based on the User's UPN, only works if user has a 'upn' attribute set. Use this method only if you have different UPN and Mail domains. issuer_mode: allOf: - $ref: '#/components/schemas/IssuerModeEnum' - description: "Configure how the issuer field of the ID Token should be filled.\n\ - \n* `global` - Same identifier is used for all providers\n* `per_provider`\ - \ - Each provider has a different issuer, based on the application slug." + description: |- + Configure how the issuer field of the ID Token should be filled. + + * `global` - Same identifier is used for all providers + * `per_provider` - Each provider has a different issuer, based on the application slug. jwks_sources: items: format: uuid @@ -36043,7 +36187,7 @@ components: icon: icon oidc_jwks: key: "" - type: null + type: "" additional_scopes: additional_scopes enabled: true callback_url: callback_url @@ -36110,15 +36254,14 @@ components: user_matching_mode: allOf: - $ref: '#/components/schemas/UserMatchingModeEnum' - description: "How the source determines if an existing user should be authenticated\ - \ or a new user enrolled.\n\n* `identifier` - Use the source-specific\ - \ identifier\n* `email_link` - Link to a user with identical email address.\ - \ Can have security implications when a source doesn't validate email\ - \ addresses.\n* `email_deny` - Use the user's email address, but deny\ - \ enrollment when the email address already exists.\n* `username_link`\ - \ - Link to a user with identical username. Can have security implications\ - \ when a username is used with another source.\n* `username_deny` - Use\ - \ the user's username, but deny enrollment when the username already exists." + description: |- + How the source determines if an existing user should be authenticated or a new user enrolled. + + * `identifier` - Use the source-specific identifier + * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. + * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. + * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. + * `username_deny` - Use the user's username, but deny enrollment when the username already exists. managed: description: "Objects which are managed by authentik. These objects are\ \ created and updated automatically. This is flag only indicates that\ @@ -36170,7 +36313,9 @@ components: additional_scopes: type: string type: - $ref: '#/components/schemas/OAuthSource_type' + allOf: + - $ref: '#/components/schemas/SourceType' + readOnly: true oidc_well_known_url: type: string oidc_jwks_url: @@ -36244,15 +36389,14 @@ components: user_matching_mode: allOf: - $ref: '#/components/schemas/UserMatchingModeEnum' - description: "How the source determines if an existing user should be authenticated\ - \ or a new user enrolled.\n\n* `identifier` - Use the source-specific\ - \ identifier\n* `email_link` - Link to a user with identical email address.\ - \ Can have security implications when a source doesn't validate email\ - \ addresses.\n* `email_deny` - Use the user's email address, but deny\ - \ enrollment when the email address already exists.\n* `username_link`\ - \ - Link to a user with identical username. Can have security implications\ - \ when a username is used with another source.\n* `username_deny` - Use\ - \ the user's username, but deny enrollment when the username already exists." + description: |- + How the source determines if an existing user should be authenticated or a new user enrolled. + + * `identifier` - Use the source-specific identifier + * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. + * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. + * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. + * `username_deny` - Use the user's username, but deny enrollment when the username already exists. user_path_template: minLength: 1 type: string @@ -36355,7 +36499,7 @@ components: Outpost: description: Outpost Serializer example: - service_connection_obj: null + service_connection_obj: "" providers_obj: - authentication_flow: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 component: component @@ -36420,7 +36564,9 @@ components: nullable: true type: string service_connection_obj: - $ref: '#/components/schemas/Outpost_service_connection_obj' + allOf: + - $ref: '#/components/schemas/ServiceConnection' + readOnly: true token_identifier: description: Get Token identifier readOnly: true @@ -36575,7 +36721,7 @@ components: end_index: 7.061401241503109 total_pages: 5.637376656633329 results: - - provider_obj: null + - provider_obj: "" meta_launch_url: https://openapi-generator.tech meta_icon: meta_icon meta_publisher: meta_publisher @@ -36588,7 +36734,7 @@ components: pk: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 slug: slug group: group - - provider_obj: null + - provider_obj: "" meta_launch_url: https://openapi-generator.tech meta_icon: meta_icon meta_publisher: meta_publisher @@ -38287,7 +38433,7 @@ components: evaluate_on_plan: true re_evaluate_policies: true invalid_response_action: "" - stage_obj: null + stage_obj: "" pk: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 target: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 order: -1803530559 @@ -38297,7 +38443,7 @@ components: evaluate_on_plan: true re_evaluate_policies: true invalid_response_action: "" - stage_obj: null + stage_obj: "" pk: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 target: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 order: -1803530559 @@ -38520,18 +38666,18 @@ components: expires: 2000-01-23T04:56:07.000+00:00 name: name single_use: true - flow_obj: null + flow_obj: "" pk: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - created_by: null + created_by: "" flow: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - fixed_data: key: "" expires: 2000-01-23T04:56:07.000+00:00 name: name single_use: true - flow_obj: null + flow_obj: "" pk: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - created_by: null + created_by: "" flow: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 properties: pagination: @@ -38995,7 +39141,7 @@ components: transports: - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - group_obj: null + group_obj: "" name: name pk: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 group: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 @@ -39003,7 +39149,7 @@ components: transports: - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - group_obj: null + group_obj: "" name: name pk: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 group: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 @@ -39177,7 +39323,7 @@ components: icon: icon oidc_jwks: key: "" - type: null + type: "" additional_scopes: additional_scopes enabled: true callback_url: callback_url @@ -39205,7 +39351,7 @@ components: icon: icon oidc_jwks: key: "" - type: null + type: "" additional_scopes: additional_scopes enabled: true callback_url: callback_url @@ -39247,7 +39393,7 @@ components: end_index: 7.061401241503109 total_pages: 5.637376656633329 results: - - service_connection_obj: null + - service_connection_obj: "" providers_obj: - authentication_flow: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 component: component @@ -39286,7 +39432,7 @@ components: providers: - 0 - 0 - - service_connection_obj: null + - service_connection_obj: "" providers_obj: - authentication_flow: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 component: component @@ -39549,12 +39695,12 @@ components: results: - identifier: identifier pk: 0 - source: null + source: "" plex_token: plex_token user: 6 - identifier: identifier pk: 0 - source: null + source: "" plex_token: plex_token user: 6 properties: @@ -39643,10 +39789,10 @@ components: end_index: 7.061401241503109 total_pages: 5.637376656633329 results: - - user_obj: null + - user_obj: "" negate: true - group_obj: null - policy_obj: null + group_obj: "" + policy_obj: "" pk: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 user: 0 enabled: true @@ -39655,10 +39801,10 @@ components: group: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 target: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 order: 441289069 - - user_obj: null + - user_obj: "" negate: true - group_obj: null - policy_obj: null + group_obj: "" + policy_obj: "" pk: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 user: 0 enabled: true @@ -40087,7 +40233,7 @@ components: client_id: client_id mode: "" internal_host: https://openapi-generator.tech - oidc_configuration: null + oidc_configuration: "" basic_auth_enabled: true basic_auth_user_attribute: basic_auth_user_attribute access_token_validity: 6.027456183070403 @@ -40110,7 +40256,7 @@ components: client_id: client_id mode: "" internal_host: https://openapi-generator.tech - oidc_configuration: null + oidc_configuration: "" basic_auth_enabled: true basic_auth_user_attribute: basic_auth_user_attribute access_token_validity: 6.027456183070403 @@ -41052,7 +41198,7 @@ components: total_pages: 5.637376656633329 results: - identifier: identifier - user_obj: null + user_obj: "" expires: 2000-01-23T04:56:07.000+00:00 expiring: true managed: managed @@ -41061,7 +41207,7 @@ components: intent: null user: 0 - identifier: identifier - user_obj: null + user_obj: "" expires: 2000-01-23T04:56:07.000+00:00 expiring: true managed: managed @@ -41253,7 +41399,7 @@ components: results: - expires: 2000-01-23T04:56:07.000+00:00 application: - provider_obj: null + provider_obj: "" meta_launch_url: https://openapi-generator.tech meta_icon: meta_icon meta_publisher: meta_publisher @@ -41303,7 +41449,7 @@ components: username: username - expires: 2000-01-23T04:56:07.000+00:00 application: - provider_obj: null + provider_obj: "" meta_launch_url: https://openapi-generator.tech meta_icon: meta_icon meta_publisher: meta_publisher @@ -41719,11 +41865,11 @@ components: results: - identifier: identifier pk: 0 - source: null + source: "" user: 6 - identifier: identifier pk: 0 - source: null + source: "" user: 6 properties: pagination: @@ -41749,11 +41895,11 @@ components: results: - identifier: identifier pk: 0 - source: null + source: "" user: 6 - identifier: identifier pk: 0 - source: null + source: "" user: 6 properties: pagination: @@ -41779,11 +41925,11 @@ components: results: - created: 2000-01-23T04:56:07.000+00:00 pk: 0 - source: null + source: "" user: 6 - created: 2000-01-23T04:56:07.000+00:00 pk: 0 - source: null + source: "" user: 6 properties: pagination: @@ -43130,22 +43276,36 @@ components: action: allOf: - $ref: '#/components/schemas/EventActions' - description: "Match created events with this action type. When left empty,\ - \ all action types will be matched.\n\n* `login` - Login\n* `login_failed`\ - \ - Login Failed\n* `logout` - Logout\n* `user_write` - User Write\n*\ - \ `suspicious_request` - Suspicious Request\n* `password_set` - Password\ - \ Set\n* `secret_view` - Secret View\n* `secret_rotate` - Secret Rotate\n\ - * `invitation_used` - Invite Used\n* `authorize_application` - Authorize\ - \ Application\n* `source_linked` - Source Linked\n* `impersonation_started`\ - \ - Impersonation Started\n* `impersonation_ended` - Impersonation Ended\n\ - * `flow_execution` - Flow Execution\n* `policy_execution` - Policy Execution\n\ - * `policy_exception` - Policy Exception\n* `property_mapping_exception`\ - \ - Property Mapping Exception\n* `system_task_execution` - System Task\ - \ Execution\n* `system_task_exception` - System Task Exception\n* `system_exception`\ - \ - System Exception\n* `configuration_error` - Configuration Error\n\ - * `model_created` - Model Created\n* `model_updated` - Model Updated\n\ - * `model_deleted` - Model Deleted\n* `email_sent` - Email Sent\n* `update_available`\ - \ - Update Available\n* `custom_` - Custom Prefix" + description: |- + Match created events with this action type. When left empty, all action types will be matched. + + * `login` - Login + * `login_failed` - Login Failed + * `logout` - Logout + * `user_write` - User Write + * `suspicious_request` - Suspicious Request + * `password_set` - Password Set + * `secret_view` - Secret View + * `secret_rotate` - Secret Rotate + * `invitation_used` - Invite Used + * `authorize_application` - Authorize Application + * `source_linked` - Source Linked + * `impersonation_started` - Impersonation Started + * `impersonation_ended` - Impersonation Ended + * `flow_execution` - Flow Execution + * `policy_execution` - Policy Execution + * `policy_exception` - Policy Exception + * `property_mapping_exception` - Property Mapping Exception + * `system_task_execution` - System Task Execution + * `system_task_exception` - System Task Exception + * `system_exception` - System Exception + * `configuration_error` - Configuration Error + * `model_created` - Model Created + * `model_updated` - Model Updated + * `model_deleted` - Model Deleted + * `email_sent` - Email Sent + * `update_available` - Update Available + * `custom_` - Custom Prefix client_ip: description: "Matches Event's Client IP (strict matching, for network matching\ \ use an Expression Policy)" @@ -43153,43 +43313,56 @@ components: app: allOf: - $ref: '#/components/schemas/AppEnum' - description: "Match events created by selected application. When left empty,\ - \ all applications are matched.\n\n* `authentik.admin` - authentik Admin\n\ - * `authentik.api` - authentik API\n* `authentik.crypto` - authentik Crypto\n\ - * `authentik.events` - authentik Events\n* `authentik.flows` - authentik\ - \ Flows\n* `authentik.lib` - authentik lib\n* `authentik.outposts` - authentik\ - \ Outpost\n* `authentik.policies.dummy` - authentik Policies.Dummy\n*\ - \ `authentik.policies.event_matcher` - authentik Policies.Event Matcher\n\ - * `authentik.policies.expiry` - authentik Policies.Expiry\n* `authentik.policies.expression`\ - \ - authentik Policies.Expression\n* `authentik.policies.password` - authentik\ - \ Policies.Password\n* `authentik.policies.reputation` - authentik Policies.Reputation\n\ - * `authentik.policies` - authentik Policies\n* `authentik.providers.ldap`\ - \ - authentik Providers.LDAP\n* `authentik.providers.oauth2` - authentik\ - \ Providers.OAuth2\n* `authentik.providers.proxy` - authentik Providers.Proxy\n\ - * `authentik.providers.radius` - authentik Providers.Radius\n* `authentik.providers.saml`\ - \ - authentik Providers.SAML\n* `authentik.providers.scim` - authentik\ - \ Providers.SCIM\n* `authentik.recovery` - authentik Recovery\n* `authentik.sources.ldap`\ - \ - authentik Sources.LDAP\n* `authentik.sources.oauth` - authentik Sources.OAuth\n\ - * `authentik.sources.plex` - authentik Sources.Plex\n* `authentik.sources.saml`\ - \ - authentik Sources.SAML\n* `authentik.stages.authenticator_duo` - authentik\ - \ Stages.Authenticator.Duo\n* `authentik.stages.authenticator_sms` - authentik\ - \ Stages.Authenticator.SMS\n* `authentik.stages.authenticator_static`\ - \ - authentik Stages.Authenticator.Static\n* `authentik.stages.authenticator_totp`\ - \ - authentik Stages.Authenticator.TOTP\n* `authentik.stages.authenticator_validate`\ - \ - authentik Stages.Authenticator.Validate\n* `authentik.stages.authenticator_webauthn`\ - \ - authentik Stages.Authenticator.WebAuthn\n* `authentik.stages.captcha`\ - \ - authentik Stages.Captcha\n* `authentik.stages.consent` - authentik\ - \ Stages.Consent\n* `authentik.stages.deny` - authentik Stages.Deny\n\ - * `authentik.stages.dummy` - authentik Stages.Dummy\n* `authentik.stages.email`\ - \ - authentik Stages.Email\n* `authentik.stages.identification` - authentik\ - \ Stages.Identification\n* `authentik.stages.invitation` - authentik Stages.User\ - \ Invitation\n* `authentik.stages.password` - authentik Stages.Password\n\ - * `authentik.stages.prompt` - authentik Stages.Prompt\n* `authentik.stages.user_delete`\ - \ - authentik Stages.User Delete\n* `authentik.stages.user_login` - authentik\ - \ Stages.User Login\n* `authentik.stages.user_logout` - authentik Stages.User\ - \ Logout\n* `authentik.stages.user_write` - authentik Stages.User Write\n\ - * `authentik.tenants` - authentik Tenants\n* `authentik.blueprints` -\ - \ authentik Blueprints\n* `authentik.core` - authentik Core" + description: |- + Match events created by selected application. When left empty, all applications are matched. + + * `authentik.admin` - authentik Admin + * `authentik.api` - authentik API + * `authentik.crypto` - authentik Crypto + * `authentik.events` - authentik Events + * `authentik.flows` - authentik Flows + * `authentik.lib` - authentik lib + * `authentik.outposts` - authentik Outpost + * `authentik.policies.dummy` - authentik Policies.Dummy + * `authentik.policies.event_matcher` - authentik Policies.Event Matcher + * `authentik.policies.expiry` - authentik Policies.Expiry + * `authentik.policies.expression` - authentik Policies.Expression + * `authentik.policies.password` - authentik Policies.Password + * `authentik.policies.reputation` - authentik Policies.Reputation + * `authentik.policies` - authentik Policies + * `authentik.providers.ldap` - authentik Providers.LDAP + * `authentik.providers.oauth2` - authentik Providers.OAuth2 + * `authentik.providers.proxy` - authentik Providers.Proxy + * `authentik.providers.radius` - authentik Providers.Radius + * `authentik.providers.saml` - authentik Providers.SAML + * `authentik.providers.scim` - authentik Providers.SCIM + * `authentik.recovery` - authentik Recovery + * `authentik.sources.ldap` - authentik Sources.LDAP + * `authentik.sources.oauth` - authentik Sources.OAuth + * `authentik.sources.plex` - authentik Sources.Plex + * `authentik.sources.saml` - authentik Sources.SAML + * `authentik.stages.authenticator_duo` - authentik Stages.Authenticator.Duo + * `authentik.stages.authenticator_sms` - authentik Stages.Authenticator.SMS + * `authentik.stages.authenticator_static` - authentik Stages.Authenticator.Static + * `authentik.stages.authenticator_totp` - authentik Stages.Authenticator.TOTP + * `authentik.stages.authenticator_validate` - authentik Stages.Authenticator.Validate + * `authentik.stages.authenticator_webauthn` - authentik Stages.Authenticator.WebAuthn + * `authentik.stages.captcha` - authentik Stages.Captcha + * `authentik.stages.consent` - authentik Stages.Consent + * `authentik.stages.deny` - authentik Stages.Deny + * `authentik.stages.dummy` - authentik Stages.Dummy + * `authentik.stages.email` - authentik Stages.Email + * `authentik.stages.identification` - authentik Stages.Identification + * `authentik.stages.invitation` - authentik Stages.User Invitation + * `authentik.stages.password` - authentik Stages.Password + * `authentik.stages.prompt` - authentik Stages.Prompt + * `authentik.stages.user_delete` - authentik Stages.User Delete + * `authentik.stages.user_login` - authentik Stages.User Login + * `authentik.stages.user_logout` - authentik Stages.User Logout + * `authentik.stages.user_write` - authentik Stages.User Write + * `authentik.tenants` - authentik Tenants + * `authentik.blueprints` - authentik Blueprints + * `authentik.core` - authentik Core type: object PatchedEventRequest: description: Event Serializer @@ -43274,12 +43447,16 @@ components: designation: allOf: - $ref: '#/components/schemas/FlowDesignationEnum' - description: "Decides what this Flow is used for. For example, the Authentication\ - \ flow is redirect to when an un-authenticated user visits authentik.\n\ - \n* `authentication` - Authentication\n* `authorization` - Authorization\n\ - * `invalidation` - Invalidation\n* `enrollment` - Enrollment\n* `unenrollment`\ - \ - Unrenollment\n* `recovery` - Recovery\n* `stage_configuration` - Stage\ - \ Configuration" + description: |- + Decides what this Flow is used for. For example, the Authentication flow is redirect to when an un-authenticated user visits authentik. + + * `authentication` - Authentication + * `authorization` - Authorization + * `invalidation` - Invalidation + * `enrollment` - Enrollment + * `unenrollment` - Unrenollment + * `recovery` - Recovery + * `stage_configuration` - Stage Configuration policy_engine_mode: $ref: '#/components/schemas/PolicyEngineMode' compatibility_mode: @@ -43340,12 +43517,12 @@ components: invalid_response_action: allOf: - $ref: '#/components/schemas/InvalidResponseActionEnum' - description: "Configure how the flow executor should handle an invalid response\ - \ to a challenge. RETRY returns the error message and a similar challenge\ - \ to the executor. RESTART restarts the flow from the beginning, and RESTART_WITH_CONTEXT\ - \ restarts the flow while keeping the current context.\n\n* `retry` -\ - \ Retry\n* `restart` - Restart\n* `restart_with_context` - Restart With\ - \ Context" + description: |- + Configure how the flow executor should handle an invalid response to a challenge. RETRY returns the error message and a similar challenge to the executor. RESTART restarts the flow from the beginning, and RESTART_WITH_CONTEXT restarts the flow while keeping the current context. + + * `retry` - Retry + * `restart` - Restart + * `restart_with_context` - Restart With Context type: object PatchedGroupRequest: description: Group Serializer @@ -43720,15 +43897,14 @@ components: user_matching_mode: allOf: - $ref: '#/components/schemas/UserMatchingModeEnum' - description: "How the source determines if an existing user should be authenticated\ - \ or a new user enrolled.\n\n* `identifier` - Use the source-specific\ - \ identifier\n* `email_link` - Link to a user with identical email address.\ - \ Can have security implications when a source doesn't validate email\ - \ addresses.\n* `email_deny` - Use the user's email address, but deny\ - \ enrollment when the email address already exists.\n* `username_link`\ - \ - Link to a user with identical username. Can have security implications\ - \ when a username is used with another source.\n* `username_deny` - Use\ - \ the user's username, but deny enrollment when the username already exists." + description: |- + How the source determines if an existing user should be authenticated or a new user enrolled. + + * `identifier` - Use the source-specific identifier + * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. + * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. + * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. + * `username_deny` - Use the user's username, but deny enrollment when the username already exists. user_path_template: minLength: 1 type: string @@ -43986,19 +44162,22 @@ components: sub_mode: allOf: - $ref: '#/components/schemas/SubModeEnum' - description: "Configure what data should be used as unique User Identifier.\ - \ For most cases, the default should be fine.\n\n* `hashed_user_id` -\ - \ Based on the Hashed User ID\n* `user_id` - Based on user ID\n* `user_username`\ - \ - Based on the username\n* `user_email` - Based on the User's Email.\ - \ This is recommended over the UPN method.\n* `user_upn` - Based on the\ - \ User's UPN, only works if user has a 'upn' attribute set. Use this method\ - \ only if you have different UPN and Mail domains." + description: |- + Configure what data should be used as unique User Identifier. For most cases, the default should be fine. + + * `hashed_user_id` - Based on the Hashed User ID + * `user_id` - Based on user ID + * `user_username` - Based on the username + * `user_email` - Based on the User's Email. This is recommended over the UPN method. + * `user_upn` - Based on the User's UPN, only works if user has a 'upn' attribute set. Use this method only if you have different UPN and Mail domains. issuer_mode: allOf: - $ref: '#/components/schemas/IssuerModeEnum' - description: "Configure how the issuer field of the ID Token should be filled.\n\ - \n* `global` - Same identifier is used for all providers\n* `per_provider`\ - \ - Each provider has a different issuer, based on the application slug." + description: |- + Configure how the issuer field of the ID Token should be filled. + + * `global` - Same identifier is used for all providers + * `per_provider` - Each provider has a different issuer, based on the application slug. jwks_sources: items: format: uuid @@ -44059,15 +44238,14 @@ components: user_matching_mode: allOf: - $ref: '#/components/schemas/UserMatchingModeEnum' - description: "How the source determines if an existing user should be authenticated\ - \ or a new user enrolled.\n\n* `identifier` - Use the source-specific\ - \ identifier\n* `email_link` - Link to a user with identical email address.\ - \ Can have security implications when a source doesn't validate email\ - \ addresses.\n* `email_deny` - Use the user's email address, but deny\ - \ enrollment when the email address already exists.\n* `username_link`\ - \ - Link to a user with identical username. Can have security implications\ - \ when a username is used with another source.\n* `username_deny` - Use\ - \ the user's username, but deny enrollment when the username already exists." + description: |- + How the source determines if an existing user should be authenticated or a new user enrolled. + + * `identifier` - Use the source-specific identifier + * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. + * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. + * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. + * `username_deny` - Use the user's username, but deny enrollment when the username already exists. user_path_template: minLength: 1 type: string @@ -44363,15 +44541,14 @@ components: user_matching_mode: allOf: - $ref: '#/components/schemas/UserMatchingModeEnum' - description: "How the source determines if an existing user should be authenticated\ - \ or a new user enrolled.\n\n* `identifier` - Use the source-specific\ - \ identifier\n* `email_link` - Link to a user with identical email address.\ - \ Can have security implications when a source doesn't validate email\ - \ addresses.\n* `email_deny` - Use the user's email address, but deny\ - \ enrollment when the email address already exists.\n* `username_link`\ - \ - Link to a user with identical username. Can have security implications\ - \ when a username is used with another source.\n* `username_deny` - Use\ - \ the user's username, but deny enrollment when the username already exists." + description: |- + How the source determines if an existing user should be authenticated or a new user enrolled. + + * `identifier` - Use the source-specific identifier + * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. + * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. + * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. + * `username_deny` - Use the user's username, but deny enrollment when the username already exists. user_path_template: minLength: 1 type: string @@ -44924,15 +45101,14 @@ components: user_matching_mode: allOf: - $ref: '#/components/schemas/UserMatchingModeEnum' - description: "How the source determines if an existing user should be authenticated\ - \ or a new user enrolled.\n\n* `identifier` - Use the source-specific\ - \ identifier\n* `email_link` - Link to a user with identical email address.\ - \ Can have security implications when a source doesn't validate email\ - \ addresses.\n* `email_deny` - Use the user's email address, but deny\ - \ enrollment when the email address already exists.\n* `username_link`\ - \ - Link to a user with identical username. Can have security implications\ - \ when a username is used with another source.\n* `username_deny` - Use\ - \ the user's username, but deny enrollment when the username already exists." + description: |- + How the source determines if an existing user should be authenticated or a new user enrolled. + + * `identifier` - Use the source-specific identifier + * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. + * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. + * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. + * `username_deny` - Use the user's username, but deny enrollment when the username already exists. user_path_template: minLength: 1 type: string @@ -44962,13 +45138,14 @@ components: name_id_policy: allOf: - $ref: '#/components/schemas/NameIdPolicyEnum' - description: "NameID Policy sent to the IdP. Can be unset, in which case\ - \ no Policy is sent.\n\n* `urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress`\ - \ - Email\n* `urn:oasis:names:tc:SAML:2.0:nameid-format:persistent` -\ - \ Persistent\n* `urn:oasis:names:tc:SAML:2.0:nameid-format:X509SubjectName`\ - \ - X509\n* `urn:oasis:names:tc:SAML:2.0:nameid-format:WindowsDomainQualifiedName`\ - \ - Windows\n* `urn:oasis:names:tc:SAML:2.0:nameid-format:transient` -\ - \ Transient" + description: |- + NameID Policy sent to the IdP. Can be unset, in which case no Policy is sent. + + * `urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress` - Email + * `urn:oasis:names:tc:SAML:2.0:nameid-format:persistent` - Persistent + * `urn:oasis:names:tc:SAML:2.0:nameid-format:X509SubjectName` - X509 + * `urn:oasis:names:tc:SAML:2.0:nameid-format:WindowsDomainQualifiedName` - Windows + * `urn:oasis:names:tc:SAML:2.0:nameid-format:transient` - Transient binding_type: $ref: '#/components/schemas/BindingTypeEnum' signing_kp: @@ -45591,15 +45768,14 @@ components: user_matching_mode: allOf: - $ref: '#/components/schemas/UserMatchingModeEnum' - description: "How the source determines if an existing user should be authenticated\ - \ or a new user enrolled.\n\n* `identifier` - Use the source-specific\ - \ identifier\n* `email_link` - Link to a user with identical email address.\ - \ Can have security implications when a source doesn't validate email\ - \ addresses.\n* `email_deny` - Use the user's email address, but deny\ - \ enrollment when the email address already exists.\n* `username_link`\ - \ - Link to a user with identical username. Can have security implications\ - \ when a username is used with another source.\n* `username_deny` - Use\ - \ the user's username, but deny enrollment when the username already exists." + description: |- + How the source determines if an existing user should be authenticated or a new user enrolled. + + * `identifier` - Use the source-specific identifier + * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. + * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. + * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. + * `username_deny` - Use the user's username, but deny enrollment when the username already exists. managed: description: "Objects which are managed by authentik. These objects are\ \ created and updated automatically. This is flag only indicates that\ @@ -45651,7 +45827,7 @@ components: example: identifier: identifier pk: 0 - source: null + source: "" plex_token: plex_token user: 6 properties: @@ -45663,7 +45839,9 @@ components: readOnly: true type: integer source: - $ref: '#/components/schemas/PlexSourceConnection_source' + allOf: + - $ref: '#/components/schemas/Source' + readOnly: true identifier: type: string plex_token: @@ -45736,15 +45914,14 @@ components: user_matching_mode: allOf: - $ref: '#/components/schemas/UserMatchingModeEnum' - description: "How the source determines if an existing user should be authenticated\ - \ or a new user enrolled.\n\n* `identifier` - Use the source-specific\ - \ identifier\n* `email_link` - Link to a user with identical email address.\ - \ Can have security implications when a source doesn't validate email\ - \ addresses.\n* `email_deny` - Use the user's email address, but deny\ - \ enrollment when the email address already exists.\n* `username_link`\ - \ - Link to a user with identical username. Can have security implications\ - \ when a username is used with another source.\n* `username_deny` - Use\ - \ the user's username, but deny enrollment when the username already exists." + description: |- + How the source determines if an existing user should be authenticated or a new user enrolled. + + * `identifier` - Use the source-specific identifier + * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. + * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. + * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. + * `username_deny` - Use the user's username, but deny enrollment when the username already exists. user_path_template: minLength: 1 type: string @@ -45837,10 +46014,10 @@ components: PolicyBinding: description: PolicyBinding Serializer example: - user_obj: null + user_obj: "" negate: true - group_obj: null - policy_obj: null + group_obj: "" + policy_obj: "" pk: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 user: 0 enabled: true @@ -45867,11 +46044,17 @@ components: nullable: true type: integer policy_obj: - $ref: '#/components/schemas/PolicyBinding_policy_obj' + allOf: + - $ref: '#/components/schemas/Policy' + readOnly: true group_obj: - $ref: '#/components/schemas/NotificationRule_group_obj' + allOf: + - $ref: '#/components/schemas/Group' + readOnly: true user_obj: - $ref: '#/components/schemas/PolicyBinding_user_obj' + allOf: + - $ref: '#/components/schemas/User' + readOnly: true target: format: uuid type: string @@ -45942,8 +46125,9 @@ components: - target type: object PolicyEngineMode: - description: "* `all` - ALL, all policies must pass\n* `any` - ANY, any policy\ - \ must pass" + description: |- + * `all` - ALL, all policies must pass + * `any` - ANY, any policy must pass enum: - all - any @@ -46182,8 +46366,9 @@ components: type: object PromptChallengeResponseRequest: additionalProperties: {} - description: "Validate response, fields are dynamically created based\non the\ - \ stage" + description: |- + Validate response, fields are dynamically created based + on the stage properties: component: default: ak-stage-prompt @@ -46413,21 +46598,25 @@ components: - name type: object PromptTypeEnum: - description: "* `text` - Text: Simple Text input\n* `text_area` - Text area:\ - \ Multiline Text Input.\n* `text_read_only` - Text (read-only): Simple Text\ - \ input, but cannot be edited.\n* `text_area_read_only` - Text area (read-only):\ - \ Multiline Text input, but cannot be edited.\n* `username` - Username: Same\ - \ as Text input, but checks for and prevents duplicate usernames.\n* `email`\ - \ - Email: Text field with Email type.\n* `password` - Password: Masked input,\ - \ multiple inputs of this type on the same prompt need to be identical.\n\ - * `number` - Number\n* `checkbox` - Checkbox\n* `radio-button-group` - Fixed\ - \ choice field rendered as a group of radio buttons.\n* `dropdown` - Fixed\ - \ choice field rendered as a dropdown.\n* `date` - Date\n* `date-time` - Date\ - \ Time\n* `file` - File: File upload for arbitrary files. File content will\ - \ be available in flow context as data-URI\n* `separator` - Separator: Static\ - \ Separator Line\n* `hidden` - Hidden: Hidden field, can be used to insert\ - \ data into form.\n* `static` - Static: Static value, displayed as-is.\n*\ - \ `ak-locale` - authentik: Selection of locales authentik supports" + description: |- + * `text` - Text: Simple Text input + * `text_area` - Text area: Multiline Text Input. + * `text_read_only` - Text (read-only): Simple Text input, but cannot be edited. + * `text_area_read_only` - Text area (read-only): Multiline Text input, but cannot be edited. + * `username` - Username: Same as Text input, but checks for and prevents duplicate usernames. + * `email` - Email: Text field with Email type. + * `password` - Password: Masked input, multiple inputs of this type on the same prompt need to be identical. + * `number` - Number + * `checkbox` - Checkbox + * `radio-button-group` - Fixed choice field rendered as a group of radio buttons. + * `dropdown` - Fixed choice field rendered as a dropdown. + * `date` - Date + * `date-time` - Date Time + * `file` - File: File upload for arbitrary files. File content will be available in flow context as data-URI + * `separator` - Separator: Static Separator Line + * `hidden` - Hidden: Hidden field, can be used to insert data into form. + * `static` - Static: Static value, displayed as-is. + * `ak-locale` - authentik: Selection of locales authentik supports enum: - text - text_area @@ -46690,7 +46879,7 @@ components: client_id: client_id mode: "" internal_host: https://openapi-generator.tech - oidc_configuration: null + oidc_configuration: "" basic_auth_enabled: true basic_auth_user_attribute: basic_auth_user_attribute access_token_validity: 6.027456183070403 @@ -46726,7 +46915,9 @@ components: maxLength: 255 type: string oidc_configuration: - $ref: '#/components/schemas/ProxyOutpostConfig_oidc_configuration' + allOf: + - $ref: '#/components/schemas/OpenIDConnectConfiguration' + readOnly: true cookie_secret: type: string certificate: @@ -46774,8 +46965,9 @@ components: \ header and authenticate requests based on its value." type: boolean scopes_to_request: - description: "Get all the scope names the outpost should request,\nincluding\ - \ custom-defined ones" + description: |- + Get all the scope names the outpost should request, + including custom-defined ones items: type: string readOnly: true @@ -47914,15 +48106,14 @@ components: user_matching_mode: allOf: - $ref: '#/components/schemas/UserMatchingModeEnum' - description: "How the source determines if an existing user should be authenticated\ - \ or a new user enrolled.\n\n* `identifier` - Use the source-specific\ - \ identifier\n* `email_link` - Link to a user with identical email address.\ - \ Can have security implications when a source doesn't validate email\ - \ addresses.\n* `email_deny` - Use the user's email address, but deny\ - \ enrollment when the email address already exists.\n* `username_link`\ - \ - Link to a user with identical username. Can have security implications\ - \ when a username is used with another source.\n* `username_deny` - Use\ - \ the user's username, but deny enrollment when the username already exists." + description: |- + How the source determines if an existing user should be authenticated or a new user enrolled. + + * `identifier` - Use the source-specific identifier + * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. + * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. + * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. + * `username_deny` - Use the user's username, but deny enrollment when the username already exists. managed: description: "Objects which are managed by authentik. These objects are\ \ created and updated automatically. This is flag only indicates that\ @@ -47967,13 +48158,14 @@ components: name_id_policy: allOf: - $ref: '#/components/schemas/NameIdPolicyEnum' - description: "NameID Policy sent to the IdP. Can be unset, in which case\ - \ no Policy is sent.\n\n* `urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress`\ - \ - Email\n* `urn:oasis:names:tc:SAML:2.0:nameid-format:persistent` -\ - \ Persistent\n* `urn:oasis:names:tc:SAML:2.0:nameid-format:X509SubjectName`\ - \ - X509\n* `urn:oasis:names:tc:SAML:2.0:nameid-format:WindowsDomainQualifiedName`\ - \ - Windows\n* `urn:oasis:names:tc:SAML:2.0:nameid-format:transient` -\ - \ Transient" + description: |- + NameID Policy sent to the IdP. Can be unset, in which case no Policy is sent. + + * `urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress` - Email + * `urn:oasis:names:tc:SAML:2.0:nameid-format:persistent` - Persistent + * `urn:oasis:names:tc:SAML:2.0:nameid-format:X509SubjectName` - X509 + * `urn:oasis:names:tc:SAML:2.0:nameid-format:WindowsDomainQualifiedName` - Windows + * `urn:oasis:names:tc:SAML:2.0:nameid-format:transient` - Transient binding_type: $ref: '#/components/schemas/BindingTypeEnum' signing_kp: @@ -48056,15 +48248,14 @@ components: user_matching_mode: allOf: - $ref: '#/components/schemas/UserMatchingModeEnum' - description: "How the source determines if an existing user should be authenticated\ - \ or a new user enrolled.\n\n* `identifier` - Use the source-specific\ - \ identifier\n* `email_link` - Link to a user with identical email address.\ - \ Can have security implications when a source doesn't validate email\ - \ addresses.\n* `email_deny` - Use the user's email address, but deny\ - \ enrollment when the email address already exists.\n* `username_link`\ - \ - Link to a user with identical username. Can have security implications\ - \ when a username is used with another source.\n* `username_deny` - Use\ - \ the user's username, but deny enrollment when the username already exists." + description: |- + How the source determines if an existing user should be authenticated or a new user enrolled. + + * `identifier` - Use the source-specific identifier + * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. + * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. + * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. + * `username_deny` - Use the user's username, but deny enrollment when the username already exists. user_path_template: minLength: 1 type: string @@ -48094,13 +48285,14 @@ components: name_id_policy: allOf: - $ref: '#/components/schemas/NameIdPolicyEnum' - description: "NameID Policy sent to the IdP. Can be unset, in which case\ - \ no Policy is sent.\n\n* `urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress`\ - \ - Email\n* `urn:oasis:names:tc:SAML:2.0:nameid-format:persistent` -\ - \ Persistent\n* `urn:oasis:names:tc:SAML:2.0:nameid-format:X509SubjectName`\ - \ - X509\n* `urn:oasis:names:tc:SAML:2.0:nameid-format:WindowsDomainQualifiedName`\ - \ - Windows\n* `urn:oasis:names:tc:SAML:2.0:nameid-format:transient` -\ - \ Transient" + description: |- + NameID Policy sent to the IdP. Can be unset, in which case no Policy is sent. + + * `urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress` - Email + * `urn:oasis:names:tc:SAML:2.0:nameid-format:persistent` - Persistent + * `urn:oasis:names:tc:SAML:2.0:nameid-format:X509SubjectName` - X509 + * `urn:oasis:names:tc:SAML:2.0:nameid-format:WindowsDomainQualifiedName` - Windows + * `urn:oasis:names:tc:SAML:2.0:nameid-format:transient` - Transient binding_type: $ref: '#/components/schemas/BindingTypeEnum' signing_kp: @@ -48577,9 +48769,9 @@ components: - version type: object SessionUser: - description: "Response for the /user/me endpoint, returns the currently active\ - \ user (as `user` property)\nand, if this user is being impersonated, the\ - \ original user in the `original` property." + description: |- + Response for the /user/me endpoint, returns the currently active user (as `user` property) + and, if this user is being impersonated, the original user in the `original` property. example: original: uid: uid @@ -48732,15 +48924,14 @@ components: user_matching_mode: allOf: - $ref: '#/components/schemas/UserMatchingModeEnum' - description: "How the source determines if an existing user should be authenticated\ - \ or a new user enrolled.\n\n* `identifier` - Use the source-specific\ - \ identifier\n* `email_link` - Link to a user with identical email address.\ - \ Can have security implications when a source doesn't validate email\ - \ addresses.\n* `email_deny` - Use the user's email address, but deny\ - \ enrollment when the email address already exists.\n* `username_link`\ - \ - Link to a user with identical username. Can have security implications\ - \ when a username is used with another source.\n* `username_deny` - Use\ - \ the user's username, but deny enrollment when the username already exists." + description: |- + How the source determines if an existing user should be authenticated or a new user enrolled. + + * `identifier` - Use the source-specific identifier + * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. + * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. + * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. + * `username_deny` - Use the user's username, but deny enrollment when the username already exists. managed: description: "Objects which are managed by authentik. These objects are\ \ created and updated automatically. This is flag only indicates that\ @@ -48801,15 +48992,14 @@ components: user_matching_mode: allOf: - $ref: '#/components/schemas/UserMatchingModeEnum' - description: "How the source determines if an existing user should be authenticated\ - \ or a new user enrolled.\n\n* `identifier` - Use the source-specific\ - \ identifier\n* `email_link` - Link to a user with identical email address.\ - \ Can have security implications when a source doesn't validate email\ - \ addresses.\n* `email_deny` - Use the user's email address, but deny\ - \ enrollment when the email address already exists.\n* `username_link`\ - \ - Link to a user with identical username. Can have security implications\ - \ when a username is used with another source.\n* `username_deny` - Use\ - \ the user's username, but deny enrollment when the username already exists." + description: |- + How the source determines if an existing user should be authenticated or a new user enrolled. + + * `identifier` - Use the source-specific identifier + * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. + * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. + * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. + * `username_deny` - Use the user's username, but deny enrollment when the username already exists. user_path_template: minLength: 1 type: string @@ -49074,11 +49264,12 @@ components: - token type: object SubModeEnum: - description: "* `hashed_user_id` - Based on the Hashed User ID\n* `user_id`\ - \ - Based on user ID\n* `user_username` - Based on the username\n* `user_email`\ - \ - Based on the User's Email. This is recommended over the UPN method.\n\ - * `user_upn` - Based on the User's UPN, only works if user has a 'upn' attribute\ - \ set. Use this method only if you have different UPN and Mail domains." + description: |- + * `hashed_user_id` - Based on the Hashed User ID + * `user_id` - Based on user ID + * `user_username` - Based on the username + * `user_email` - Based on the User's Email. This is recommended over the UPN method. + * `user_upn` - Based on the User's UPN, only works if user has a 'upn' attribute set. Use this method only if you have different UPN and Mail domains. enum: - hashed_user_id - user_id @@ -49383,7 +49574,7 @@ components: description: Token Serializer example: identifier: identifier - user_obj: null + user_obj: "" expires: 2000-01-23T04:56:07.000+00:00 expiring: true managed: managed @@ -49415,7 +49606,9 @@ components: user: type: integer user_obj: - $ref: '#/components/schemas/PolicyBinding_user_obj' + allOf: + - $ref: '#/components/schemas/User' + readOnly: true description: type: string expires: @@ -49774,7 +49967,7 @@ components: example: expires: 2000-01-23T04:56:07.000+00:00 application: - provider_obj: null + provider_obj: "" meta_launch_url: https://openapi-generator.tech meta_icon: meta_icon meta_publisher: meta_publisher @@ -50301,14 +50494,12 @@ components: - name type: object UserMatchingModeEnum: - description: "* `identifier` - Use the source-specific identifier\n* `email_link`\ - \ - Link to a user with identical email address. Can have security implications\ - \ when a source doesn't validate email addresses.\n* `email_deny` - Use the\ - \ user's email address, but deny enrollment when the email address already\ - \ exists.\n* `username_link` - Link to a user with identical username. Can\ - \ have security implications when a username is used with another source.\n\ - * `username_deny` - Use the user's username, but deny enrollment when the\ - \ username already exists." + description: |- + * `identifier` - Use the source-specific identifier + * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. + * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. + * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. + * `username_deny` - Use the user's username, but deny enrollment when the username already exists. enum: - identifier - email_link @@ -50360,7 +50551,7 @@ components: example: identifier: identifier pk: 0 - source: null + source: "" user: 6 properties: pk: @@ -50370,7 +50561,9 @@ components: user: type: integer source: - $ref: '#/components/schemas/PlexSourceConnection_source' + allOf: + - $ref: '#/components/schemas/Source' + readOnly: true identifier: maxLength: 255 type: string @@ -50482,7 +50675,7 @@ components: example: identifier: identifier pk: 0 - source: null + source: "" user: 6 properties: pk: @@ -50492,7 +50685,9 @@ components: user: type: integer source: - $ref: '#/components/schemas/PlexSourceConnection_source' + allOf: + - $ref: '#/components/schemas/Source' + readOnly: true identifier: type: string required: @@ -50680,7 +50875,7 @@ components: example: created: 2000-01-23T04:56:07.000+00:00 pk: 0 - source: null + source: "" user: 6 properties: pk: @@ -50691,7 +50886,9 @@ components: readOnly: true type: integer source: - $ref: '#/components/schemas/PlexSourceConnection_source' + allOf: + - $ref: '#/components/schemas/Source' + readOnly: true created: format: date-time readOnly: true @@ -50931,10 +51128,6 @@ components: required: - count type: object - Application_provider_obj: - allOf: - - $ref: '#/components/schemas/Provider' - readOnly: true AuthenticatedSession_user_agent_device: description: User agent device example: @@ -51066,38 +51259,6 @@ components: - lat - long type: object - BlueprintFile_meta: - allOf: - - $ref: '#/components/schemas/Metadata' - readOnly: true - FlowInspectorPlan_current_stage: - allOf: - - $ref: '#/components/schemas/FlowStageBinding' - readOnly: true - FlowStageBinding_stage_obj: - allOf: - - $ref: '#/components/schemas/Stage' - readOnly: true - Invitation_created_by: - allOf: - - $ref: '#/components/schemas/GroupMember' - readOnly: true - Invitation_flow_obj: - allOf: - - $ref: '#/components/schemas/Flow' - readOnly: true - NotificationRule_group_obj: - allOf: - - $ref: '#/components/schemas/Group' - readOnly: true - OAuthSource_type: - allOf: - - $ref: '#/components/schemas/SourceType' - readOnly: true - Outpost_service_connection_obj: - allOf: - - $ref: '#/components/schemas/ServiceConnection' - readOnly: true PaginatedApplicationList_pagination: example: next: 0.8008281904610115 @@ -51131,22 +51292,6 @@ components: - start_index - total_pages type: object - PlexSourceConnection_source: - allOf: - - $ref: '#/components/schemas/Source' - readOnly: true - PolicyBinding_policy_obj: - allOf: - - $ref: '#/components/schemas/Policy' - readOnly: true - PolicyBinding_user_obj: - allOf: - - $ref: '#/components/schemas/User' - readOnly: true - ProxyOutpostConfig_oidc_configuration: - allOf: - - $ref: '#/components/schemas/OpenIDConnectConfiguration' - readOnly: true System_runtime: description: Get versions example: diff --git a/api_admin.go b/api_admin.go index 573c0fb68..4fe46e9ed 100644 --- a/api_admin.go +++ b/api_admin.go @@ -14,7 +14,7 @@ package api import ( "bytes" "context" - "io/ioutil" + "io" "net/http" "net/url" "strings" @@ -109,9 +109,9 @@ func (a *AdminApiService) AdminAppsListExecute(r ApiAdminAppsListRequest) ([]App return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -128,6 +128,7 @@ func (a *AdminApiService) AdminAppsListExecute(r ApiAdminAppsListRequest) ([]App newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -138,6 +139,7 @@ func (a *AdminApiService) AdminAppsListExecute(r ApiAdminAppsListRequest) ([]App newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -241,9 +243,9 @@ func (a *AdminApiService) AdminMetricsRetrieveExecute(r ApiAdminMetricsRetrieveR return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -260,6 +262,7 @@ func (a *AdminApiService) AdminMetricsRetrieveExecute(r ApiAdminMetricsRetrieveR newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -270,6 +273,7 @@ func (a *AdminApiService) AdminMetricsRetrieveExecute(r ApiAdminMetricsRetrieveR newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -373,9 +377,9 @@ func (a *AdminApiService) AdminSystemCreateExecute(r ApiAdminSystemCreateRequest return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -392,6 +396,7 @@ func (a *AdminApiService) AdminSystemCreateExecute(r ApiAdminSystemCreateRequest newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -402,6 +407,7 @@ func (a *AdminApiService) AdminSystemCreateExecute(r ApiAdminSystemCreateRequest newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -505,9 +511,9 @@ func (a *AdminApiService) AdminSystemRetrieveExecute(r ApiAdminSystemRetrieveReq return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -524,6 +530,7 @@ func (a *AdminApiService) AdminSystemRetrieveExecute(r ApiAdminSystemRetrieveReq newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -534,6 +541,7 @@ func (a *AdminApiService) AdminSystemRetrieveExecute(r ApiAdminSystemRetrieveReq newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -637,9 +645,9 @@ func (a *AdminApiService) AdminSystemTasksListExecute(r ApiAdminSystemTasksListR return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -656,6 +664,7 @@ func (a *AdminApiService) AdminSystemTasksListExecute(r ApiAdminSystemTasksListR newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -666,6 +675,7 @@ func (a *AdminApiService) AdminSystemTasksListExecute(r ApiAdminSystemTasksListR newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -726,7 +736,7 @@ func (a *AdminApiService) AdminSystemTasksRetrieveExecute(r ApiAdminSystemTasksR } localVarPath := localBasePath + "/admin/system_tasks/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -773,9 +783,9 @@ func (a *AdminApiService) AdminSystemTasksRetrieveExecute(r ApiAdminSystemTasksR return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -792,6 +802,7 @@ func (a *AdminApiService) AdminSystemTasksRetrieveExecute(r ApiAdminSystemTasksR newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -802,6 +813,7 @@ func (a *AdminApiService) AdminSystemTasksRetrieveExecute(r ApiAdminSystemTasksR newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -860,7 +872,7 @@ func (a *AdminApiService) AdminSystemTasksRetryCreateExecute(r ApiAdminSystemTas } localVarPath := localBasePath + "/admin/system_tasks/{id}/retry/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -907,9 +919,9 @@ func (a *AdminApiService) AdminSystemTasksRetryCreateExecute(r ApiAdminSystemTas return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -926,6 +938,7 @@ func (a *AdminApiService) AdminSystemTasksRetryCreateExecute(r ApiAdminSystemTas newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -936,6 +949,7 @@ func (a *AdminApiService) AdminSystemTasksRetryCreateExecute(r ApiAdminSystemTas newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -1030,9 +1044,9 @@ func (a *AdminApiService) AdminVersionRetrieveExecute(r ApiAdminVersionRetrieveR return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1049,6 +1063,7 @@ func (a *AdminApiService) AdminVersionRetrieveExecute(r ApiAdminVersionRetrieveR newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1059,6 +1074,7 @@ func (a *AdminApiService) AdminVersionRetrieveExecute(r ApiAdminVersionRetrieveR newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1162,9 +1178,9 @@ func (a *AdminApiService) AdminWorkersRetrieveExecute(r ApiAdminWorkersRetrieveR return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1181,6 +1197,7 @@ func (a *AdminApiService) AdminWorkersRetrieveExecute(r ApiAdminWorkersRetrieveR newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1191,6 +1208,7 @@ func (a *AdminApiService) AdminWorkersRetrieveExecute(r ApiAdminWorkersRetrieveR newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr diff --git a/api_authenticators.go b/api_authenticators.go index dc9a71714..98a23fffa 100644 --- a/api_authenticators.go +++ b/api_authenticators.go @@ -14,7 +14,7 @@ package api import ( "bytes" "context" - "io/ioutil" + "io" "net/http" "net/url" "strings" @@ -75,7 +75,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminAllListExecute(r ApiAuthen localVarFormParams := url.Values{} if r.user != nil { - localVarQueryParams.Add("user", parameterToString(*r.user, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "user", r.user, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -118,9 +118,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminAllListExecute(r ApiAuthen return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -137,6 +137,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminAllListExecute(r ApiAuthen newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -147,6 +148,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminAllListExecute(r ApiAuthen newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -261,9 +263,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminDuoCreateExecute(r ApiAuth return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -280,6 +282,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminDuoCreateExecute(r ApiAuth newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -290,6 +293,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminDuoCreateExecute(r ApiAuth newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -348,7 +352,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminDuoDestroyExecute(r ApiAut } localVarPath := localBasePath + "/authenticators/admin/duo/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -395,9 +399,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminDuoDestroyExecute(r ApiAut return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -414,6 +418,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminDuoDestroyExecute(r ApiAut newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -424,6 +429,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminDuoDestroyExecute(r ApiAut newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -512,19 +518,19 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminDuoListExecute(r ApiAuthen localVarFormParams := url.Values{} if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -567,9 +573,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminDuoListExecute(r ApiAuthen return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -586,6 +592,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminDuoListExecute(r ApiAuthen newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -596,6 +603,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminDuoListExecute(r ApiAuthen newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -662,7 +670,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminDuoPartialUpdateExecute(r } localVarPath := localBasePath + "/authenticators/admin/duo/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -711,9 +719,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminDuoPartialUpdateExecute(r return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -730,6 +738,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminDuoPartialUpdateExecute(r newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -740,6 +749,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminDuoPartialUpdateExecute(r newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -800,7 +810,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminDuoRetrieveExecute(r ApiAu } localVarPath := localBasePath + "/authenticators/admin/duo/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -847,9 +857,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminDuoRetrieveExecute(r ApiAu return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -866,6 +876,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminDuoRetrieveExecute(r ApiAu newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -876,6 +887,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminDuoRetrieveExecute(r ApiAu newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -942,7 +954,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminDuoUpdateExecute(r ApiAuth } localVarPath := localBasePath + "/authenticators/admin/duo/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -994,9 +1006,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminDuoUpdateExecute(r ApiAuth return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1013,6 +1025,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminDuoUpdateExecute(r ApiAuth newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1023,6 +1036,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminDuoUpdateExecute(r ApiAuth newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1137,9 +1151,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminSmsCreateExecute(r ApiAuth return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1156,6 +1170,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminSmsCreateExecute(r ApiAuth newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1166,6 +1181,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminSmsCreateExecute(r ApiAuth newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1224,7 +1240,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminSmsDestroyExecute(r ApiAut } localVarPath := localBasePath + "/authenticators/admin/sms/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1271,9 +1287,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminSmsDestroyExecute(r ApiAut return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -1290,6 +1306,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminSmsDestroyExecute(r ApiAut newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -1300,6 +1317,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminSmsDestroyExecute(r ApiAut newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -1388,19 +1406,19 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminSmsListExecute(r ApiAuthen localVarFormParams := url.Values{} if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1443,9 +1461,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminSmsListExecute(r ApiAuthen return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1462,6 +1480,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminSmsListExecute(r ApiAuthen newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1472,6 +1491,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminSmsListExecute(r ApiAuthen newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1538,7 +1558,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminSmsPartialUpdateExecute(r } localVarPath := localBasePath + "/authenticators/admin/sms/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1587,9 +1607,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminSmsPartialUpdateExecute(r return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1606,6 +1626,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminSmsPartialUpdateExecute(r newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1616,6 +1637,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminSmsPartialUpdateExecute(r newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1676,7 +1698,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminSmsRetrieveExecute(r ApiAu } localVarPath := localBasePath + "/authenticators/admin/sms/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1723,9 +1745,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminSmsRetrieveExecute(r ApiAu return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1742,6 +1764,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminSmsRetrieveExecute(r ApiAu newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1752,6 +1775,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminSmsRetrieveExecute(r ApiAu newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1818,7 +1842,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminSmsUpdateExecute(r ApiAuth } localVarPath := localBasePath + "/authenticators/admin/sms/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1870,9 +1894,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminSmsUpdateExecute(r ApiAuth return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1889,6 +1913,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminSmsUpdateExecute(r ApiAuth newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1899,6 +1924,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminSmsUpdateExecute(r ApiAuth newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2013,9 +2039,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminStaticCreateExecute(r ApiA return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2032,6 +2058,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminStaticCreateExecute(r ApiA newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2042,6 +2069,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminStaticCreateExecute(r ApiA newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2100,7 +2128,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminStaticDestroyExecute(r Api } localVarPath := localBasePath + "/authenticators/admin/static/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2147,9 +2175,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminStaticDestroyExecute(r Api return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -2166,6 +2194,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminStaticDestroyExecute(r Api newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -2176,6 +2205,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminStaticDestroyExecute(r Api newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -2264,19 +2294,19 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminStaticListExecute(r ApiAut localVarFormParams := url.Values{} if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -2319,9 +2349,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminStaticListExecute(r ApiAut return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2338,6 +2368,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminStaticListExecute(r ApiAut newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2348,6 +2379,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminStaticListExecute(r ApiAut newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2414,7 +2446,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminStaticPartialUpdateExecute } localVarPath := localBasePath + "/authenticators/admin/static/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2463,9 +2495,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminStaticPartialUpdateExecute return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2482,6 +2514,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminStaticPartialUpdateExecute newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2492,6 +2525,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminStaticPartialUpdateExecute newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2552,7 +2586,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminStaticRetrieveExecute(r Ap } localVarPath := localBasePath + "/authenticators/admin/static/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2599,9 +2633,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminStaticRetrieveExecute(r Ap return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2618,6 +2652,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminStaticRetrieveExecute(r Ap newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2628,6 +2663,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminStaticRetrieveExecute(r Ap newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2694,7 +2730,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminStaticUpdateExecute(r ApiA } localVarPath := localBasePath + "/authenticators/admin/static/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2746,9 +2782,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminStaticUpdateExecute(r ApiA return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2765,6 +2801,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminStaticUpdateExecute(r ApiA newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2775,6 +2812,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminStaticUpdateExecute(r ApiA newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2889,9 +2927,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminTotpCreateExecute(r ApiAut return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2908,6 +2946,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminTotpCreateExecute(r ApiAut newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2918,6 +2957,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminTotpCreateExecute(r ApiAut newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2976,7 +3016,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminTotpDestroyExecute(r ApiAu } localVarPath := localBasePath + "/authenticators/admin/totp/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -3023,9 +3063,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminTotpDestroyExecute(r ApiAu return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -3042,6 +3082,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminTotpDestroyExecute(r ApiAu newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -3052,6 +3093,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminTotpDestroyExecute(r ApiAu newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -3140,19 +3182,19 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminTotpListExecute(r ApiAuthe localVarFormParams := url.Values{} if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -3195,9 +3237,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminTotpListExecute(r ApiAuthe return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -3214,6 +3256,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminTotpListExecute(r ApiAuthe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -3224,6 +3267,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminTotpListExecute(r ApiAuthe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3290,7 +3334,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminTotpPartialUpdateExecute(r } localVarPath := localBasePath + "/authenticators/admin/totp/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -3339,9 +3383,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminTotpPartialUpdateExecute(r return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -3358,6 +3402,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminTotpPartialUpdateExecute(r newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -3368,6 +3413,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminTotpPartialUpdateExecute(r newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3428,7 +3474,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminTotpRetrieveExecute(r ApiA } localVarPath := localBasePath + "/authenticators/admin/totp/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -3475,9 +3521,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminTotpRetrieveExecute(r ApiA return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -3494,6 +3540,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminTotpRetrieveExecute(r ApiA newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -3504,6 +3551,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminTotpRetrieveExecute(r ApiA newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3570,7 +3618,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminTotpUpdateExecute(r ApiAut } localVarPath := localBasePath + "/authenticators/admin/totp/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -3622,9 +3670,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminTotpUpdateExecute(r ApiAut return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -3641,6 +3689,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminTotpUpdateExecute(r ApiAut newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -3651,6 +3700,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminTotpUpdateExecute(r ApiAut newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3765,9 +3815,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminWebauthnCreateExecute(r Ap return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -3784,6 +3834,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminWebauthnCreateExecute(r Ap newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -3794,6 +3845,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminWebauthnCreateExecute(r Ap newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3852,7 +3904,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminWebauthnDestroyExecute(r A } localVarPath := localBasePath + "/authenticators/admin/webauthn/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -3899,9 +3951,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminWebauthnDestroyExecute(r A return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -3918,6 +3970,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminWebauthnDestroyExecute(r A newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -3928,6 +3981,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminWebauthnDestroyExecute(r A newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -4016,19 +4070,19 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminWebauthnListExecute(r ApiA localVarFormParams := url.Values{} if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -4071,9 +4125,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminWebauthnListExecute(r ApiA return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -4090,6 +4144,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminWebauthnListExecute(r ApiA newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -4100,6 +4155,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminWebauthnListExecute(r ApiA newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -4166,7 +4222,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminWebauthnPartialUpdateExecu } localVarPath := localBasePath + "/authenticators/admin/webauthn/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -4215,9 +4271,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminWebauthnPartialUpdateExecu return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -4234,6 +4290,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminWebauthnPartialUpdateExecu newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -4244,6 +4301,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminWebauthnPartialUpdateExecu newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -4304,7 +4362,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminWebauthnRetrieveExecute(r } localVarPath := localBasePath + "/authenticators/admin/webauthn/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -4351,9 +4409,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminWebauthnRetrieveExecute(r return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -4370,6 +4428,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminWebauthnRetrieveExecute(r newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -4380,6 +4439,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminWebauthnRetrieveExecute(r newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -4446,7 +4506,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminWebauthnUpdateExecute(r Ap } localVarPath := localBasePath + "/authenticators/admin/webauthn/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -4498,9 +4558,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminWebauthnUpdateExecute(r Ap return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -4517,6 +4577,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminWebauthnUpdateExecute(r Ap newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -4527,6 +4588,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAdminWebauthnUpdateExecute(r Ap newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -4630,9 +4692,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsAllListExecute(r ApiAuthenticat return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -4649,6 +4711,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAllListExecute(r ApiAuthenticat newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -4659,6 +4722,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsAllListExecute(r ApiAuthenticat newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -4717,7 +4781,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsDuoDestroyExecute(r ApiAuthenti } localVarPath := localBasePath + "/authenticators/duo/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -4764,9 +4828,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsDuoDestroyExecute(r ApiAuthenti return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -4783,6 +4847,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsDuoDestroyExecute(r ApiAuthenti newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -4793,6 +4858,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsDuoDestroyExecute(r ApiAuthenti newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -4881,19 +4947,19 @@ func (a *AuthenticatorsApiService) AuthenticatorsDuoListExecute(r ApiAuthenticat localVarFormParams := url.Values{} if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -4936,9 +5002,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsDuoListExecute(r ApiAuthenticat return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -4955,6 +5021,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsDuoListExecute(r ApiAuthenticat newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -4965,6 +5032,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsDuoListExecute(r ApiAuthenticat newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -5031,7 +5099,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsDuoPartialUpdateExecute(r ApiAu } localVarPath := localBasePath + "/authenticators/duo/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -5080,9 +5148,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsDuoPartialUpdateExecute(r ApiAu return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -5099,6 +5167,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsDuoPartialUpdateExecute(r ApiAu newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -5109,6 +5178,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsDuoPartialUpdateExecute(r ApiAu newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -5169,7 +5239,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsDuoRetrieveExecute(r ApiAuthent } localVarPath := localBasePath + "/authenticators/duo/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -5216,9 +5286,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsDuoRetrieveExecute(r ApiAuthent return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -5235,6 +5305,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsDuoRetrieveExecute(r ApiAuthent newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -5245,6 +5316,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsDuoRetrieveExecute(r ApiAuthent newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -5311,7 +5383,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsDuoUpdateExecute(r ApiAuthentic } localVarPath := localBasePath + "/authenticators/duo/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -5363,9 +5435,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsDuoUpdateExecute(r ApiAuthentic return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -5382,6 +5454,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsDuoUpdateExecute(r ApiAuthentic newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -5392,6 +5465,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsDuoUpdateExecute(r ApiAuthentic newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -5452,7 +5526,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsDuoUsedByListExecute(r ApiAuthe } localVarPath := localBasePath + "/authenticators/duo/{id}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -5499,9 +5573,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsDuoUsedByListExecute(r ApiAuthe return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -5518,6 +5592,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsDuoUsedByListExecute(r ApiAuthe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -5528,6 +5603,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsDuoUsedByListExecute(r ApiAuthe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -5586,7 +5662,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsSmsDestroyExecute(r ApiAuthenti } localVarPath := localBasePath + "/authenticators/sms/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -5633,9 +5709,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsSmsDestroyExecute(r ApiAuthenti return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -5652,6 +5728,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsSmsDestroyExecute(r ApiAuthenti newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -5662,6 +5739,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsSmsDestroyExecute(r ApiAuthenti newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -5750,19 +5828,19 @@ func (a *AuthenticatorsApiService) AuthenticatorsSmsListExecute(r ApiAuthenticat localVarFormParams := url.Values{} if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -5805,9 +5883,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsSmsListExecute(r ApiAuthenticat return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -5824,6 +5902,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsSmsListExecute(r ApiAuthenticat newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -5834,6 +5913,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsSmsListExecute(r ApiAuthenticat newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -5900,7 +5980,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsSmsPartialUpdateExecute(r ApiAu } localVarPath := localBasePath + "/authenticators/sms/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -5949,9 +6029,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsSmsPartialUpdateExecute(r ApiAu return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -5968,6 +6048,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsSmsPartialUpdateExecute(r ApiAu newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -5978,6 +6059,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsSmsPartialUpdateExecute(r ApiAu newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -6038,7 +6120,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsSmsRetrieveExecute(r ApiAuthent } localVarPath := localBasePath + "/authenticators/sms/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -6085,9 +6167,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsSmsRetrieveExecute(r ApiAuthent return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -6104,6 +6186,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsSmsRetrieveExecute(r ApiAuthent newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -6114,6 +6197,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsSmsRetrieveExecute(r ApiAuthent newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -6180,7 +6264,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsSmsUpdateExecute(r ApiAuthentic } localVarPath := localBasePath + "/authenticators/sms/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -6232,9 +6316,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsSmsUpdateExecute(r ApiAuthentic return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -6251,6 +6335,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsSmsUpdateExecute(r ApiAuthentic newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -6261,6 +6346,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsSmsUpdateExecute(r ApiAuthentic newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -6321,7 +6407,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsSmsUsedByListExecute(r ApiAuthe } localVarPath := localBasePath + "/authenticators/sms/{id}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -6368,9 +6454,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsSmsUsedByListExecute(r ApiAuthe return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -6387,6 +6473,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsSmsUsedByListExecute(r ApiAuthe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -6397,6 +6484,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsSmsUsedByListExecute(r ApiAuthe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -6455,7 +6543,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsStaticDestroyExecute(r ApiAuthe } localVarPath := localBasePath + "/authenticators/static/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -6502,9 +6590,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsStaticDestroyExecute(r ApiAuthe return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -6521,6 +6609,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsStaticDestroyExecute(r ApiAuthe newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -6531,6 +6620,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsStaticDestroyExecute(r ApiAuthe newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -6619,19 +6709,19 @@ func (a *AuthenticatorsApiService) AuthenticatorsStaticListExecute(r ApiAuthenti localVarFormParams := url.Values{} if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -6674,9 +6764,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsStaticListExecute(r ApiAuthenti return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -6693,6 +6783,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsStaticListExecute(r ApiAuthenti newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -6703,6 +6794,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsStaticListExecute(r ApiAuthenti newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -6769,7 +6861,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsStaticPartialUpdateExecute(r Ap } localVarPath := localBasePath + "/authenticators/static/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -6818,9 +6910,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsStaticPartialUpdateExecute(r Ap return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -6837,6 +6929,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsStaticPartialUpdateExecute(r Ap newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -6847,6 +6940,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsStaticPartialUpdateExecute(r Ap newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -6907,7 +7001,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsStaticRetrieveExecute(r ApiAuth } localVarPath := localBasePath + "/authenticators/static/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -6954,9 +7048,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsStaticRetrieveExecute(r ApiAuth return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -6973,6 +7067,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsStaticRetrieveExecute(r ApiAuth newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -6983,6 +7078,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsStaticRetrieveExecute(r ApiAuth newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -7049,7 +7145,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsStaticUpdateExecute(r ApiAuthen } localVarPath := localBasePath + "/authenticators/static/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -7101,9 +7197,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsStaticUpdateExecute(r ApiAuthen return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -7120,6 +7216,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsStaticUpdateExecute(r ApiAuthen newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -7130,6 +7227,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsStaticUpdateExecute(r ApiAuthen newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -7190,7 +7288,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsStaticUsedByListExecute(r ApiAu } localVarPath := localBasePath + "/authenticators/static/{id}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -7237,9 +7335,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsStaticUsedByListExecute(r ApiAu return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -7256,6 +7354,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsStaticUsedByListExecute(r ApiAu newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -7266,6 +7365,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsStaticUsedByListExecute(r ApiAu newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -7324,7 +7424,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsTotpDestroyExecute(r ApiAuthent } localVarPath := localBasePath + "/authenticators/totp/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -7371,9 +7471,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsTotpDestroyExecute(r ApiAuthent return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -7390,6 +7490,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsTotpDestroyExecute(r ApiAuthent newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -7400,6 +7501,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsTotpDestroyExecute(r ApiAuthent newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -7488,19 +7590,19 @@ func (a *AuthenticatorsApiService) AuthenticatorsTotpListExecute(r ApiAuthentica localVarFormParams := url.Values{} if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -7543,9 +7645,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsTotpListExecute(r ApiAuthentica return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -7562,6 +7664,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsTotpListExecute(r ApiAuthentica newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -7572,6 +7675,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsTotpListExecute(r ApiAuthentica newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -7638,7 +7742,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsTotpPartialUpdateExecute(r ApiA } localVarPath := localBasePath + "/authenticators/totp/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -7687,9 +7791,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsTotpPartialUpdateExecute(r ApiA return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -7706,6 +7810,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsTotpPartialUpdateExecute(r ApiA newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -7716,6 +7821,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsTotpPartialUpdateExecute(r ApiA newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -7776,7 +7882,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsTotpRetrieveExecute(r ApiAuthen } localVarPath := localBasePath + "/authenticators/totp/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -7823,9 +7929,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsTotpRetrieveExecute(r ApiAuthen return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -7842,6 +7948,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsTotpRetrieveExecute(r ApiAuthen newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -7852,6 +7959,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsTotpRetrieveExecute(r ApiAuthen newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -7918,7 +8026,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsTotpUpdateExecute(r ApiAuthenti } localVarPath := localBasePath + "/authenticators/totp/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -7970,9 +8078,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsTotpUpdateExecute(r ApiAuthenti return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -7989,6 +8097,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsTotpUpdateExecute(r ApiAuthenti newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -7999,6 +8108,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsTotpUpdateExecute(r ApiAuthenti newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -8059,7 +8169,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsTotpUsedByListExecute(r ApiAuth } localVarPath := localBasePath + "/authenticators/totp/{id}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -8106,9 +8216,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsTotpUsedByListExecute(r ApiAuth return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -8125,6 +8235,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsTotpUsedByListExecute(r ApiAuth newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -8135,6 +8246,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsTotpUsedByListExecute(r ApiAuth newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -8193,7 +8305,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsWebauthnDestroyExecute(r ApiAut } localVarPath := localBasePath + "/authenticators/webauthn/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -8240,9 +8352,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsWebauthnDestroyExecute(r ApiAut return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -8259,6 +8371,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsWebauthnDestroyExecute(r ApiAut newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -8269,6 +8382,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsWebauthnDestroyExecute(r ApiAut newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -8357,19 +8471,19 @@ func (a *AuthenticatorsApiService) AuthenticatorsWebauthnListExecute(r ApiAuthen localVarFormParams := url.Values{} if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -8412,9 +8526,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsWebauthnListExecute(r ApiAuthen return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -8431,6 +8545,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsWebauthnListExecute(r ApiAuthen newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -8441,6 +8556,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsWebauthnListExecute(r ApiAuthen newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -8507,7 +8623,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsWebauthnPartialUpdateExecute(r } localVarPath := localBasePath + "/authenticators/webauthn/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -8556,9 +8672,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsWebauthnPartialUpdateExecute(r return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -8575,6 +8691,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsWebauthnPartialUpdateExecute(r newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -8585,6 +8702,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsWebauthnPartialUpdateExecute(r newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -8645,7 +8763,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsWebauthnRetrieveExecute(r ApiAu } localVarPath := localBasePath + "/authenticators/webauthn/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -8692,9 +8810,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsWebauthnRetrieveExecute(r ApiAu return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -8711,6 +8829,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsWebauthnRetrieveExecute(r ApiAu newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -8721,6 +8840,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsWebauthnRetrieveExecute(r ApiAu newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -8787,7 +8907,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsWebauthnUpdateExecute(r ApiAuth } localVarPath := localBasePath + "/authenticators/webauthn/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -8839,9 +8959,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsWebauthnUpdateExecute(r ApiAuth return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -8858,6 +8978,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsWebauthnUpdateExecute(r ApiAuth newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -8868,6 +8989,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsWebauthnUpdateExecute(r ApiAuth newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -8928,7 +9050,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsWebauthnUsedByListExecute(r Api } localVarPath := localBasePath + "/authenticators/webauthn/{id}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -8975,9 +9097,9 @@ func (a *AuthenticatorsApiService) AuthenticatorsWebauthnUsedByListExecute(r Api return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -8994,6 +9116,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsWebauthnUsedByListExecute(r Api newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -9004,6 +9127,7 @@ func (a *AuthenticatorsApiService) AuthenticatorsWebauthnUsedByListExecute(r Api newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr diff --git a/api_core.go b/api_core.go index 4e7f7c237..b004493b1 100644 --- a/api_core.go +++ b/api_core.go @@ -14,7 +14,7 @@ package api import ( "bytes" "context" - "io/ioutil" + "io" "net/http" "net/url" "os" @@ -75,14 +75,14 @@ func (a *CoreApiService) CoreApplicationsCheckAccessRetrieveExecute(r ApiCoreApp } localVarPath := localBasePath + "/core/applications/{slug}/check_access/" - localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterToString(r.slug, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterValueToString(r.slug, "slug")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} if r.forUser != nil { - localVarQueryParams.Add("for_user", parameterToString(*r.forUser, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "for_user", r.forUser, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -125,9 +125,9 @@ func (a *CoreApiService) CoreApplicationsCheckAccessRetrieveExecute(r ApiCoreApp return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -144,6 +144,7 @@ func (a *CoreApiService) CoreApplicationsCheckAccessRetrieveExecute(r ApiCoreApp newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -154,6 +155,7 @@ func (a *CoreApiService) CoreApplicationsCheckAccessRetrieveExecute(r ApiCoreApp newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -268,9 +270,9 @@ func (a *CoreApiService) CoreApplicationsCreateExecute(r ApiCoreApplicationsCrea return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -287,6 +289,7 @@ func (a *CoreApiService) CoreApplicationsCreateExecute(r ApiCoreApplicationsCrea newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -297,6 +300,7 @@ func (a *CoreApiService) CoreApplicationsCreateExecute(r ApiCoreApplicationsCrea newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -355,7 +359,7 @@ func (a *CoreApiService) CoreApplicationsDestroyExecute(r ApiCoreApplicationsDes } localVarPath := localBasePath + "/core/applications/{slug}/" - localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterToString(r.slug, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterValueToString(r.slug, "slug")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -402,9 +406,9 @@ func (a *CoreApiService) CoreApplicationsDestroyExecute(r ApiCoreApplicationsDes return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -421,6 +425,7 @@ func (a *CoreApiService) CoreApplicationsDestroyExecute(r ApiCoreApplicationsDes newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -431,6 +436,7 @@ func (a *CoreApiService) CoreApplicationsDestroyExecute(r ApiCoreApplicationsDes newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -555,37 +561,37 @@ func (a *CoreApiService) CoreApplicationsListExecute(r ApiCoreApplicationsListRe localVarFormParams := url.Values{} if r.group != nil { - localVarQueryParams.Add("group", parameterToString(*r.group, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "group", r.group, "") } if r.metaDescription != nil { - localVarQueryParams.Add("meta_description", parameterToString(*r.metaDescription, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "meta_description", r.metaDescription, "") } if r.metaLaunchUrl != nil { - localVarQueryParams.Add("meta_launch_url", parameterToString(*r.metaLaunchUrl, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "meta_launch_url", r.metaLaunchUrl, "") } if r.metaPublisher != nil { - localVarQueryParams.Add("meta_publisher", parameterToString(*r.metaPublisher, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "meta_publisher", r.metaPublisher, "") } if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } if r.slug != nil { - localVarQueryParams.Add("slug", parameterToString(*r.slug, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "slug", r.slug, "") } if r.superuserFullList != nil { - localVarQueryParams.Add("superuser_full_list", parameterToString(*r.superuserFullList, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "superuser_full_list", r.superuserFullList, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -628,9 +634,9 @@ func (a *CoreApiService) CoreApplicationsListExecute(r ApiCoreApplicationsListRe return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -647,6 +653,7 @@ func (a *CoreApiService) CoreApplicationsListExecute(r ApiCoreApplicationsListRe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -657,6 +664,7 @@ func (a *CoreApiService) CoreApplicationsListExecute(r ApiCoreApplicationsListRe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -717,7 +725,7 @@ func (a *CoreApiService) CoreApplicationsMetricsListExecute(r ApiCoreApplication } localVarPath := localBasePath + "/core/applications/{slug}/metrics/" - localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterToString(r.slug, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterValueToString(r.slug, "slug")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -764,9 +772,9 @@ func (a *CoreApiService) CoreApplicationsMetricsListExecute(r ApiCoreApplication return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -783,6 +791,7 @@ func (a *CoreApiService) CoreApplicationsMetricsListExecute(r ApiCoreApplication newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -793,6 +802,7 @@ func (a *CoreApiService) CoreApplicationsMetricsListExecute(r ApiCoreApplication newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -859,7 +869,7 @@ func (a *CoreApiService) CoreApplicationsPartialUpdateExecute(r ApiCoreApplicati } localVarPath := localBasePath + "/core/applications/{slug}/" - localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterToString(r.slug, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterValueToString(r.slug, "slug")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -908,9 +918,9 @@ func (a *CoreApiService) CoreApplicationsPartialUpdateExecute(r ApiCoreApplicati return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -927,6 +937,7 @@ func (a *CoreApiService) CoreApplicationsPartialUpdateExecute(r ApiCoreApplicati newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -937,6 +948,7 @@ func (a *CoreApiService) CoreApplicationsPartialUpdateExecute(r ApiCoreApplicati newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -997,7 +1009,7 @@ func (a *CoreApiService) CoreApplicationsRetrieveExecute(r ApiCoreApplicationsRe } localVarPath := localBasePath + "/core/applications/{slug}/" - localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterToString(r.slug, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterValueToString(r.slug, "slug")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1044,9 +1056,9 @@ func (a *CoreApiService) CoreApplicationsRetrieveExecute(r ApiCoreApplicationsRe return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1063,6 +1075,7 @@ func (a *CoreApiService) CoreApplicationsRetrieveExecute(r ApiCoreApplicationsRe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1073,6 +1086,7 @@ func (a *CoreApiService) CoreApplicationsRetrieveExecute(r ApiCoreApplicationsRe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1094,12 +1108,12 @@ type ApiCoreApplicationsSetIconCreateRequest struct { ctx context.Context ApiService *CoreApiService slug string - file **os.File + file *os.File clear *bool } func (r ApiCoreApplicationsSetIconCreateRequest) File(file *os.File) ApiCoreApplicationsSetIconCreateRequest { - r.file = &file + r.file = file return r } @@ -1143,7 +1157,7 @@ func (a *CoreApiService) CoreApplicationsSetIconCreateExecute(r ApiCoreApplicati } localVarPath := localBasePath + "/core/applications/{slug}/set_icon/" - localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterToString(r.slug, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterValueToString(r.slug, "slug")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1172,19 +1186,18 @@ func (a *CoreApiService) CoreApplicationsSetIconCreateExecute(r ApiCoreApplicati fileLocalVarFormFileName = "file" - var fileLocalVarFile *os.File - if r.file != nil { - fileLocalVarFile = *r.file - } + fileLocalVarFile := r.file + if fileLocalVarFile != nil { - fbs, _ := ioutil.ReadAll(fileLocalVarFile) + fbs, _ := io.ReadAll(fileLocalVarFile) + fileLocalVarFileBytes = fbs fileLocalVarFileName = fileLocalVarFile.Name() fileLocalVarFile.Close() + formFiles = append(formFiles, formFile{fileBytes: fileLocalVarFileBytes, fileName: fileLocalVarFileName, formFileName: fileLocalVarFormFileName}) } - formFiles = append(formFiles, formFile{fileBytes: fileLocalVarFileBytes, fileName: fileLocalVarFileName, formFileName: fileLocalVarFormFileName}) if r.clear != nil { - localVarFormParams.Add("clear", parameterToString(*r.clear, "")) + parameterAddToHeaderOrQuery(localVarFormParams, "clear", r.clear, "") } if r.ctx != nil { // API Key Authentication @@ -1210,9 +1223,9 @@ func (a *CoreApiService) CoreApplicationsSetIconCreateExecute(r ApiCoreApplicati return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -1229,6 +1242,7 @@ func (a *CoreApiService) CoreApplicationsSetIconCreateExecute(r ApiCoreApplicati newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -1284,7 +1298,7 @@ func (a *CoreApiService) CoreApplicationsSetIconUrlCreateExecute(r ApiCoreApplic } localVarPath := localBasePath + "/core/applications/{slug}/set_icon_url/" - localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterToString(r.slug, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterValueToString(r.slug, "slug")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1336,9 +1350,9 @@ func (a *CoreApiService) CoreApplicationsSetIconUrlCreateExecute(r ApiCoreApplic return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -1355,6 +1369,7 @@ func (a *CoreApiService) CoreApplicationsSetIconUrlCreateExecute(r ApiCoreApplic newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -1412,7 +1427,7 @@ func (a *CoreApiService) CoreApplicationsUpdateExecute(r ApiCoreApplicationsUpda } localVarPath := localBasePath + "/core/applications/{slug}/" - localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterToString(r.slug, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterValueToString(r.slug, "slug")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1464,9 +1479,9 @@ func (a *CoreApiService) CoreApplicationsUpdateExecute(r ApiCoreApplicationsUpda return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1483,6 +1498,7 @@ func (a *CoreApiService) CoreApplicationsUpdateExecute(r ApiCoreApplicationsUpda newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1493,6 +1509,7 @@ func (a *CoreApiService) CoreApplicationsUpdateExecute(r ApiCoreApplicationsUpda newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1553,7 +1570,7 @@ func (a *CoreApiService) CoreApplicationsUsedByListExecute(r ApiCoreApplications } localVarPath := localBasePath + "/core/applications/{slug}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterToString(r.slug, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterValueToString(r.slug, "slug")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1600,9 +1617,9 @@ func (a *CoreApiService) CoreApplicationsUsedByListExecute(r ApiCoreApplications return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1619,6 +1636,7 @@ func (a *CoreApiService) CoreApplicationsUsedByListExecute(r ApiCoreApplications newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1629,6 +1647,7 @@ func (a *CoreApiService) CoreApplicationsUsedByListExecute(r ApiCoreApplications newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1687,7 +1706,7 @@ func (a *CoreApiService) CoreAuthenticatedSessionsDestroyExecute(r ApiCoreAuthen } localVarPath := localBasePath + "/core/authenticated_sessions/{uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterToString(r.uuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterValueToString(r.uuid, "uuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1734,9 +1753,9 @@ func (a *CoreApiService) CoreAuthenticatedSessionsDestroyExecute(r ApiCoreAuthen return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -1753,6 +1772,7 @@ func (a *CoreApiService) CoreAuthenticatedSessionsDestroyExecute(r ApiCoreAuthen newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -1763,6 +1783,7 @@ func (a *CoreApiService) CoreAuthenticatedSessionsDestroyExecute(r ApiCoreAuthen newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -1863,25 +1884,25 @@ func (a *CoreApiService) CoreAuthenticatedSessionsListExecute(r ApiCoreAuthentic localVarFormParams := url.Values{} if r.lastIp != nil { - localVarQueryParams.Add("last_ip", parameterToString(*r.lastIp, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "last_ip", r.lastIp, "") } if r.lastUserAgent != nil { - localVarQueryParams.Add("last_user_agent", parameterToString(*r.lastUserAgent, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "last_user_agent", r.lastUserAgent, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } if r.userUsername != nil { - localVarQueryParams.Add("user__username", parameterToString(*r.userUsername, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "user__username", r.userUsername, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1924,9 +1945,9 @@ func (a *CoreApiService) CoreAuthenticatedSessionsListExecute(r ApiCoreAuthentic return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1943,6 +1964,7 @@ func (a *CoreApiService) CoreAuthenticatedSessionsListExecute(r ApiCoreAuthentic newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1953,6 +1975,7 @@ func (a *CoreApiService) CoreAuthenticatedSessionsListExecute(r ApiCoreAuthentic newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2013,7 +2036,7 @@ func (a *CoreApiService) CoreAuthenticatedSessionsRetrieveExecute(r ApiCoreAuthe } localVarPath := localBasePath + "/core/authenticated_sessions/{uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterToString(r.uuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterValueToString(r.uuid, "uuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2060,9 +2083,9 @@ func (a *CoreApiService) CoreAuthenticatedSessionsRetrieveExecute(r ApiCoreAuthe return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2079,6 +2102,7 @@ func (a *CoreApiService) CoreAuthenticatedSessionsRetrieveExecute(r ApiCoreAuthe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2089,6 +2113,7 @@ func (a *CoreApiService) CoreAuthenticatedSessionsRetrieveExecute(r ApiCoreAuthe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2149,7 +2174,7 @@ func (a *CoreApiService) CoreAuthenticatedSessionsUsedByListExecute(r ApiCoreAut } localVarPath := localBasePath + "/core/authenticated_sessions/{uuid}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterToString(r.uuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterValueToString(r.uuid, "uuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2196,9 +2221,9 @@ func (a *CoreApiService) CoreAuthenticatedSessionsUsedByListExecute(r ApiCoreAut return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2215,6 +2240,7 @@ func (a *CoreApiService) CoreAuthenticatedSessionsUsedByListExecute(r ApiCoreAut newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2225,6 +2251,7 @@ func (a *CoreApiService) CoreAuthenticatedSessionsUsedByListExecute(r ApiCoreAut newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2289,7 +2316,7 @@ func (a *CoreApiService) CoreGroupsAddUserCreateExecute(r ApiCoreGroupsAddUserCr } localVarPath := localBasePath + "/core/groups/{group_uuid}/add_user/" - localVarPath = strings.Replace(localVarPath, "{"+"group_uuid"+"}", url.PathEscape(parameterToString(r.groupUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"group_uuid"+"}", url.PathEscape(parameterValueToString(r.groupUuid, "groupUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2341,9 +2368,9 @@ func (a *CoreApiService) CoreGroupsAddUserCreateExecute(r ApiCoreGroupsAddUserCr return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -2360,6 +2387,7 @@ func (a *CoreApiService) CoreGroupsAddUserCreateExecute(r ApiCoreGroupsAddUserCr newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -2370,6 +2398,7 @@ func (a *CoreApiService) CoreGroupsAddUserCreateExecute(r ApiCoreGroupsAddUserCr newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -2475,9 +2504,9 @@ func (a *CoreApiService) CoreGroupsCreateExecute(r ApiCoreGroupsCreateRequest) ( return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2494,6 +2523,7 @@ func (a *CoreApiService) CoreGroupsCreateExecute(r ApiCoreGroupsCreateRequest) ( newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2504,6 +2534,7 @@ func (a *CoreApiService) CoreGroupsCreateExecute(r ApiCoreGroupsCreateRequest) ( newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2562,7 +2593,7 @@ func (a *CoreApiService) CoreGroupsDestroyExecute(r ApiCoreGroupsDestroyRequest) } localVarPath := localBasePath + "/core/groups/{group_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"group_uuid"+"}", url.PathEscape(parameterToString(r.groupUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"group_uuid"+"}", url.PathEscape(parameterValueToString(r.groupUuid, "groupUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2609,9 +2640,9 @@ func (a *CoreApiService) CoreGroupsDestroyExecute(r ApiCoreGroupsDestroyRequest) return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -2628,6 +2659,7 @@ func (a *CoreApiService) CoreGroupsDestroyExecute(r ApiCoreGroupsDestroyRequest) newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -2638,6 +2670,7 @@ func (a *CoreApiService) CoreGroupsDestroyExecute(r ApiCoreGroupsDestroyRequest) newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -2752,20 +2785,20 @@ func (a *CoreApiService) CoreGroupsListExecute(r ApiCoreGroupsListRequest) (*Pag localVarFormParams := url.Values{} if r.attributes != nil { - localVarQueryParams.Add("attributes", parameterToString(*r.attributes, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "attributes", r.attributes, "") } if r.isSuperuser != nil { - localVarQueryParams.Add("is_superuser", parameterToString(*r.isSuperuser, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "is_superuser", r.isSuperuser, "") } if r.membersByPk != nil { t := *r.membersByPk if reflect.TypeOf(t).Kind() == reflect.Slice { s := reflect.ValueOf(t) for i := 0; i < s.Len(); i++ { - localVarQueryParams.Add("members_by_pk", parameterToString(s.Index(i), "multi")) + parameterAddToHeaderOrQuery(localVarQueryParams, "members_by_pk", s.Index(i), "multi") } } else { - localVarQueryParams.Add("members_by_pk", parameterToString(t, "multi")) + parameterAddToHeaderOrQuery(localVarQueryParams, "members_by_pk", t, "multi") } } if r.membersByUsername != nil { @@ -2773,26 +2806,26 @@ func (a *CoreApiService) CoreGroupsListExecute(r ApiCoreGroupsListRequest) (*Pag if reflect.TypeOf(t).Kind() == reflect.Slice { s := reflect.ValueOf(t) for i := 0; i < s.Len(); i++ { - localVarQueryParams.Add("members_by_username", parameterToString(s.Index(i), "multi")) + parameterAddToHeaderOrQuery(localVarQueryParams, "members_by_username", s.Index(i), "multi") } } else { - localVarQueryParams.Add("members_by_username", parameterToString(t, "multi")) + parameterAddToHeaderOrQuery(localVarQueryParams, "members_by_username", t, "multi") } } if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -2835,9 +2868,9 @@ func (a *CoreApiService) CoreGroupsListExecute(r ApiCoreGroupsListRequest) (*Pag return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2854,6 +2887,7 @@ func (a *CoreApiService) CoreGroupsListExecute(r ApiCoreGroupsListRequest) (*Pag newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2864,6 +2898,7 @@ func (a *CoreApiService) CoreGroupsListExecute(r ApiCoreGroupsListRequest) (*Pag newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2930,7 +2965,7 @@ func (a *CoreApiService) CoreGroupsPartialUpdateExecute(r ApiCoreGroupsPartialUp } localVarPath := localBasePath + "/core/groups/{group_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"group_uuid"+"}", url.PathEscape(parameterToString(r.groupUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"group_uuid"+"}", url.PathEscape(parameterValueToString(r.groupUuid, "groupUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2979,9 +3014,9 @@ func (a *CoreApiService) CoreGroupsPartialUpdateExecute(r ApiCoreGroupsPartialUp return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2998,6 +3033,7 @@ func (a *CoreApiService) CoreGroupsPartialUpdateExecute(r ApiCoreGroupsPartialUp newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -3008,6 +3044,7 @@ func (a *CoreApiService) CoreGroupsPartialUpdateExecute(r ApiCoreGroupsPartialUp newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3072,7 +3109,7 @@ func (a *CoreApiService) CoreGroupsRemoveUserCreateExecute(r ApiCoreGroupsRemove } localVarPath := localBasePath + "/core/groups/{group_uuid}/remove_user/" - localVarPath = strings.Replace(localVarPath, "{"+"group_uuid"+"}", url.PathEscape(parameterToString(r.groupUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"group_uuid"+"}", url.PathEscape(parameterValueToString(r.groupUuid, "groupUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -3124,9 +3161,9 @@ func (a *CoreApiService) CoreGroupsRemoveUserCreateExecute(r ApiCoreGroupsRemove return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -3143,6 +3180,7 @@ func (a *CoreApiService) CoreGroupsRemoveUserCreateExecute(r ApiCoreGroupsRemove newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -3153,6 +3191,7 @@ func (a *CoreApiService) CoreGroupsRemoveUserCreateExecute(r ApiCoreGroupsRemove newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -3204,7 +3243,7 @@ func (a *CoreApiService) CoreGroupsRetrieveExecute(r ApiCoreGroupsRetrieveReques } localVarPath := localBasePath + "/core/groups/{group_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"group_uuid"+"}", url.PathEscape(parameterToString(r.groupUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"group_uuid"+"}", url.PathEscape(parameterValueToString(r.groupUuid, "groupUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -3251,9 +3290,9 @@ func (a *CoreApiService) CoreGroupsRetrieveExecute(r ApiCoreGroupsRetrieveReques return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -3270,6 +3309,7 @@ func (a *CoreApiService) CoreGroupsRetrieveExecute(r ApiCoreGroupsRetrieveReques newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -3280,6 +3320,7 @@ func (a *CoreApiService) CoreGroupsRetrieveExecute(r ApiCoreGroupsRetrieveReques newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3346,7 +3387,7 @@ func (a *CoreApiService) CoreGroupsUpdateExecute(r ApiCoreGroupsUpdateRequest) ( } localVarPath := localBasePath + "/core/groups/{group_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"group_uuid"+"}", url.PathEscape(parameterToString(r.groupUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"group_uuid"+"}", url.PathEscape(parameterValueToString(r.groupUuid, "groupUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -3398,9 +3439,9 @@ func (a *CoreApiService) CoreGroupsUpdateExecute(r ApiCoreGroupsUpdateRequest) ( return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -3417,6 +3458,7 @@ func (a *CoreApiService) CoreGroupsUpdateExecute(r ApiCoreGroupsUpdateRequest) ( newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -3427,6 +3469,7 @@ func (a *CoreApiService) CoreGroupsUpdateExecute(r ApiCoreGroupsUpdateRequest) ( newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3487,7 +3530,7 @@ func (a *CoreApiService) CoreGroupsUsedByListExecute(r ApiCoreGroupsUsedByListRe } localVarPath := localBasePath + "/core/groups/{group_uuid}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"group_uuid"+"}", url.PathEscape(parameterToString(r.groupUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"group_uuid"+"}", url.PathEscape(parameterValueToString(r.groupUuid, "groupUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -3534,9 +3577,9 @@ func (a *CoreApiService) CoreGroupsUsedByListExecute(r ApiCoreGroupsUsedByListRe return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -3553,6 +3596,7 @@ func (a *CoreApiService) CoreGroupsUsedByListExecute(r ApiCoreGroupsUsedByListRe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -3563,6 +3607,7 @@ func (a *CoreApiService) CoreGroupsUsedByListExecute(r ApiCoreGroupsUsedByListRe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3677,9 +3722,9 @@ func (a *CoreApiService) CoreTenantsCreateExecute(r ApiCoreTenantsCreateRequest) return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -3696,6 +3741,7 @@ func (a *CoreApiService) CoreTenantsCreateExecute(r ApiCoreTenantsCreateRequest) newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -3706,6 +3752,7 @@ func (a *CoreApiService) CoreTenantsCreateExecute(r ApiCoreTenantsCreateRequest) newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3809,9 +3856,9 @@ func (a *CoreApiService) CoreTenantsCurrentRetrieveExecute(r ApiCoreTenantsCurre return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -3828,6 +3875,7 @@ func (a *CoreApiService) CoreTenantsCurrentRetrieveExecute(r ApiCoreTenantsCurre newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -3838,6 +3886,7 @@ func (a *CoreApiService) CoreTenantsCurrentRetrieveExecute(r ApiCoreTenantsCurre newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3896,7 +3945,7 @@ func (a *CoreApiService) CoreTenantsDestroyExecute(r ApiCoreTenantsDestroyReques } localVarPath := localBasePath + "/core/tenants/{tenant_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"tenant_uuid"+"}", url.PathEscape(parameterToString(r.tenantUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"tenant_uuid"+"}", url.PathEscape(parameterValueToString(r.tenantUuid, "tenantUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -3943,9 +3992,9 @@ func (a *CoreApiService) CoreTenantsDestroyExecute(r ApiCoreTenantsDestroyReques return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -3962,6 +4011,7 @@ func (a *CoreApiService) CoreTenantsDestroyExecute(r ApiCoreTenantsDestroyReques newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -3972,6 +4022,7 @@ func (a *CoreApiService) CoreTenantsDestroyExecute(r ApiCoreTenantsDestroyReques newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -4152,58 +4203,58 @@ func (a *CoreApiService) CoreTenantsListExecute(r ApiCoreTenantsListRequest) (*P localVarFormParams := url.Values{} if r.brandingFavicon != nil { - localVarQueryParams.Add("branding_favicon", parameterToString(*r.brandingFavicon, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "branding_favicon", r.brandingFavicon, "") } if r.brandingLogo != nil { - localVarQueryParams.Add("branding_logo", parameterToString(*r.brandingLogo, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "branding_logo", r.brandingLogo, "") } if r.brandingTitle != nil { - localVarQueryParams.Add("branding_title", parameterToString(*r.brandingTitle, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "branding_title", r.brandingTitle, "") } if r.default_ != nil { - localVarQueryParams.Add("default", parameterToString(*r.default_, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "default", r.default_, "") } if r.domain != nil { - localVarQueryParams.Add("domain", parameterToString(*r.domain, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "domain", r.domain, "") } if r.eventRetention != nil { - localVarQueryParams.Add("event_retention", parameterToString(*r.eventRetention, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "event_retention", r.eventRetention, "") } if r.flowAuthentication != nil { - localVarQueryParams.Add("flow_authentication", parameterToString(*r.flowAuthentication, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "flow_authentication", r.flowAuthentication, "") } if r.flowDeviceCode != nil { - localVarQueryParams.Add("flow_device_code", parameterToString(*r.flowDeviceCode, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "flow_device_code", r.flowDeviceCode, "") } if r.flowInvalidation != nil { - localVarQueryParams.Add("flow_invalidation", parameterToString(*r.flowInvalidation, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "flow_invalidation", r.flowInvalidation, "") } if r.flowRecovery != nil { - localVarQueryParams.Add("flow_recovery", parameterToString(*r.flowRecovery, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "flow_recovery", r.flowRecovery, "") } if r.flowUnenrollment != nil { - localVarQueryParams.Add("flow_unenrollment", parameterToString(*r.flowUnenrollment, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "flow_unenrollment", r.flowUnenrollment, "") } if r.flowUserSettings != nil { - localVarQueryParams.Add("flow_user_settings", parameterToString(*r.flowUserSettings, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "flow_user_settings", r.flowUserSettings, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } if r.tenantUuid != nil { - localVarQueryParams.Add("tenant_uuid", parameterToString(*r.tenantUuid, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "tenant_uuid", r.tenantUuid, "") } if r.webCertificate != nil { - localVarQueryParams.Add("web_certificate", parameterToString(*r.webCertificate, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "web_certificate", r.webCertificate, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -4246,9 +4297,9 @@ func (a *CoreApiService) CoreTenantsListExecute(r ApiCoreTenantsListRequest) (*P return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -4265,6 +4316,7 @@ func (a *CoreApiService) CoreTenantsListExecute(r ApiCoreTenantsListRequest) (*P newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -4275,6 +4327,7 @@ func (a *CoreApiService) CoreTenantsListExecute(r ApiCoreTenantsListRequest) (*P newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -4341,7 +4394,7 @@ func (a *CoreApiService) CoreTenantsPartialUpdateExecute(r ApiCoreTenantsPartial } localVarPath := localBasePath + "/core/tenants/{tenant_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"tenant_uuid"+"}", url.PathEscape(parameterToString(r.tenantUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"tenant_uuid"+"}", url.PathEscape(parameterValueToString(r.tenantUuid, "tenantUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -4390,9 +4443,9 @@ func (a *CoreApiService) CoreTenantsPartialUpdateExecute(r ApiCoreTenantsPartial return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -4409,6 +4462,7 @@ func (a *CoreApiService) CoreTenantsPartialUpdateExecute(r ApiCoreTenantsPartial newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -4419,6 +4473,7 @@ func (a *CoreApiService) CoreTenantsPartialUpdateExecute(r ApiCoreTenantsPartial newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -4479,7 +4534,7 @@ func (a *CoreApiService) CoreTenantsRetrieveExecute(r ApiCoreTenantsRetrieveRequ } localVarPath := localBasePath + "/core/tenants/{tenant_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"tenant_uuid"+"}", url.PathEscape(parameterToString(r.tenantUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"tenant_uuid"+"}", url.PathEscape(parameterValueToString(r.tenantUuid, "tenantUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -4526,9 +4581,9 @@ func (a *CoreApiService) CoreTenantsRetrieveExecute(r ApiCoreTenantsRetrieveRequ return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -4545,6 +4600,7 @@ func (a *CoreApiService) CoreTenantsRetrieveExecute(r ApiCoreTenantsRetrieveRequ newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -4555,6 +4611,7 @@ func (a *CoreApiService) CoreTenantsRetrieveExecute(r ApiCoreTenantsRetrieveRequ newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -4621,7 +4678,7 @@ func (a *CoreApiService) CoreTenantsUpdateExecute(r ApiCoreTenantsUpdateRequest) } localVarPath := localBasePath + "/core/tenants/{tenant_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"tenant_uuid"+"}", url.PathEscape(parameterToString(r.tenantUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"tenant_uuid"+"}", url.PathEscape(parameterValueToString(r.tenantUuid, "tenantUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -4673,9 +4730,9 @@ func (a *CoreApiService) CoreTenantsUpdateExecute(r ApiCoreTenantsUpdateRequest) return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -4692,6 +4749,7 @@ func (a *CoreApiService) CoreTenantsUpdateExecute(r ApiCoreTenantsUpdateRequest) newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -4702,6 +4760,7 @@ func (a *CoreApiService) CoreTenantsUpdateExecute(r ApiCoreTenantsUpdateRequest) newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -4762,7 +4821,7 @@ func (a *CoreApiService) CoreTenantsUsedByListExecute(r ApiCoreTenantsUsedByList } localVarPath := localBasePath + "/core/tenants/{tenant_uuid}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"tenant_uuid"+"}", url.PathEscape(parameterToString(r.tenantUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"tenant_uuid"+"}", url.PathEscape(parameterValueToString(r.tenantUuid, "tenantUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -4809,9 +4868,9 @@ func (a *CoreApiService) CoreTenantsUsedByListExecute(r ApiCoreTenantsUsedByList return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -4828,6 +4887,7 @@ func (a *CoreApiService) CoreTenantsUsedByListExecute(r ApiCoreTenantsUsedByList newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -4838,6 +4898,7 @@ func (a *CoreApiService) CoreTenantsUsedByListExecute(r ApiCoreTenantsUsedByList newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -4952,9 +5013,9 @@ func (a *CoreApiService) CoreTokensCreateExecute(r ApiCoreTokensCreateRequest) ( return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -4971,6 +5032,7 @@ func (a *CoreApiService) CoreTokensCreateExecute(r ApiCoreTokensCreateRequest) ( newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -4981,6 +5043,7 @@ func (a *CoreApiService) CoreTokensCreateExecute(r ApiCoreTokensCreateRequest) ( newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -5039,7 +5102,7 @@ func (a *CoreApiService) CoreTokensDestroyExecute(r ApiCoreTokensDestroyRequest) } localVarPath := localBasePath + "/core/tokens/{identifier}/" - localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", url.PathEscape(parameterToString(r.identifier, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", url.PathEscape(parameterValueToString(r.identifier, "identifier")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -5086,9 +5149,9 @@ func (a *CoreApiService) CoreTokensDestroyExecute(r ApiCoreTokensDestroyRequest) return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -5105,6 +5168,7 @@ func (a *CoreApiService) CoreTokensDestroyExecute(r ApiCoreTokensDestroyRequest) newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -5115,6 +5179,7 @@ func (a *CoreApiService) CoreTokensDestroyExecute(r ApiCoreTokensDestroyRequest) newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -5240,37 +5305,37 @@ func (a *CoreApiService) CoreTokensListExecute(r ApiCoreTokensListRequest) (*Pag localVarFormParams := url.Values{} if r.description != nil { - localVarQueryParams.Add("description", parameterToString(*r.description, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "description", r.description, "") } if r.expires != nil { - localVarQueryParams.Add("expires", parameterToString(*r.expires, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "expires", r.expires, "") } if r.expiring != nil { - localVarQueryParams.Add("expiring", parameterToString(*r.expiring, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "expiring", r.expiring, "") } if r.identifier != nil { - localVarQueryParams.Add("identifier", parameterToString(*r.identifier, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "identifier", r.identifier, "") } if r.intent != nil { - localVarQueryParams.Add("intent", parameterToString(*r.intent, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "intent", r.intent, "") } if r.managed != nil { - localVarQueryParams.Add("managed", parameterToString(*r.managed, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "managed", r.managed, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } if r.userUsername != nil { - localVarQueryParams.Add("user__username", parameterToString(*r.userUsername, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "user__username", r.userUsername, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -5313,9 +5378,9 @@ func (a *CoreApiService) CoreTokensListExecute(r ApiCoreTokensListRequest) (*Pag return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -5332,6 +5397,7 @@ func (a *CoreApiService) CoreTokensListExecute(r ApiCoreTokensListRequest) (*Pag newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -5342,6 +5408,7 @@ func (a *CoreApiService) CoreTokensListExecute(r ApiCoreTokensListRequest) (*Pag newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -5408,7 +5475,7 @@ func (a *CoreApiService) CoreTokensPartialUpdateExecute(r ApiCoreTokensPartialUp } localVarPath := localBasePath + "/core/tokens/{identifier}/" - localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", url.PathEscape(parameterToString(r.identifier, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", url.PathEscape(parameterValueToString(r.identifier, "identifier")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -5457,9 +5524,9 @@ func (a *CoreApiService) CoreTokensPartialUpdateExecute(r ApiCoreTokensPartialUp return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -5476,6 +5543,7 @@ func (a *CoreApiService) CoreTokensPartialUpdateExecute(r ApiCoreTokensPartialUp newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -5486,6 +5554,7 @@ func (a *CoreApiService) CoreTokensPartialUpdateExecute(r ApiCoreTokensPartialUp newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -5546,7 +5615,7 @@ func (a *CoreApiService) CoreTokensRetrieveExecute(r ApiCoreTokensRetrieveReques } localVarPath := localBasePath + "/core/tokens/{identifier}/" - localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", url.PathEscape(parameterToString(r.identifier, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", url.PathEscape(parameterValueToString(r.identifier, "identifier")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -5593,9 +5662,9 @@ func (a *CoreApiService) CoreTokensRetrieveExecute(r ApiCoreTokensRetrieveReques return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -5612,6 +5681,7 @@ func (a *CoreApiService) CoreTokensRetrieveExecute(r ApiCoreTokensRetrieveReques newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -5622,6 +5692,7 @@ func (a *CoreApiService) CoreTokensRetrieveExecute(r ApiCoreTokensRetrieveReques newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -5687,7 +5758,7 @@ func (a *CoreApiService) CoreTokensSetKeyCreateExecute(r ApiCoreTokensSetKeyCrea } localVarPath := localBasePath + "/core/tokens/{identifier}/set_key/" - localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", url.PathEscape(parameterToString(r.identifier, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", url.PathEscape(parameterValueToString(r.identifier, "identifier")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -5739,9 +5810,9 @@ func (a *CoreApiService) CoreTokensSetKeyCreateExecute(r ApiCoreTokensSetKeyCrea return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -5758,6 +5829,7 @@ func (a *CoreApiService) CoreTokensSetKeyCreateExecute(r ApiCoreTokensSetKeyCrea newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -5815,7 +5887,7 @@ func (a *CoreApiService) CoreTokensUpdateExecute(r ApiCoreTokensUpdateRequest) ( } localVarPath := localBasePath + "/core/tokens/{identifier}/" - localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", url.PathEscape(parameterToString(r.identifier, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", url.PathEscape(parameterValueToString(r.identifier, "identifier")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -5867,9 +5939,9 @@ func (a *CoreApiService) CoreTokensUpdateExecute(r ApiCoreTokensUpdateRequest) ( return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -5886,6 +5958,7 @@ func (a *CoreApiService) CoreTokensUpdateExecute(r ApiCoreTokensUpdateRequest) ( newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -5896,6 +5969,7 @@ func (a *CoreApiService) CoreTokensUpdateExecute(r ApiCoreTokensUpdateRequest) ( newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -5956,7 +6030,7 @@ func (a *CoreApiService) CoreTokensUsedByListExecute(r ApiCoreTokensUsedByListRe } localVarPath := localBasePath + "/core/tokens/{identifier}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", url.PathEscape(parameterToString(r.identifier, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", url.PathEscape(parameterValueToString(r.identifier, "identifier")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -6003,9 +6077,9 @@ func (a *CoreApiService) CoreTokensUsedByListExecute(r ApiCoreTokensUsedByListRe return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -6022,6 +6096,7 @@ func (a *CoreApiService) CoreTokensUsedByListExecute(r ApiCoreTokensUsedByListRe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -6032,6 +6107,7 @@ func (a *CoreApiService) CoreTokensUsedByListExecute(r ApiCoreTokensUsedByListRe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -6092,7 +6168,7 @@ func (a *CoreApiService) CoreTokensViewKeyRetrieveExecute(r ApiCoreTokensViewKey } localVarPath := localBasePath + "/core/tokens/{identifier}/view_key/" - localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", url.PathEscape(parameterToString(r.identifier, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", url.PathEscape(parameterValueToString(r.identifier, "identifier")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -6139,9 +6215,9 @@ func (a *CoreApiService) CoreTokensViewKeyRetrieveExecute(r ApiCoreTokensViewKey return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -6158,6 +6234,7 @@ func (a *CoreApiService) CoreTokensViewKeyRetrieveExecute(r ApiCoreTokensViewKey newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -6168,6 +6245,7 @@ func (a *CoreApiService) CoreTokensViewKeyRetrieveExecute(r ApiCoreTokensViewKey newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -6226,7 +6304,7 @@ func (a *CoreApiService) CoreUserConsentDestroyExecute(r ApiCoreUserConsentDestr } localVarPath := localBasePath + "/core/user_consent/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -6273,9 +6351,9 @@ func (a *CoreApiService) CoreUserConsentDestroyExecute(r ApiCoreUserConsentDestr return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -6292,6 +6370,7 @@ func (a *CoreApiService) CoreUserConsentDestroyExecute(r ApiCoreUserConsentDestr newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -6302,6 +6381,7 @@ func (a *CoreApiService) CoreUserConsentDestroyExecute(r ApiCoreUserConsentDestr newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -6396,22 +6476,22 @@ func (a *CoreApiService) CoreUserConsentListExecute(r ApiCoreUserConsentListRequ localVarFormParams := url.Values{} if r.application != nil { - localVarQueryParams.Add("application", parameterToString(*r.application, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "application", r.application, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } if r.user != nil { - localVarQueryParams.Add("user", parameterToString(*r.user, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "user", r.user, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -6454,9 +6534,9 @@ func (a *CoreApiService) CoreUserConsentListExecute(r ApiCoreUserConsentListRequ return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -6473,6 +6553,7 @@ func (a *CoreApiService) CoreUserConsentListExecute(r ApiCoreUserConsentListRequ newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -6483,6 +6564,7 @@ func (a *CoreApiService) CoreUserConsentListExecute(r ApiCoreUserConsentListRequ newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -6543,7 +6625,7 @@ func (a *CoreApiService) CoreUserConsentRetrieveExecute(r ApiCoreUserConsentRetr } localVarPath := localBasePath + "/core/user_consent/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -6590,9 +6672,9 @@ func (a *CoreApiService) CoreUserConsentRetrieveExecute(r ApiCoreUserConsentRetr return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -6609,6 +6691,7 @@ func (a *CoreApiService) CoreUserConsentRetrieveExecute(r ApiCoreUserConsentRetr newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -6619,6 +6702,7 @@ func (a *CoreApiService) CoreUserConsentRetrieveExecute(r ApiCoreUserConsentRetr newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -6679,7 +6763,7 @@ func (a *CoreApiService) CoreUserConsentUsedByListExecute(r ApiCoreUserConsentUs } localVarPath := localBasePath + "/core/user_consent/{id}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -6726,9 +6810,9 @@ func (a *CoreApiService) CoreUserConsentUsedByListExecute(r ApiCoreUserConsentUs return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -6745,6 +6829,7 @@ func (a *CoreApiService) CoreUserConsentUsedByListExecute(r ApiCoreUserConsentUs newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -6755,6 +6840,7 @@ func (a *CoreApiService) CoreUserConsentUsedByListExecute(r ApiCoreUserConsentUs newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -6869,9 +6955,9 @@ func (a *CoreApiService) CoreUsersCreateExecute(r ApiCoreUsersCreateRequest) (*U return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -6888,6 +6974,7 @@ func (a *CoreApiService) CoreUsersCreateExecute(r ApiCoreUsersCreateRequest) (*U newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -6898,6 +6985,7 @@ func (a *CoreApiService) CoreUsersCreateExecute(r ApiCoreUsersCreateRequest) (*U newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -6956,7 +7044,7 @@ func (a *CoreApiService) CoreUsersDestroyExecute(r ApiCoreUsersDestroyRequest) ( } localVarPath := localBasePath + "/core/users/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -7003,9 +7091,9 @@ func (a *CoreApiService) CoreUsersDestroyExecute(r ApiCoreUsersDestroyRequest) ( return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -7022,6 +7110,7 @@ func (a *CoreApiService) CoreUsersDestroyExecute(r ApiCoreUsersDestroyRequest) ( newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -7032,6 +7121,7 @@ func (a *CoreApiService) CoreUsersDestroyExecute(r ApiCoreUsersDestroyRequest) ( newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -7181,20 +7271,20 @@ func (a *CoreApiService) CoreUsersListExecute(r ApiCoreUsersListRequest) (*Pagin localVarFormParams := url.Values{} if r.attributes != nil { - localVarQueryParams.Add("attributes", parameterToString(*r.attributes, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "attributes", r.attributes, "") } if r.email != nil { - localVarQueryParams.Add("email", parameterToString(*r.email, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "email", r.email, "") } if r.groupsByName != nil { t := *r.groupsByName if reflect.TypeOf(t).Kind() == reflect.Slice { s := reflect.ValueOf(t) for i := 0; i < s.Len(); i++ { - localVarQueryParams.Add("groups_by_name", parameterToString(s.Index(i), "multi")) + parameterAddToHeaderOrQuery(localVarQueryParams, "groups_by_name", s.Index(i), "multi") } } else { - localVarQueryParams.Add("groups_by_name", parameterToString(t, "multi")) + parameterAddToHeaderOrQuery(localVarQueryParams, "groups_by_name", t, "multi") } } if r.groupsByPk != nil { @@ -7202,44 +7292,44 @@ func (a *CoreApiService) CoreUsersListExecute(r ApiCoreUsersListRequest) (*Pagin if reflect.TypeOf(t).Kind() == reflect.Slice { s := reflect.ValueOf(t) for i := 0; i < s.Len(); i++ { - localVarQueryParams.Add("groups_by_pk", parameterToString(s.Index(i), "multi")) + parameterAddToHeaderOrQuery(localVarQueryParams, "groups_by_pk", s.Index(i), "multi") } } else { - localVarQueryParams.Add("groups_by_pk", parameterToString(t, "multi")) + parameterAddToHeaderOrQuery(localVarQueryParams, "groups_by_pk", t, "multi") } } if r.isActive != nil { - localVarQueryParams.Add("is_active", parameterToString(*r.isActive, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "is_active", r.isActive, "") } if r.isSuperuser != nil { - localVarQueryParams.Add("is_superuser", parameterToString(*r.isSuperuser, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "is_superuser", r.isSuperuser, "") } if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.path != nil { - localVarQueryParams.Add("path", parameterToString(*r.path, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "path", r.path, "") } if r.pathStartswith != nil { - localVarQueryParams.Add("path_startswith", parameterToString(*r.pathStartswith, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "path_startswith", r.pathStartswith, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } if r.username != nil { - localVarQueryParams.Add("username", parameterToString(*r.username, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "username", r.username, "") } if r.uuid != nil { - localVarQueryParams.Add("uuid", parameterToString(*r.uuid, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "uuid", r.uuid, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -7282,9 +7372,9 @@ func (a *CoreApiService) CoreUsersListExecute(r ApiCoreUsersListRequest) (*Pagin return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -7301,6 +7391,7 @@ func (a *CoreApiService) CoreUsersListExecute(r ApiCoreUsersListRequest) (*Pagin newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -7311,6 +7402,7 @@ func (a *CoreApiService) CoreUsersListExecute(r ApiCoreUsersListRequest) (*Pagin newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -7414,9 +7506,9 @@ func (a *CoreApiService) CoreUsersMeRetrieveExecute(r ApiCoreUsersMeRetrieveRequ return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -7433,6 +7525,7 @@ func (a *CoreApiService) CoreUsersMeRetrieveExecute(r ApiCoreUsersMeRetrieveRequ newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -7443,6 +7536,7 @@ func (a *CoreApiService) CoreUsersMeRetrieveExecute(r ApiCoreUsersMeRetrieveRequ newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -7503,7 +7597,7 @@ func (a *CoreApiService) CoreUsersMetricsRetrieveExecute(r ApiCoreUsersMetricsRe } localVarPath := localBasePath + "/core/users/{id}/metrics/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -7550,9 +7644,9 @@ func (a *CoreApiService) CoreUsersMetricsRetrieveExecute(r ApiCoreUsersMetricsRe return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -7569,6 +7663,7 @@ func (a *CoreApiService) CoreUsersMetricsRetrieveExecute(r ApiCoreUsersMetricsRe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -7579,6 +7674,7 @@ func (a *CoreApiService) CoreUsersMetricsRetrieveExecute(r ApiCoreUsersMetricsRe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -7645,7 +7741,7 @@ func (a *CoreApiService) CoreUsersPartialUpdateExecute(r ApiCoreUsersPartialUpda } localVarPath := localBasePath + "/core/users/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -7694,9 +7790,9 @@ func (a *CoreApiService) CoreUsersPartialUpdateExecute(r ApiCoreUsersPartialUpda return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -7713,6 +7809,7 @@ func (a *CoreApiService) CoreUsersPartialUpdateExecute(r ApiCoreUsersPartialUpda newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -7723,6 +7820,7 @@ func (a *CoreApiService) CoreUsersPartialUpdateExecute(r ApiCoreUsersPartialUpda newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -7792,7 +7890,7 @@ func (a *CoreApiService) CoreUsersPathsRetrieveExecute(r ApiCoreUsersPathsRetrie localVarFormParams := url.Values{} if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -7835,9 +7933,9 @@ func (a *CoreApiService) CoreUsersPathsRetrieveExecute(r ApiCoreUsersPathsRetrie return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -7854,6 +7952,7 @@ func (a *CoreApiService) CoreUsersPathsRetrieveExecute(r ApiCoreUsersPathsRetrie newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -7864,6 +7963,7 @@ func (a *CoreApiService) CoreUsersPathsRetrieveExecute(r ApiCoreUsersPathsRetrie newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -7928,7 +8028,7 @@ func (a *CoreApiService) CoreUsersRecoveryEmailRetrieveExecute(r ApiCoreUsersRec } localVarPath := localBasePath + "/core/users/{id}/recovery_email/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -7937,7 +8037,7 @@ func (a *CoreApiService) CoreUsersRecoveryEmailRetrieveExecute(r ApiCoreUsersRec return nil, reportError("emailStage is required and must be specified") } - localVarQueryParams.Add("email_stage", parameterToString(*r.emailStage, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "email_stage", r.emailStage, "") // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -7979,9 +8079,9 @@ func (a *CoreApiService) CoreUsersRecoveryEmailRetrieveExecute(r ApiCoreUsersRec return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -7998,6 +8098,7 @@ func (a *CoreApiService) CoreUsersRecoveryEmailRetrieveExecute(r ApiCoreUsersRec newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -8008,6 +8109,7 @@ func (a *CoreApiService) CoreUsersRecoveryEmailRetrieveExecute(r ApiCoreUsersRec newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -8059,7 +8161,7 @@ func (a *CoreApiService) CoreUsersRecoveryRetrieveExecute(r ApiCoreUsersRecovery } localVarPath := localBasePath + "/core/users/{id}/recovery/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -8106,9 +8208,9 @@ func (a *CoreApiService) CoreUsersRecoveryRetrieveExecute(r ApiCoreUsersRecovery return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -8125,6 +8227,7 @@ func (a *CoreApiService) CoreUsersRecoveryRetrieveExecute(r ApiCoreUsersRecovery newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -8135,6 +8238,7 @@ func (a *CoreApiService) CoreUsersRecoveryRetrieveExecute(r ApiCoreUsersRecovery newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -8145,6 +8249,7 @@ func (a *CoreApiService) CoreUsersRecoveryRetrieveExecute(r ApiCoreUsersRecovery newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -8205,7 +8310,7 @@ func (a *CoreApiService) CoreUsersRetrieveExecute(r ApiCoreUsersRetrieveRequest) } localVarPath := localBasePath + "/core/users/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -8252,9 +8357,9 @@ func (a *CoreApiService) CoreUsersRetrieveExecute(r ApiCoreUsersRetrieveRequest) return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -8271,6 +8376,7 @@ func (a *CoreApiService) CoreUsersRetrieveExecute(r ApiCoreUsersRetrieveRequest) newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -8281,6 +8387,7 @@ func (a *CoreApiService) CoreUsersRetrieveExecute(r ApiCoreUsersRetrieveRequest) newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -8395,9 +8502,9 @@ func (a *CoreApiService) CoreUsersServiceAccountCreateExecute(r ApiCoreUsersServ return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -8414,6 +8521,7 @@ func (a *CoreApiService) CoreUsersServiceAccountCreateExecute(r ApiCoreUsersServ newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -8424,6 +8532,7 @@ func (a *CoreApiService) CoreUsersServiceAccountCreateExecute(r ApiCoreUsersServ newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -8488,7 +8597,7 @@ func (a *CoreApiService) CoreUsersSetPasswordCreateExecute(r ApiCoreUsersSetPass } localVarPath := localBasePath + "/core/users/{id}/set_password/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -8540,9 +8649,9 @@ func (a *CoreApiService) CoreUsersSetPasswordCreateExecute(r ApiCoreUsersSetPass return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -8559,6 +8668,7 @@ func (a *CoreApiService) CoreUsersSetPasswordCreateExecute(r ApiCoreUsersSetPass newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -8616,7 +8726,7 @@ func (a *CoreApiService) CoreUsersUpdateExecute(r ApiCoreUsersUpdateRequest) (*U } localVarPath := localBasePath + "/core/users/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -8668,9 +8778,9 @@ func (a *CoreApiService) CoreUsersUpdateExecute(r ApiCoreUsersUpdateRequest) (*U return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -8687,6 +8797,7 @@ func (a *CoreApiService) CoreUsersUpdateExecute(r ApiCoreUsersUpdateRequest) (*U newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -8697,6 +8808,7 @@ func (a *CoreApiService) CoreUsersUpdateExecute(r ApiCoreUsersUpdateRequest) (*U newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -8757,7 +8869,7 @@ func (a *CoreApiService) CoreUsersUsedByListExecute(r ApiCoreUsersUsedByListRequ } localVarPath := localBasePath + "/core/users/{id}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -8804,9 +8916,9 @@ func (a *CoreApiService) CoreUsersUsedByListExecute(r ApiCoreUsersUsedByListRequ return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -8823,6 +8935,7 @@ func (a *CoreApiService) CoreUsersUsedByListExecute(r ApiCoreUsersUsedByListRequ newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -8833,6 +8946,7 @@ func (a *CoreApiService) CoreUsersUsedByListExecute(r ApiCoreUsersUsedByListRequ newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr diff --git a/api_crypto.go b/api_crypto.go index 81042df5a..676102c2c 100644 --- a/api_crypto.go +++ b/api_crypto.go @@ -14,7 +14,7 @@ package api import ( "bytes" "context" - "io/ioutil" + "io" "net/http" "net/url" "strings" @@ -120,9 +120,9 @@ func (a *CryptoApiService) CryptoCertificatekeypairsCreateExecute(r ApiCryptoCer return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -139,6 +139,7 @@ func (a *CryptoApiService) CryptoCertificatekeypairsCreateExecute(r ApiCryptoCer newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -149,6 +150,7 @@ func (a *CryptoApiService) CryptoCertificatekeypairsCreateExecute(r ApiCryptoCer newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -207,7 +209,7 @@ func (a *CryptoApiService) CryptoCertificatekeypairsDestroyExecute(r ApiCryptoCe } localVarPath := localBasePath + "/crypto/certificatekeypairs/{kp_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"kp_uuid"+"}", url.PathEscape(parameterToString(r.kpUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"kp_uuid"+"}", url.PathEscape(parameterValueToString(r.kpUuid, "kpUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -254,9 +256,9 @@ func (a *CryptoApiService) CryptoCertificatekeypairsDestroyExecute(r ApiCryptoCe return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -273,6 +275,7 @@ func (a *CryptoApiService) CryptoCertificatekeypairsDestroyExecute(r ApiCryptoCe newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -283,6 +286,7 @@ func (a *CryptoApiService) CryptoCertificatekeypairsDestroyExecute(r ApiCryptoCe newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -388,9 +392,9 @@ func (a *CryptoApiService) CryptoCertificatekeypairsGenerateCreateExecute(r ApiC return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -407,6 +411,7 @@ func (a *CryptoApiService) CryptoCertificatekeypairsGenerateCreateExecute(r ApiC newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -525,28 +530,28 @@ func (a *CryptoApiService) CryptoCertificatekeypairsListExecute(r ApiCryptoCerti localVarFormParams := url.Values{} if r.hasKey != nil { - localVarQueryParams.Add("has_key", parameterToString(*r.hasKey, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "has_key", r.hasKey, "") } if r.includeDetails != nil { - localVarQueryParams.Add("include_details", parameterToString(*r.includeDetails, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "include_details", r.includeDetails, "") } if r.managed != nil { - localVarQueryParams.Add("managed", parameterToString(*r.managed, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "managed", r.managed, "") } if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -589,9 +594,9 @@ func (a *CryptoApiService) CryptoCertificatekeypairsListExecute(r ApiCryptoCerti return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -608,6 +613,7 @@ func (a *CryptoApiService) CryptoCertificatekeypairsListExecute(r ApiCryptoCerti newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -618,6 +624,7 @@ func (a *CryptoApiService) CryptoCertificatekeypairsListExecute(r ApiCryptoCerti newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -684,7 +691,7 @@ func (a *CryptoApiService) CryptoCertificatekeypairsPartialUpdateExecute(r ApiCr } localVarPath := localBasePath + "/crypto/certificatekeypairs/{kp_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"kp_uuid"+"}", url.PathEscape(parameterToString(r.kpUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"kp_uuid"+"}", url.PathEscape(parameterValueToString(r.kpUuid, "kpUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -733,9 +740,9 @@ func (a *CryptoApiService) CryptoCertificatekeypairsPartialUpdateExecute(r ApiCr return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -752,6 +759,7 @@ func (a *CryptoApiService) CryptoCertificatekeypairsPartialUpdateExecute(r ApiCr newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -762,6 +770,7 @@ func (a *CryptoApiService) CryptoCertificatekeypairsPartialUpdateExecute(r ApiCr newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -822,7 +831,7 @@ func (a *CryptoApiService) CryptoCertificatekeypairsRetrieveExecute(r ApiCryptoC } localVarPath := localBasePath + "/crypto/certificatekeypairs/{kp_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"kp_uuid"+"}", url.PathEscape(parameterToString(r.kpUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"kp_uuid"+"}", url.PathEscape(parameterValueToString(r.kpUuid, "kpUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -869,9 +878,9 @@ func (a *CryptoApiService) CryptoCertificatekeypairsRetrieveExecute(r ApiCryptoC return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -888,6 +897,7 @@ func (a *CryptoApiService) CryptoCertificatekeypairsRetrieveExecute(r ApiCryptoC newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -898,6 +908,7 @@ func (a *CryptoApiService) CryptoCertificatekeypairsRetrieveExecute(r ApiCryptoC newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -964,7 +975,7 @@ func (a *CryptoApiService) CryptoCertificatekeypairsUpdateExecute(r ApiCryptoCer } localVarPath := localBasePath + "/crypto/certificatekeypairs/{kp_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"kp_uuid"+"}", url.PathEscape(parameterToString(r.kpUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"kp_uuid"+"}", url.PathEscape(parameterValueToString(r.kpUuid, "kpUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1016,9 +1027,9 @@ func (a *CryptoApiService) CryptoCertificatekeypairsUpdateExecute(r ApiCryptoCer return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1035,6 +1046,7 @@ func (a *CryptoApiService) CryptoCertificatekeypairsUpdateExecute(r ApiCryptoCer newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1045,6 +1057,7 @@ func (a *CryptoApiService) CryptoCertificatekeypairsUpdateExecute(r ApiCryptoCer newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1105,7 +1118,7 @@ func (a *CryptoApiService) CryptoCertificatekeypairsUsedByListExecute(r ApiCrypt } localVarPath := localBasePath + "/crypto/certificatekeypairs/{kp_uuid}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"kp_uuid"+"}", url.PathEscape(parameterToString(r.kpUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"kp_uuid"+"}", url.PathEscape(parameterValueToString(r.kpUuid, "kpUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1152,9 +1165,9 @@ func (a *CryptoApiService) CryptoCertificatekeypairsUsedByListExecute(r ApiCrypt return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1171,6 +1184,7 @@ func (a *CryptoApiService) CryptoCertificatekeypairsUsedByListExecute(r ApiCrypt newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1181,6 +1195,7 @@ func (a *CryptoApiService) CryptoCertificatekeypairsUsedByListExecute(r ApiCrypt newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1247,14 +1262,14 @@ func (a *CryptoApiService) CryptoCertificatekeypairsViewCertificateRetrieveExecu } localVarPath := localBasePath + "/crypto/certificatekeypairs/{kp_uuid}/view_certificate/" - localVarPath = strings.Replace(localVarPath, "{"+"kp_uuid"+"}", url.PathEscape(parameterToString(r.kpUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"kp_uuid"+"}", url.PathEscape(parameterValueToString(r.kpUuid, "kpUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} if r.download != nil { - localVarQueryParams.Add("download", parameterToString(*r.download, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "download", r.download, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1297,9 +1312,9 @@ func (a *CryptoApiService) CryptoCertificatekeypairsViewCertificateRetrieveExecu return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1316,6 +1331,7 @@ func (a *CryptoApiService) CryptoCertificatekeypairsViewCertificateRetrieveExecu newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1326,6 +1342,7 @@ func (a *CryptoApiService) CryptoCertificatekeypairsViewCertificateRetrieveExecu newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1392,14 +1409,14 @@ func (a *CryptoApiService) CryptoCertificatekeypairsViewPrivateKeyRetrieveExecut } localVarPath := localBasePath + "/crypto/certificatekeypairs/{kp_uuid}/view_private_key/" - localVarPath = strings.Replace(localVarPath, "{"+"kp_uuid"+"}", url.PathEscape(parameterToString(r.kpUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"kp_uuid"+"}", url.PathEscape(parameterValueToString(r.kpUuid, "kpUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} if r.download != nil { - localVarQueryParams.Add("download", parameterToString(*r.download, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "download", r.download, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1442,9 +1459,9 @@ func (a *CryptoApiService) CryptoCertificatekeypairsViewPrivateKeyRetrieveExecut return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1461,6 +1478,7 @@ func (a *CryptoApiService) CryptoCertificatekeypairsViewPrivateKeyRetrieveExecut newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1471,6 +1489,7 @@ func (a *CryptoApiService) CryptoCertificatekeypairsViewPrivateKeyRetrieveExecut newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr diff --git a/api_events.go b/api_events.go index 6c28b0aca..8de4ceb0b 100644 --- a/api_events.go +++ b/api_events.go @@ -14,7 +14,7 @@ package api import ( "bytes" "context" - "io/ioutil" + "io" "net/http" "net/url" "strings" @@ -110,9 +110,9 @@ func (a *EventsApiService) EventsEventsActionsListExecute(r ApiEventsEventsActio return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -129,6 +129,7 @@ func (a *EventsApiService) EventsEventsActionsListExecute(r ApiEventsEventsActio newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -139,6 +140,7 @@ func (a *EventsApiService) EventsEventsActionsListExecute(r ApiEventsEventsActio newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -253,9 +255,9 @@ func (a *EventsApiService) EventsEventsCreateExecute(r ApiEventsEventsCreateRequ return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -272,6 +274,7 @@ func (a *EventsApiService) EventsEventsCreateExecute(r ApiEventsEventsCreateRequ newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -282,6 +285,7 @@ func (a *EventsApiService) EventsEventsCreateExecute(r ApiEventsEventsCreateRequ newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -340,7 +344,7 @@ func (a *EventsApiService) EventsEventsDestroyExecute(r ApiEventsEventsDestroyRe } localVarPath := localBasePath + "/events/events/{event_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"event_uuid"+"}", url.PathEscape(parameterToString(r.eventUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"event_uuid"+"}", url.PathEscape(parameterValueToString(r.eventUuid, "eventUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -387,9 +391,9 @@ func (a *EventsApiService) EventsEventsDestroyExecute(r ApiEventsEventsDestroyRe return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -406,6 +410,7 @@ func (a *EventsApiService) EventsEventsDestroyExecute(r ApiEventsEventsDestroyRe newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -416,6 +421,7 @@ func (a *EventsApiService) EventsEventsDestroyExecute(r ApiEventsEventsDestroyRe newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -552,40 +558,40 @@ func (a *EventsApiService) EventsEventsListExecute(r ApiEventsEventsListRequest) localVarFormParams := url.Values{} if r.action != nil { - localVarQueryParams.Add("action", parameterToString(*r.action, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "action", r.action, "") } if r.clientIp != nil { - localVarQueryParams.Add("client_ip", parameterToString(*r.clientIp, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "client_ip", r.clientIp, "") } if r.contextAuthorizedApp != nil { - localVarQueryParams.Add("context_authorized_app", parameterToString(*r.contextAuthorizedApp, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "context_authorized_app", r.contextAuthorizedApp, "") } if r.contextModelApp != nil { - localVarQueryParams.Add("context_model_app", parameterToString(*r.contextModelApp, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "context_model_app", r.contextModelApp, "") } if r.contextModelName != nil { - localVarQueryParams.Add("context_model_name", parameterToString(*r.contextModelName, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "context_model_name", r.contextModelName, "") } if r.contextModelPk != nil { - localVarQueryParams.Add("context_model_pk", parameterToString(*r.contextModelPk, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "context_model_pk", r.contextModelPk, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } if r.tenantName != nil { - localVarQueryParams.Add("tenant_name", parameterToString(*r.tenantName, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "tenant_name", r.tenantName, "") } if r.username != nil { - localVarQueryParams.Add("username", parameterToString(*r.username, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "username", r.username, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -628,9 +634,9 @@ func (a *EventsApiService) EventsEventsListExecute(r ApiEventsEventsListRequest) return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -647,6 +653,7 @@ func (a *EventsApiService) EventsEventsListExecute(r ApiEventsEventsListRequest) newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -657,6 +664,7 @@ func (a *EventsApiService) EventsEventsListExecute(r ApiEventsEventsListRequest) newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -723,7 +731,7 @@ func (a *EventsApiService) EventsEventsPartialUpdateExecute(r ApiEventsEventsPar } localVarPath := localBasePath + "/events/events/{event_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"event_uuid"+"}", url.PathEscape(parameterToString(r.eventUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"event_uuid"+"}", url.PathEscape(parameterValueToString(r.eventUuid, "eventUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -772,9 +780,9 @@ func (a *EventsApiService) EventsEventsPartialUpdateExecute(r ApiEventsEventsPar return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -791,6 +799,7 @@ func (a *EventsApiService) EventsEventsPartialUpdateExecute(r ApiEventsEventsPar newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -801,6 +810,7 @@ func (a *EventsApiService) EventsEventsPartialUpdateExecute(r ApiEventsEventsPar newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -876,10 +886,10 @@ func (a *EventsApiService) EventsEventsPerMonthListExecute(r ApiEventsEventsPerM localVarFormParams := url.Values{} if r.action != nil { - localVarQueryParams.Add("action", parameterToString(*r.action, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "action", r.action, "") } if r.query != nil { - localVarQueryParams.Add("query", parameterToString(*r.query, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "query", r.query, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -922,9 +932,9 @@ func (a *EventsApiService) EventsEventsPerMonthListExecute(r ApiEventsEventsPerM return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -941,6 +951,7 @@ func (a *EventsApiService) EventsEventsPerMonthListExecute(r ApiEventsEventsPerM newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -951,6 +962,7 @@ func (a *EventsApiService) EventsEventsPerMonthListExecute(r ApiEventsEventsPerM newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1011,7 +1023,7 @@ func (a *EventsApiService) EventsEventsRetrieveExecute(r ApiEventsEventsRetrieve } localVarPath := localBasePath + "/events/events/{event_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"event_uuid"+"}", url.PathEscape(parameterToString(r.eventUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"event_uuid"+"}", url.PathEscape(parameterValueToString(r.eventUuid, "eventUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1058,9 +1070,9 @@ func (a *EventsApiService) EventsEventsRetrieveExecute(r ApiEventsEventsRetrieve return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1077,6 +1089,7 @@ func (a *EventsApiService) EventsEventsRetrieveExecute(r ApiEventsEventsRetrieve newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1087,6 +1100,7 @@ func (a *EventsApiService) EventsEventsRetrieveExecute(r ApiEventsEventsRetrieve newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1162,10 +1176,10 @@ func (a *EventsApiService) EventsEventsTopPerUserListExecute(r ApiEventsEventsTo localVarFormParams := url.Values{} if r.action != nil { - localVarQueryParams.Add("action", parameterToString(*r.action, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "action", r.action, "") } if r.topN != nil { - localVarQueryParams.Add("top_n", parameterToString(*r.topN, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "top_n", r.topN, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1208,9 +1222,9 @@ func (a *EventsApiService) EventsEventsTopPerUserListExecute(r ApiEventsEventsTo return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1227,6 +1241,7 @@ func (a *EventsApiService) EventsEventsTopPerUserListExecute(r ApiEventsEventsTo newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1237,6 +1252,7 @@ func (a *EventsApiService) EventsEventsTopPerUserListExecute(r ApiEventsEventsTo newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1303,7 +1319,7 @@ func (a *EventsApiService) EventsEventsUpdateExecute(r ApiEventsEventsUpdateRequ } localVarPath := localBasePath + "/events/events/{event_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"event_uuid"+"}", url.PathEscape(parameterToString(r.eventUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"event_uuid"+"}", url.PathEscape(parameterValueToString(r.eventUuid, "eventUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1355,9 +1371,9 @@ func (a *EventsApiService) EventsEventsUpdateExecute(r ApiEventsEventsUpdateRequ return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1374,6 +1390,7 @@ func (a *EventsApiService) EventsEventsUpdateExecute(r ApiEventsEventsUpdateRequ newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1384,6 +1401,7 @@ func (a *EventsApiService) EventsEventsUpdateExecute(r ApiEventsEventsUpdateRequ newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1442,7 +1460,7 @@ func (a *EventsApiService) EventsNotificationsDestroyExecute(r ApiEventsNotifica } localVarPath := localBasePath + "/events/notifications/{uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterToString(r.uuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterValueToString(r.uuid, "uuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1489,9 +1507,9 @@ func (a *EventsApiService) EventsNotificationsDestroyExecute(r ApiEventsNotifica return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -1508,6 +1526,7 @@ func (a *EventsApiService) EventsNotificationsDestroyExecute(r ApiEventsNotifica newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -1518,6 +1537,7 @@ func (a *EventsApiService) EventsNotificationsDestroyExecute(r ApiEventsNotifica newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -1637,34 +1657,34 @@ func (a *EventsApiService) EventsNotificationsListExecute(r ApiEventsNotificatio localVarFormParams := url.Values{} if r.body != nil { - localVarQueryParams.Add("body", parameterToString(*r.body, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "body", r.body, "") } if r.created != nil { - localVarQueryParams.Add("created", parameterToString(*r.created, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "created", r.created, "") } if r.event != nil { - localVarQueryParams.Add("event", parameterToString(*r.event, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "event", r.event, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } if r.seen != nil { - localVarQueryParams.Add("seen", parameterToString(*r.seen, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "seen", r.seen, "") } if r.severity != nil { - localVarQueryParams.Add("severity", parameterToString(*r.severity, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "severity", r.severity, "") } if r.user != nil { - localVarQueryParams.Add("user", parameterToString(*r.user, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "user", r.user, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1707,9 +1727,9 @@ func (a *EventsApiService) EventsNotificationsListExecute(r ApiEventsNotificatio return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1726,6 +1746,7 @@ func (a *EventsApiService) EventsNotificationsListExecute(r ApiEventsNotificatio newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1736,6 +1757,7 @@ func (a *EventsApiService) EventsNotificationsListExecute(r ApiEventsNotificatio newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1837,9 +1859,9 @@ func (a *EventsApiService) EventsNotificationsMarkAllSeenCreateExecute(r ApiEven return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -1856,6 +1878,7 @@ func (a *EventsApiService) EventsNotificationsMarkAllSeenCreateExecute(r ApiEven newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -1866,6 +1889,7 @@ func (a *EventsApiService) EventsNotificationsMarkAllSeenCreateExecute(r ApiEven newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -1923,7 +1947,7 @@ func (a *EventsApiService) EventsNotificationsPartialUpdateExecute(r ApiEventsNo } localVarPath := localBasePath + "/events/notifications/{uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterToString(r.uuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterValueToString(r.uuid, "uuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1972,9 +1996,9 @@ func (a *EventsApiService) EventsNotificationsPartialUpdateExecute(r ApiEventsNo return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1991,6 +2015,7 @@ func (a *EventsApiService) EventsNotificationsPartialUpdateExecute(r ApiEventsNo newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2001,6 +2026,7 @@ func (a *EventsApiService) EventsNotificationsPartialUpdateExecute(r ApiEventsNo newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2061,7 +2087,7 @@ func (a *EventsApiService) EventsNotificationsRetrieveExecute(r ApiEventsNotific } localVarPath := localBasePath + "/events/notifications/{uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterToString(r.uuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterValueToString(r.uuid, "uuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2108,9 +2134,9 @@ func (a *EventsApiService) EventsNotificationsRetrieveExecute(r ApiEventsNotific return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2127,6 +2153,7 @@ func (a *EventsApiService) EventsNotificationsRetrieveExecute(r ApiEventsNotific newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2137,6 +2164,7 @@ func (a *EventsApiService) EventsNotificationsRetrieveExecute(r ApiEventsNotific newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2203,7 +2231,7 @@ func (a *EventsApiService) EventsNotificationsUpdateExecute(r ApiEventsNotificat } localVarPath := localBasePath + "/events/notifications/{uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterToString(r.uuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterValueToString(r.uuid, "uuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2252,9 +2280,9 @@ func (a *EventsApiService) EventsNotificationsUpdateExecute(r ApiEventsNotificat return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2271,6 +2299,7 @@ func (a *EventsApiService) EventsNotificationsUpdateExecute(r ApiEventsNotificat newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2281,6 +2310,7 @@ func (a *EventsApiService) EventsNotificationsUpdateExecute(r ApiEventsNotificat newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2341,7 +2371,7 @@ func (a *EventsApiService) EventsNotificationsUsedByListExecute(r ApiEventsNotif } localVarPath := localBasePath + "/events/notifications/{uuid}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterToString(r.uuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterValueToString(r.uuid, "uuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2388,9 +2418,9 @@ func (a *EventsApiService) EventsNotificationsUsedByListExecute(r ApiEventsNotif return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2407,6 +2437,7 @@ func (a *EventsApiService) EventsNotificationsUsedByListExecute(r ApiEventsNotif newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2417,6 +2448,7 @@ func (a *EventsApiService) EventsNotificationsUsedByListExecute(r ApiEventsNotif newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2531,9 +2563,9 @@ func (a *EventsApiService) EventsRulesCreateExecute(r ApiEventsRulesCreateReques return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2550,6 +2582,7 @@ func (a *EventsApiService) EventsRulesCreateExecute(r ApiEventsRulesCreateReques newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2560,6 +2593,7 @@ func (a *EventsApiService) EventsRulesCreateExecute(r ApiEventsRulesCreateReques newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2618,7 +2652,7 @@ func (a *EventsApiService) EventsRulesDestroyExecute(r ApiEventsRulesDestroyRequ } localVarPath := localBasePath + "/events/rules/{pbm_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"pbm_uuid"+"}", url.PathEscape(parameterToString(r.pbmUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"pbm_uuid"+"}", url.PathEscape(parameterValueToString(r.pbmUuid, "pbmUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2665,9 +2699,9 @@ func (a *EventsApiService) EventsRulesDestroyExecute(r ApiEventsRulesDestroyRequ return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -2684,6 +2718,7 @@ func (a *EventsApiService) EventsRulesDestroyExecute(r ApiEventsRulesDestroyRequ newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -2694,6 +2729,7 @@ func (a *EventsApiService) EventsRulesDestroyExecute(r ApiEventsRulesDestroyRequ newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -2795,25 +2831,25 @@ func (a *EventsApiService) EventsRulesListExecute(r ApiEventsRulesListRequest) ( localVarFormParams := url.Values{} if r.groupName != nil { - localVarQueryParams.Add("group__name", parameterToString(*r.groupName, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "group__name", r.groupName, "") } if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } if r.severity != nil { - localVarQueryParams.Add("severity", parameterToString(*r.severity, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "severity", r.severity, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -2856,9 +2892,9 @@ func (a *EventsApiService) EventsRulesListExecute(r ApiEventsRulesListRequest) ( return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2875,6 +2911,7 @@ func (a *EventsApiService) EventsRulesListExecute(r ApiEventsRulesListRequest) ( newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2885,6 +2922,7 @@ func (a *EventsApiService) EventsRulesListExecute(r ApiEventsRulesListRequest) ( newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2951,7 +2989,7 @@ func (a *EventsApiService) EventsRulesPartialUpdateExecute(r ApiEventsRulesParti } localVarPath := localBasePath + "/events/rules/{pbm_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"pbm_uuid"+"}", url.PathEscape(parameterToString(r.pbmUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"pbm_uuid"+"}", url.PathEscape(parameterValueToString(r.pbmUuid, "pbmUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -3000,9 +3038,9 @@ func (a *EventsApiService) EventsRulesPartialUpdateExecute(r ApiEventsRulesParti return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -3019,6 +3057,7 @@ func (a *EventsApiService) EventsRulesPartialUpdateExecute(r ApiEventsRulesParti newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -3029,6 +3068,7 @@ func (a *EventsApiService) EventsRulesPartialUpdateExecute(r ApiEventsRulesParti newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3089,7 +3129,7 @@ func (a *EventsApiService) EventsRulesRetrieveExecute(r ApiEventsRulesRetrieveRe } localVarPath := localBasePath + "/events/rules/{pbm_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"pbm_uuid"+"}", url.PathEscape(parameterToString(r.pbmUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"pbm_uuid"+"}", url.PathEscape(parameterValueToString(r.pbmUuid, "pbmUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -3136,9 +3176,9 @@ func (a *EventsApiService) EventsRulesRetrieveExecute(r ApiEventsRulesRetrieveRe return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -3155,6 +3195,7 @@ func (a *EventsApiService) EventsRulesRetrieveExecute(r ApiEventsRulesRetrieveRe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -3165,6 +3206,7 @@ func (a *EventsApiService) EventsRulesRetrieveExecute(r ApiEventsRulesRetrieveRe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3231,7 +3273,7 @@ func (a *EventsApiService) EventsRulesUpdateExecute(r ApiEventsRulesUpdateReques } localVarPath := localBasePath + "/events/rules/{pbm_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"pbm_uuid"+"}", url.PathEscape(parameterToString(r.pbmUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"pbm_uuid"+"}", url.PathEscape(parameterValueToString(r.pbmUuid, "pbmUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -3283,9 +3325,9 @@ func (a *EventsApiService) EventsRulesUpdateExecute(r ApiEventsRulesUpdateReques return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -3302,6 +3344,7 @@ func (a *EventsApiService) EventsRulesUpdateExecute(r ApiEventsRulesUpdateReques newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -3312,6 +3355,7 @@ func (a *EventsApiService) EventsRulesUpdateExecute(r ApiEventsRulesUpdateReques newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3372,7 +3416,7 @@ func (a *EventsApiService) EventsRulesUsedByListExecute(r ApiEventsRulesUsedByLi } localVarPath := localBasePath + "/events/rules/{pbm_uuid}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"pbm_uuid"+"}", url.PathEscape(parameterToString(r.pbmUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"pbm_uuid"+"}", url.PathEscape(parameterValueToString(r.pbmUuid, "pbmUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -3419,9 +3463,9 @@ func (a *EventsApiService) EventsRulesUsedByListExecute(r ApiEventsRulesUsedByLi return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -3438,6 +3482,7 @@ func (a *EventsApiService) EventsRulesUsedByListExecute(r ApiEventsRulesUsedByLi newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -3448,6 +3493,7 @@ func (a *EventsApiService) EventsRulesUsedByListExecute(r ApiEventsRulesUsedByLi newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3562,9 +3608,9 @@ func (a *EventsApiService) EventsTransportsCreateExecute(r ApiEventsTransportsCr return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -3581,6 +3627,7 @@ func (a *EventsApiService) EventsTransportsCreateExecute(r ApiEventsTransportsCr newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -3591,6 +3638,7 @@ func (a *EventsApiService) EventsTransportsCreateExecute(r ApiEventsTransportsCr newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3649,7 +3697,7 @@ func (a *EventsApiService) EventsTransportsDestroyExecute(r ApiEventsTransportsD } localVarPath := localBasePath + "/events/transports/{uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterToString(r.uuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterValueToString(r.uuid, "uuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -3696,9 +3744,9 @@ func (a *EventsApiService) EventsTransportsDestroyExecute(r ApiEventsTransportsD return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -3715,6 +3763,7 @@ func (a *EventsApiService) EventsTransportsDestroyExecute(r ApiEventsTransportsD newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -3725,6 +3774,7 @@ func (a *EventsApiService) EventsTransportsDestroyExecute(r ApiEventsTransportsD newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -3832,28 +3882,28 @@ func (a *EventsApiService) EventsTransportsListExecute(r ApiEventsTransportsList localVarFormParams := url.Values{} if r.mode != nil { - localVarQueryParams.Add("mode", parameterToString(*r.mode, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "mode", r.mode, "") } if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } if r.sendOnce != nil { - localVarQueryParams.Add("send_once", parameterToString(*r.sendOnce, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "send_once", r.sendOnce, "") } if r.webhookUrl != nil { - localVarQueryParams.Add("webhook_url", parameterToString(*r.webhookUrl, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "webhook_url", r.webhookUrl, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -3896,9 +3946,9 @@ func (a *EventsApiService) EventsTransportsListExecute(r ApiEventsTransportsList return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -3915,6 +3965,7 @@ func (a *EventsApiService) EventsTransportsListExecute(r ApiEventsTransportsList newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -3925,6 +3976,7 @@ func (a *EventsApiService) EventsTransportsListExecute(r ApiEventsTransportsList newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3991,7 +4043,7 @@ func (a *EventsApiService) EventsTransportsPartialUpdateExecute(r ApiEventsTrans } localVarPath := localBasePath + "/events/transports/{uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterToString(r.uuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterValueToString(r.uuid, "uuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -4040,9 +4092,9 @@ func (a *EventsApiService) EventsTransportsPartialUpdateExecute(r ApiEventsTrans return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -4059,6 +4111,7 @@ func (a *EventsApiService) EventsTransportsPartialUpdateExecute(r ApiEventsTrans newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -4069,6 +4122,7 @@ func (a *EventsApiService) EventsTransportsPartialUpdateExecute(r ApiEventsTrans newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -4129,7 +4183,7 @@ func (a *EventsApiService) EventsTransportsRetrieveExecute(r ApiEventsTransports } localVarPath := localBasePath + "/events/transports/{uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterToString(r.uuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterValueToString(r.uuid, "uuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -4176,9 +4230,9 @@ func (a *EventsApiService) EventsTransportsRetrieveExecute(r ApiEventsTransports return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -4195,6 +4249,7 @@ func (a *EventsApiService) EventsTransportsRetrieveExecute(r ApiEventsTransports newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -4205,6 +4260,7 @@ func (a *EventsApiService) EventsTransportsRetrieveExecute(r ApiEventsTransports newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -4266,7 +4322,7 @@ func (a *EventsApiService) EventsTransportsTestCreateExecute(r ApiEventsTranspor } localVarPath := localBasePath + "/events/transports/{uuid}/test/" - localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterToString(r.uuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterValueToString(r.uuid, "uuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -4313,9 +4369,9 @@ func (a *EventsApiService) EventsTransportsTestCreateExecute(r ApiEventsTranspor return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -4332,6 +4388,7 @@ func (a *EventsApiService) EventsTransportsTestCreateExecute(r ApiEventsTranspor newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -4342,6 +4399,7 @@ func (a *EventsApiService) EventsTransportsTestCreateExecute(r ApiEventsTranspor newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -4408,7 +4466,7 @@ func (a *EventsApiService) EventsTransportsUpdateExecute(r ApiEventsTransportsUp } localVarPath := localBasePath + "/events/transports/{uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterToString(r.uuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterValueToString(r.uuid, "uuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -4460,9 +4518,9 @@ func (a *EventsApiService) EventsTransportsUpdateExecute(r ApiEventsTransportsUp return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -4479,6 +4537,7 @@ func (a *EventsApiService) EventsTransportsUpdateExecute(r ApiEventsTransportsUp newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -4489,6 +4548,7 @@ func (a *EventsApiService) EventsTransportsUpdateExecute(r ApiEventsTransportsUp newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -4549,7 +4609,7 @@ func (a *EventsApiService) EventsTransportsUsedByListExecute(r ApiEventsTranspor } localVarPath := localBasePath + "/events/transports/{uuid}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterToString(r.uuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterValueToString(r.uuid, "uuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -4596,9 +4656,9 @@ func (a *EventsApiService) EventsTransportsUsedByListExecute(r ApiEventsTranspor return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -4615,6 +4675,7 @@ func (a *EventsApiService) EventsTransportsUsedByListExecute(r ApiEventsTranspor newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -4625,6 +4686,7 @@ func (a *EventsApiService) EventsTransportsUsedByListExecute(r ApiEventsTranspor newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr diff --git a/api_flows.go b/api_flows.go index d25840111..aa3c5d9c5 100644 --- a/api_flows.go +++ b/api_flows.go @@ -14,7 +14,7 @@ package api import ( "bytes" "context" - "io/ioutil" + "io" "net/http" "net/url" "os" @@ -122,9 +122,9 @@ func (a *FlowsApiService) FlowsBindingsCreateExecute(r ApiFlowsBindingsCreateReq return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -141,6 +141,7 @@ func (a *FlowsApiService) FlowsBindingsCreateExecute(r ApiFlowsBindingsCreateReq newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -151,6 +152,7 @@ func (a *FlowsApiService) FlowsBindingsCreateExecute(r ApiFlowsBindingsCreateReq newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -209,7 +211,7 @@ func (a *FlowsApiService) FlowsBindingsDestroyExecute(r ApiFlowsBindingsDestroyR } localVarPath := localBasePath + "/flows/bindings/{fsb_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"fsb_uuid"+"}", url.PathEscape(parameterToString(r.fsbUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"fsb_uuid"+"}", url.PathEscape(parameterValueToString(r.fsbUuid, "fsbUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -256,9 +258,9 @@ func (a *FlowsApiService) FlowsBindingsDestroyExecute(r ApiFlowsBindingsDestroyR return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -275,6 +277,7 @@ func (a *FlowsApiService) FlowsBindingsDestroyExecute(r ApiFlowsBindingsDestroyR newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -285,6 +288,7 @@ func (a *FlowsApiService) FlowsBindingsDestroyExecute(r ApiFlowsBindingsDestroyR newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -429,54 +433,54 @@ func (a *FlowsApiService) FlowsBindingsListExecute(r ApiFlowsBindingsListRequest localVarFormParams := url.Values{} if r.evaluateOnPlan != nil { - localVarQueryParams.Add("evaluate_on_plan", parameterToString(*r.evaluateOnPlan, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "evaluate_on_plan", r.evaluateOnPlan, "") } if r.fsbUuid != nil { - localVarQueryParams.Add("fsb_uuid", parameterToString(*r.fsbUuid, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "fsb_uuid", r.fsbUuid, "") } if r.invalidResponseAction != nil { - localVarQueryParams.Add("invalid_response_action", parameterToString(*r.invalidResponseAction, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "invalid_response_action", r.invalidResponseAction, "") } if r.order != nil { - localVarQueryParams.Add("order", parameterToString(*r.order, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "order", r.order, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.pbmUuid != nil { - localVarQueryParams.Add("pbm_uuid", parameterToString(*r.pbmUuid, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "pbm_uuid", r.pbmUuid, "") } if r.policies != nil { t := *r.policies if reflect.TypeOf(t).Kind() == reflect.Slice { s := reflect.ValueOf(t) for i := 0; i < s.Len(); i++ { - localVarQueryParams.Add("policies", parameterToString(s.Index(i), "multi")) + parameterAddToHeaderOrQuery(localVarQueryParams, "policies", s.Index(i), "multi") } } else { - localVarQueryParams.Add("policies", parameterToString(t, "multi")) + parameterAddToHeaderOrQuery(localVarQueryParams, "policies", t, "multi") } } if r.policyEngineMode != nil { - localVarQueryParams.Add("policy_engine_mode", parameterToString(*r.policyEngineMode, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "policy_engine_mode", r.policyEngineMode, "") } if r.reEvaluatePolicies != nil { - localVarQueryParams.Add("re_evaluate_policies", parameterToString(*r.reEvaluatePolicies, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "re_evaluate_policies", r.reEvaluatePolicies, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } if r.stage != nil { - localVarQueryParams.Add("stage", parameterToString(*r.stage, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "stage", r.stage, "") } if r.target != nil { - localVarQueryParams.Add("target", parameterToString(*r.target, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "target", r.target, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -519,9 +523,9 @@ func (a *FlowsApiService) FlowsBindingsListExecute(r ApiFlowsBindingsListRequest return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -538,6 +542,7 @@ func (a *FlowsApiService) FlowsBindingsListExecute(r ApiFlowsBindingsListRequest newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -548,6 +553,7 @@ func (a *FlowsApiService) FlowsBindingsListExecute(r ApiFlowsBindingsListRequest newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -614,7 +620,7 @@ func (a *FlowsApiService) FlowsBindingsPartialUpdateExecute(r ApiFlowsBindingsPa } localVarPath := localBasePath + "/flows/bindings/{fsb_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"fsb_uuid"+"}", url.PathEscape(parameterToString(r.fsbUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"fsb_uuid"+"}", url.PathEscape(parameterValueToString(r.fsbUuid, "fsbUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -663,9 +669,9 @@ func (a *FlowsApiService) FlowsBindingsPartialUpdateExecute(r ApiFlowsBindingsPa return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -682,6 +688,7 @@ func (a *FlowsApiService) FlowsBindingsPartialUpdateExecute(r ApiFlowsBindingsPa newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -692,6 +699,7 @@ func (a *FlowsApiService) FlowsBindingsPartialUpdateExecute(r ApiFlowsBindingsPa newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -752,7 +760,7 @@ func (a *FlowsApiService) FlowsBindingsRetrieveExecute(r ApiFlowsBindingsRetriev } localVarPath := localBasePath + "/flows/bindings/{fsb_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"fsb_uuid"+"}", url.PathEscape(parameterToString(r.fsbUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"fsb_uuid"+"}", url.PathEscape(parameterValueToString(r.fsbUuid, "fsbUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -799,9 +807,9 @@ func (a *FlowsApiService) FlowsBindingsRetrieveExecute(r ApiFlowsBindingsRetriev return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -818,6 +826,7 @@ func (a *FlowsApiService) FlowsBindingsRetrieveExecute(r ApiFlowsBindingsRetriev newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -828,6 +837,7 @@ func (a *FlowsApiService) FlowsBindingsRetrieveExecute(r ApiFlowsBindingsRetriev newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -894,7 +904,7 @@ func (a *FlowsApiService) FlowsBindingsUpdateExecute(r ApiFlowsBindingsUpdateReq } localVarPath := localBasePath + "/flows/bindings/{fsb_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"fsb_uuid"+"}", url.PathEscape(parameterToString(r.fsbUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"fsb_uuid"+"}", url.PathEscape(parameterValueToString(r.fsbUuid, "fsbUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -946,9 +956,9 @@ func (a *FlowsApiService) FlowsBindingsUpdateExecute(r ApiFlowsBindingsUpdateReq return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -965,6 +975,7 @@ func (a *FlowsApiService) FlowsBindingsUpdateExecute(r ApiFlowsBindingsUpdateReq newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -975,6 +986,7 @@ func (a *FlowsApiService) FlowsBindingsUpdateExecute(r ApiFlowsBindingsUpdateReq newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1035,7 +1047,7 @@ func (a *FlowsApiService) FlowsBindingsUsedByListExecute(r ApiFlowsBindingsUsedB } localVarPath := localBasePath + "/flows/bindings/{fsb_uuid}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"fsb_uuid"+"}", url.PathEscape(parameterToString(r.fsbUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"fsb_uuid"+"}", url.PathEscape(parameterValueToString(r.fsbUuid, "fsbUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1082,9 +1094,9 @@ func (a *FlowsApiService) FlowsBindingsUsedByListExecute(r ApiFlowsBindingsUsedB return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1101,6 +1113,7 @@ func (a *FlowsApiService) FlowsBindingsUsedByListExecute(r ApiFlowsBindingsUsedB newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1111,6 +1124,7 @@ func (a *FlowsApiService) FlowsBindingsUsedByListExecute(r ApiFlowsBindingsUsedB newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1178,7 +1192,7 @@ func (a *FlowsApiService) FlowsExecutorGetExecute(r ApiFlowsExecutorGetRequest) } localVarPath := localBasePath + "/flows/executor/{flow_slug}/" - localVarPath = strings.Replace(localVarPath, "{"+"flow_slug"+"}", url.PathEscape(parameterToString(r.flowSlug, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"flow_slug"+"}", url.PathEscape(parameterValueToString(r.flowSlug, "flowSlug")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1187,7 +1201,7 @@ func (a *FlowsApiService) FlowsExecutorGetExecute(r ApiFlowsExecutorGetRequest) return localVarReturnValue, nil, reportError("query is required and must be specified") } - localVarQueryParams.Add("query", parameterToString(*r.query, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "query", r.query, "") // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1229,9 +1243,9 @@ func (a *FlowsApiService) FlowsExecutorGetExecute(r ApiFlowsExecutorGetRequest) return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1248,6 +1262,7 @@ func (a *FlowsApiService) FlowsExecutorGetExecute(r ApiFlowsExecutorGetRequest) newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1258,6 +1273,7 @@ func (a *FlowsApiService) FlowsExecutorGetExecute(r ApiFlowsExecutorGetRequest) newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1331,7 +1347,7 @@ func (a *FlowsApiService) FlowsExecutorSolveExecute(r ApiFlowsExecutorSolveReque } localVarPath := localBasePath + "/flows/executor/{flow_slug}/" - localVarPath = strings.Replace(localVarPath, "{"+"flow_slug"+"}", url.PathEscape(parameterToString(r.flowSlug, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"flow_slug"+"}", url.PathEscape(parameterValueToString(r.flowSlug, "flowSlug")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1340,7 +1356,7 @@ func (a *FlowsApiService) FlowsExecutorSolveExecute(r ApiFlowsExecutorSolveReque return localVarReturnValue, nil, reportError("query is required and must be specified") } - localVarQueryParams.Add("query", parameterToString(*r.query, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "query", r.query, "") // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -1384,9 +1400,9 @@ func (a *FlowsApiService) FlowsExecutorSolveExecute(r ApiFlowsExecutorSolveReque return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1403,6 +1419,7 @@ func (a *FlowsApiService) FlowsExecutorSolveExecute(r ApiFlowsExecutorSolveReque newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1413,6 +1430,7 @@ func (a *FlowsApiService) FlowsExecutorSolveExecute(r ApiFlowsExecutorSolveReque newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1473,7 +1491,7 @@ func (a *FlowsApiService) FlowsInspectorGetExecute(r ApiFlowsInspectorGetRequest } localVarPath := localBasePath + "/flows/inspector/{flow_slug}/" - localVarPath = strings.Replace(localVarPath, "{"+"flow_slug"+"}", url.PathEscape(parameterToString(r.flowSlug, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"flow_slug"+"}", url.PathEscape(parameterValueToString(r.flowSlug, "flowSlug")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1520,9 +1538,9 @@ func (a *FlowsApiService) FlowsInspectorGetExecute(r ApiFlowsInspectorGetRequest return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1539,6 +1557,7 @@ func (a *FlowsApiService) FlowsInspectorGetExecute(r ApiFlowsInspectorGetRequest newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1640,9 +1659,9 @@ func (a *FlowsApiService) FlowsInstancesCacheClearCreateExecute(r ApiFlowsInstan return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -1659,6 +1678,7 @@ func (a *FlowsApiService) FlowsInstancesCacheClearCreateExecute(r ApiFlowsInstan newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -1753,9 +1773,9 @@ func (a *FlowsApiService) FlowsInstancesCacheInfoRetrieveExecute(r ApiFlowsInsta return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1772,6 +1792,7 @@ func (a *FlowsApiService) FlowsInstancesCacheInfoRetrieveExecute(r ApiFlowsInsta newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1782,6 +1803,7 @@ func (a *FlowsApiService) FlowsInstancesCacheInfoRetrieveExecute(r ApiFlowsInsta newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1896,9 +1918,9 @@ func (a *FlowsApiService) FlowsInstancesCreateExecute(r ApiFlowsInstancesCreateR return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1915,6 +1937,7 @@ func (a *FlowsApiService) FlowsInstancesCreateExecute(r ApiFlowsInstancesCreateR newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1925,6 +1948,7 @@ func (a *FlowsApiService) FlowsInstancesCreateExecute(r ApiFlowsInstancesCreateR newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1983,7 +2007,7 @@ func (a *FlowsApiService) FlowsInstancesDestroyExecute(r ApiFlowsInstancesDestro } localVarPath := localBasePath + "/flows/instances/{slug}/" - localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterToString(r.slug, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterValueToString(r.slug, "slug")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2030,9 +2054,9 @@ func (a *FlowsApiService) FlowsInstancesDestroyExecute(r ApiFlowsInstancesDestro return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -2049,6 +2073,7 @@ func (a *FlowsApiService) FlowsInstancesDestroyExecute(r ApiFlowsInstancesDestro newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -2059,6 +2084,7 @@ func (a *FlowsApiService) FlowsInstancesDestroyExecute(r ApiFlowsInstancesDestro newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -2110,7 +2136,7 @@ func (a *FlowsApiService) FlowsInstancesDiagramRetrieveExecute(r ApiFlowsInstanc } localVarPath := localBasePath + "/flows/instances/{slug}/diagram/" - localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterToString(r.slug, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterValueToString(r.slug, "slug")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2157,9 +2183,9 @@ func (a *FlowsApiService) FlowsInstancesDiagramRetrieveExecute(r ApiFlowsInstanc return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2176,6 +2202,7 @@ func (a *FlowsApiService) FlowsInstancesDiagramRetrieveExecute(r ApiFlowsInstanc newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2186,6 +2213,7 @@ func (a *FlowsApiService) FlowsInstancesDiagramRetrieveExecute(r ApiFlowsInstanc newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2246,7 +2274,7 @@ func (a *FlowsApiService) FlowsInstancesExecuteRetrieveExecute(r ApiFlowsInstanc } localVarPath := localBasePath + "/flows/instances/{slug}/execute/" - localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterToString(r.slug, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterValueToString(r.slug, "slug")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2293,9 +2321,9 @@ func (a *FlowsApiService) FlowsInstancesExecuteRetrieveExecute(r ApiFlowsInstanc return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2312,6 +2340,7 @@ func (a *FlowsApiService) FlowsInstancesExecuteRetrieveExecute(r ApiFlowsInstanc newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2335,7 +2364,7 @@ type ApiFlowsInstancesExportRetrieveRequest struct { slug string } -func (r ApiFlowsInstancesExportRetrieveRequest) Execute() (**os.File, *http.Response, error) { +func (r ApiFlowsInstancesExportRetrieveRequest) Execute() (*os.File, *http.Response, error) { return r.ApiService.FlowsInstancesExportRetrieveExecute(r) } @@ -2358,12 +2387,12 @@ func (a *FlowsApiService) FlowsInstancesExportRetrieve(ctx context.Context, slug // Execute executes the request // @return *os.File -func (a *FlowsApiService) FlowsInstancesExportRetrieveExecute(r ApiFlowsInstancesExportRetrieveRequest) (**os.File, *http.Response, error) { +func (a *FlowsApiService) FlowsInstancesExportRetrieveExecute(r ApiFlowsInstancesExportRetrieveRequest) (*os.File, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue **os.File + localVarReturnValue *os.File ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FlowsApiService.FlowsInstancesExportRetrieve") @@ -2372,7 +2401,7 @@ func (a *FlowsApiService) FlowsInstancesExportRetrieveExecute(r ApiFlowsInstance } localVarPath := localBasePath + "/flows/instances/{slug}/export/" - localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterToString(r.slug, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterValueToString(r.slug, "slug")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2419,9 +2448,9 @@ func (a *FlowsApiService) FlowsInstancesExportRetrieveExecute(r ApiFlowsInstance return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2438,6 +2467,7 @@ func (a *FlowsApiService) FlowsInstancesExportRetrieveExecute(r ApiFlowsInstance newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2448,6 +2478,7 @@ func (a *FlowsApiService) FlowsInstancesExportRetrieveExecute(r ApiFlowsInstance newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2468,12 +2499,12 @@ func (a *FlowsApiService) FlowsInstancesExportRetrieveExecute(r ApiFlowsInstance type ApiFlowsInstancesImportCreateRequest struct { ctx context.Context ApiService *FlowsApiService - file **os.File + file *os.File clear *bool } func (r ApiFlowsInstancesImportCreateRequest) File(file *os.File) ApiFlowsInstancesImportCreateRequest { - r.file = &file + r.file = file return r } @@ -2545,19 +2576,18 @@ func (a *FlowsApiService) FlowsInstancesImportCreateExecute(r ApiFlowsInstancesI fileLocalVarFormFileName = "file" - var fileLocalVarFile *os.File - if r.file != nil { - fileLocalVarFile = *r.file - } + fileLocalVarFile := r.file + if fileLocalVarFile != nil { - fbs, _ := ioutil.ReadAll(fileLocalVarFile) + fbs, _ := io.ReadAll(fileLocalVarFile) + fileLocalVarFileBytes = fbs fileLocalVarFileName = fileLocalVarFile.Name() fileLocalVarFile.Close() + formFiles = append(formFiles, formFile{fileBytes: fileLocalVarFileBytes, fileName: fileLocalVarFileName, formFileName: fileLocalVarFormFileName}) } - formFiles = append(formFiles, formFile{fileBytes: fileLocalVarFileBytes, fileName: fileLocalVarFileName, formFileName: fileLocalVarFormFileName}) if r.clear != nil { - localVarFormParams.Add("clear", parameterToString(*r.clear, "")) + parameterAddToHeaderOrQuery(localVarFormParams, "clear", r.clear, "") } if r.ctx != nil { // API Key Authentication @@ -2583,9 +2613,9 @@ func (a *FlowsApiService) FlowsInstancesImportCreateExecute(r ApiFlowsInstancesI return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2602,6 +2632,7 @@ func (a *FlowsApiService) FlowsInstancesImportCreateExecute(r ApiFlowsInstancesI newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2612,6 +2643,7 @@ func (a *FlowsApiService) FlowsInstancesImportCreateExecute(r ApiFlowsInstancesI newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2735,31 +2767,31 @@ func (a *FlowsApiService) FlowsInstancesListExecute(r ApiFlowsInstancesListReque localVarFormParams := url.Values{} if r.deniedAction != nil { - localVarQueryParams.Add("denied_action", parameterToString(*r.deniedAction, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "denied_action", r.deniedAction, "") } if r.designation != nil { - localVarQueryParams.Add("designation", parameterToString(*r.designation, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "designation", r.designation, "") } if r.flowUuid != nil { - localVarQueryParams.Add("flow_uuid", parameterToString(*r.flowUuid, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "flow_uuid", r.flowUuid, "") } if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } if r.slug != nil { - localVarQueryParams.Add("slug", parameterToString(*r.slug, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "slug", r.slug, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -2802,9 +2834,9 @@ func (a *FlowsApiService) FlowsInstancesListExecute(r ApiFlowsInstancesListReque return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2821,6 +2853,7 @@ func (a *FlowsApiService) FlowsInstancesListExecute(r ApiFlowsInstancesListReque newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2831,6 +2864,7 @@ func (a *FlowsApiService) FlowsInstancesListExecute(r ApiFlowsInstancesListReque newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2897,7 +2931,7 @@ func (a *FlowsApiService) FlowsInstancesPartialUpdateExecute(r ApiFlowsInstances } localVarPath := localBasePath + "/flows/instances/{slug}/" - localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterToString(r.slug, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterValueToString(r.slug, "slug")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2946,9 +2980,9 @@ func (a *FlowsApiService) FlowsInstancesPartialUpdateExecute(r ApiFlowsInstances return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2965,6 +2999,7 @@ func (a *FlowsApiService) FlowsInstancesPartialUpdateExecute(r ApiFlowsInstances newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2975,6 +3010,7 @@ func (a *FlowsApiService) FlowsInstancesPartialUpdateExecute(r ApiFlowsInstances newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3035,7 +3071,7 @@ func (a *FlowsApiService) FlowsInstancesRetrieveExecute(r ApiFlowsInstancesRetri } localVarPath := localBasePath + "/flows/instances/{slug}/" - localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterToString(r.slug, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterValueToString(r.slug, "slug")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -3082,9 +3118,9 @@ func (a *FlowsApiService) FlowsInstancesRetrieveExecute(r ApiFlowsInstancesRetri return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -3101,6 +3137,7 @@ func (a *FlowsApiService) FlowsInstancesRetrieveExecute(r ApiFlowsInstancesRetri newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -3111,6 +3148,7 @@ func (a *FlowsApiService) FlowsInstancesRetrieveExecute(r ApiFlowsInstancesRetri newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3132,12 +3170,12 @@ type ApiFlowsInstancesSetBackgroundCreateRequest struct { ctx context.Context ApiService *FlowsApiService slug string - file **os.File + file *os.File clear *bool } func (r ApiFlowsInstancesSetBackgroundCreateRequest) File(file *os.File) ApiFlowsInstancesSetBackgroundCreateRequest { - r.file = &file + r.file = file return r } @@ -3181,7 +3219,7 @@ func (a *FlowsApiService) FlowsInstancesSetBackgroundCreateExecute(r ApiFlowsIns } localVarPath := localBasePath + "/flows/instances/{slug}/set_background/" - localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterToString(r.slug, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterValueToString(r.slug, "slug")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -3210,19 +3248,18 @@ func (a *FlowsApiService) FlowsInstancesSetBackgroundCreateExecute(r ApiFlowsIns fileLocalVarFormFileName = "file" - var fileLocalVarFile *os.File - if r.file != nil { - fileLocalVarFile = *r.file - } + fileLocalVarFile := r.file + if fileLocalVarFile != nil { - fbs, _ := ioutil.ReadAll(fileLocalVarFile) + fbs, _ := io.ReadAll(fileLocalVarFile) + fileLocalVarFileBytes = fbs fileLocalVarFileName = fileLocalVarFile.Name() fileLocalVarFile.Close() + formFiles = append(formFiles, formFile{fileBytes: fileLocalVarFileBytes, fileName: fileLocalVarFileName, formFileName: fileLocalVarFormFileName}) } - formFiles = append(formFiles, formFile{fileBytes: fileLocalVarFileBytes, fileName: fileLocalVarFileName, formFileName: fileLocalVarFormFileName}) if r.clear != nil { - localVarFormParams.Add("clear", parameterToString(*r.clear, "")) + parameterAddToHeaderOrQuery(localVarFormParams, "clear", r.clear, "") } if r.ctx != nil { // API Key Authentication @@ -3248,9 +3285,9 @@ func (a *FlowsApiService) FlowsInstancesSetBackgroundCreateExecute(r ApiFlowsIns return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -3267,6 +3304,7 @@ func (a *FlowsApiService) FlowsInstancesSetBackgroundCreateExecute(r ApiFlowsIns newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -3322,7 +3360,7 @@ func (a *FlowsApiService) FlowsInstancesSetBackgroundUrlCreateExecute(r ApiFlows } localVarPath := localBasePath + "/flows/instances/{slug}/set_background_url/" - localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterToString(r.slug, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterValueToString(r.slug, "slug")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -3374,9 +3412,9 @@ func (a *FlowsApiService) FlowsInstancesSetBackgroundUrlCreateExecute(r ApiFlows return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -3393,6 +3431,7 @@ func (a *FlowsApiService) FlowsInstancesSetBackgroundUrlCreateExecute(r ApiFlows newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -3450,7 +3489,7 @@ func (a *FlowsApiService) FlowsInstancesUpdateExecute(r ApiFlowsInstancesUpdateR } localVarPath := localBasePath + "/flows/instances/{slug}/" - localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterToString(r.slug, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterValueToString(r.slug, "slug")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -3502,9 +3541,9 @@ func (a *FlowsApiService) FlowsInstancesUpdateExecute(r ApiFlowsInstancesUpdateR return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -3521,6 +3560,7 @@ func (a *FlowsApiService) FlowsInstancesUpdateExecute(r ApiFlowsInstancesUpdateR newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -3531,6 +3571,7 @@ func (a *FlowsApiService) FlowsInstancesUpdateExecute(r ApiFlowsInstancesUpdateR newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3591,7 +3632,7 @@ func (a *FlowsApiService) FlowsInstancesUsedByListExecute(r ApiFlowsInstancesUse } localVarPath := localBasePath + "/flows/instances/{slug}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterToString(r.slug, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterValueToString(r.slug, "slug")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -3638,9 +3679,9 @@ func (a *FlowsApiService) FlowsInstancesUsedByListExecute(r ApiFlowsInstancesUse return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -3657,6 +3698,7 @@ func (a *FlowsApiService) FlowsInstancesUsedByListExecute(r ApiFlowsInstancesUse newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -3667,6 +3709,7 @@ func (a *FlowsApiService) FlowsInstancesUsedByListExecute(r ApiFlowsInstancesUse newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr diff --git a/api_managed.go b/api_managed.go index bdf158573..02ff1fda6 100644 --- a/api_managed.go +++ b/api_managed.go @@ -14,7 +14,7 @@ package api import ( "bytes" "context" - "io/ioutil" + "io" "net/http" "net/url" "strings" @@ -66,7 +66,7 @@ func (a *ManagedApiService) ManagedBlueprintsApplyCreateExecute(r ApiManagedBlue } localVarPath := localBasePath + "/managed/blueprints/{instance_uuid}/apply/" - localVarPath = strings.Replace(localVarPath, "{"+"instance_uuid"+"}", url.PathEscape(parameterToString(r.instanceUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instance_uuid"+"}", url.PathEscape(parameterValueToString(r.instanceUuid, "instanceUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -113,9 +113,9 @@ func (a *ManagedApiService) ManagedBlueprintsApplyCreateExecute(r ApiManagedBlue return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -132,6 +132,7 @@ func (a *ManagedApiService) ManagedBlueprintsApplyCreateExecute(r ApiManagedBlue newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -142,6 +143,7 @@ func (a *ManagedApiService) ManagedBlueprintsApplyCreateExecute(r ApiManagedBlue newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -245,9 +247,9 @@ func (a *ManagedApiService) ManagedBlueprintsAvailableListExecute(r ApiManagedBl return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -264,6 +266,7 @@ func (a *ManagedApiService) ManagedBlueprintsAvailableListExecute(r ApiManagedBl newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -274,6 +277,7 @@ func (a *ManagedApiService) ManagedBlueprintsAvailableListExecute(r ApiManagedBl newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -388,9 +392,9 @@ func (a *ManagedApiService) ManagedBlueprintsCreateExecute(r ApiManagedBlueprint return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -407,6 +411,7 @@ func (a *ManagedApiService) ManagedBlueprintsCreateExecute(r ApiManagedBlueprint newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -417,6 +422,7 @@ func (a *ManagedApiService) ManagedBlueprintsCreateExecute(r ApiManagedBlueprint newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -475,7 +481,7 @@ func (a *ManagedApiService) ManagedBlueprintsDestroyExecute(r ApiManagedBlueprin } localVarPath := localBasePath + "/managed/blueprints/{instance_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"instance_uuid"+"}", url.PathEscape(parameterToString(r.instanceUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instance_uuid"+"}", url.PathEscape(parameterValueToString(r.instanceUuid, "instanceUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -522,9 +528,9 @@ func (a *ManagedApiService) ManagedBlueprintsDestroyExecute(r ApiManagedBlueprin return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -541,6 +547,7 @@ func (a *ManagedApiService) ManagedBlueprintsDestroyExecute(r ApiManagedBlueprin newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -551,6 +558,7 @@ func (a *ManagedApiService) ManagedBlueprintsDestroyExecute(r ApiManagedBlueprin newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -645,22 +653,22 @@ func (a *ManagedApiService) ManagedBlueprintsListExecute(r ApiManagedBlueprintsL localVarFormParams := url.Values{} if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.path != nil { - localVarQueryParams.Add("path", parameterToString(*r.path, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "path", r.path, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -703,9 +711,9 @@ func (a *ManagedApiService) ManagedBlueprintsListExecute(r ApiManagedBlueprintsL return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -722,6 +730,7 @@ func (a *ManagedApiService) ManagedBlueprintsListExecute(r ApiManagedBlueprintsL newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -732,6 +741,7 @@ func (a *ManagedApiService) ManagedBlueprintsListExecute(r ApiManagedBlueprintsL newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -798,7 +808,7 @@ func (a *ManagedApiService) ManagedBlueprintsPartialUpdateExecute(r ApiManagedBl } localVarPath := localBasePath + "/managed/blueprints/{instance_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"instance_uuid"+"}", url.PathEscape(parameterToString(r.instanceUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instance_uuid"+"}", url.PathEscape(parameterValueToString(r.instanceUuid, "instanceUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -847,9 +857,9 @@ func (a *ManagedApiService) ManagedBlueprintsPartialUpdateExecute(r ApiManagedBl return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -866,6 +876,7 @@ func (a *ManagedApiService) ManagedBlueprintsPartialUpdateExecute(r ApiManagedBl newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -876,6 +887,7 @@ func (a *ManagedApiService) ManagedBlueprintsPartialUpdateExecute(r ApiManagedBl newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -936,7 +948,7 @@ func (a *ManagedApiService) ManagedBlueprintsRetrieveExecute(r ApiManagedBluepri } localVarPath := localBasePath + "/managed/blueprints/{instance_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"instance_uuid"+"}", url.PathEscape(parameterToString(r.instanceUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instance_uuid"+"}", url.PathEscape(parameterValueToString(r.instanceUuid, "instanceUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -983,9 +995,9 @@ func (a *ManagedApiService) ManagedBlueprintsRetrieveExecute(r ApiManagedBluepri return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1002,6 +1014,7 @@ func (a *ManagedApiService) ManagedBlueprintsRetrieveExecute(r ApiManagedBluepri newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1012,6 +1025,7 @@ func (a *ManagedApiService) ManagedBlueprintsRetrieveExecute(r ApiManagedBluepri newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1078,7 +1092,7 @@ func (a *ManagedApiService) ManagedBlueprintsUpdateExecute(r ApiManagedBlueprint } localVarPath := localBasePath + "/managed/blueprints/{instance_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"instance_uuid"+"}", url.PathEscape(parameterToString(r.instanceUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instance_uuid"+"}", url.PathEscape(parameterValueToString(r.instanceUuid, "instanceUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1130,9 +1144,9 @@ func (a *ManagedApiService) ManagedBlueprintsUpdateExecute(r ApiManagedBlueprint return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1149,6 +1163,7 @@ func (a *ManagedApiService) ManagedBlueprintsUpdateExecute(r ApiManagedBlueprint newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1159,6 +1174,7 @@ func (a *ManagedApiService) ManagedBlueprintsUpdateExecute(r ApiManagedBlueprint newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1219,7 +1235,7 @@ func (a *ManagedApiService) ManagedBlueprintsUsedByListExecute(r ApiManagedBluep } localVarPath := localBasePath + "/managed/blueprints/{instance_uuid}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"instance_uuid"+"}", url.PathEscape(parameterToString(r.instanceUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instance_uuid"+"}", url.PathEscape(parameterValueToString(r.instanceUuid, "instanceUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1266,9 +1282,9 @@ func (a *ManagedApiService) ManagedBlueprintsUsedByListExecute(r ApiManagedBluep return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1285,6 +1301,7 @@ func (a *ManagedApiService) ManagedBlueprintsUsedByListExecute(r ApiManagedBluep newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1295,6 +1312,7 @@ func (a *ManagedApiService) ManagedBlueprintsUsedByListExecute(r ApiManagedBluep newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr diff --git a/api_oauth2.go b/api_oauth2.go index 029bc7a62..dc0b75955 100644 --- a/api_oauth2.go +++ b/api_oauth2.go @@ -14,7 +14,7 @@ package api import ( "bytes" "context" - "io/ioutil" + "io" "net/http" "net/url" "strings" @@ -64,7 +64,7 @@ func (a *Oauth2ApiService) Oauth2AccessTokensDestroyExecute(r ApiOauth2AccessTok } localVarPath := localBasePath + "/oauth2/access_tokens/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -111,9 +111,9 @@ func (a *Oauth2ApiService) Oauth2AccessTokensDestroyExecute(r ApiOauth2AccessTok return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -130,6 +130,7 @@ func (a *Oauth2ApiService) Oauth2AccessTokensDestroyExecute(r ApiOauth2AccessTok newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -140,6 +141,7 @@ func (a *Oauth2ApiService) Oauth2AccessTokensDestroyExecute(r ApiOauth2AccessTok newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -234,22 +236,22 @@ func (a *Oauth2ApiService) Oauth2AccessTokensListExecute(r ApiOauth2AccessTokens localVarFormParams := url.Values{} if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.provider != nil { - localVarQueryParams.Add("provider", parameterToString(*r.provider, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "provider", r.provider, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } if r.user != nil { - localVarQueryParams.Add("user", parameterToString(*r.user, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "user", r.user, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -292,9 +294,9 @@ func (a *Oauth2ApiService) Oauth2AccessTokensListExecute(r ApiOauth2AccessTokens return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -311,6 +313,7 @@ func (a *Oauth2ApiService) Oauth2AccessTokensListExecute(r ApiOauth2AccessTokens newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -321,6 +324,7 @@ func (a *Oauth2ApiService) Oauth2AccessTokensListExecute(r ApiOauth2AccessTokens newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -381,7 +385,7 @@ func (a *Oauth2ApiService) Oauth2AccessTokensRetrieveExecute(r ApiOauth2AccessTo } localVarPath := localBasePath + "/oauth2/access_tokens/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -428,9 +432,9 @@ func (a *Oauth2ApiService) Oauth2AccessTokensRetrieveExecute(r ApiOauth2AccessTo return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -447,6 +451,7 @@ func (a *Oauth2ApiService) Oauth2AccessTokensRetrieveExecute(r ApiOauth2AccessTo newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -457,6 +462,7 @@ func (a *Oauth2ApiService) Oauth2AccessTokensRetrieveExecute(r ApiOauth2AccessTo newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -517,7 +523,7 @@ func (a *Oauth2ApiService) Oauth2AccessTokensUsedByListExecute(r ApiOauth2Access } localVarPath := localBasePath + "/oauth2/access_tokens/{id}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -564,9 +570,9 @@ func (a *Oauth2ApiService) Oauth2AccessTokensUsedByListExecute(r ApiOauth2Access return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -583,6 +589,7 @@ func (a *Oauth2ApiService) Oauth2AccessTokensUsedByListExecute(r ApiOauth2Access newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -593,6 +600,7 @@ func (a *Oauth2ApiService) Oauth2AccessTokensUsedByListExecute(r ApiOauth2Access newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -651,7 +659,7 @@ func (a *Oauth2ApiService) Oauth2AuthorizationCodesDestroyExecute(r ApiOauth2Aut } localVarPath := localBasePath + "/oauth2/authorization_codes/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -698,9 +706,9 @@ func (a *Oauth2ApiService) Oauth2AuthorizationCodesDestroyExecute(r ApiOauth2Aut return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -717,6 +725,7 @@ func (a *Oauth2ApiService) Oauth2AuthorizationCodesDestroyExecute(r ApiOauth2Aut newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -727,6 +736,7 @@ func (a *Oauth2ApiService) Oauth2AuthorizationCodesDestroyExecute(r ApiOauth2Aut newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -821,22 +831,22 @@ func (a *Oauth2ApiService) Oauth2AuthorizationCodesListExecute(r ApiOauth2Author localVarFormParams := url.Values{} if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.provider != nil { - localVarQueryParams.Add("provider", parameterToString(*r.provider, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "provider", r.provider, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } if r.user != nil { - localVarQueryParams.Add("user", parameterToString(*r.user, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "user", r.user, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -879,9 +889,9 @@ func (a *Oauth2ApiService) Oauth2AuthorizationCodesListExecute(r ApiOauth2Author return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -898,6 +908,7 @@ func (a *Oauth2ApiService) Oauth2AuthorizationCodesListExecute(r ApiOauth2Author newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -908,6 +919,7 @@ func (a *Oauth2ApiService) Oauth2AuthorizationCodesListExecute(r ApiOauth2Author newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -968,7 +980,7 @@ func (a *Oauth2ApiService) Oauth2AuthorizationCodesRetrieveExecute(r ApiOauth2Au } localVarPath := localBasePath + "/oauth2/authorization_codes/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1015,9 +1027,9 @@ func (a *Oauth2ApiService) Oauth2AuthorizationCodesRetrieveExecute(r ApiOauth2Au return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1034,6 +1046,7 @@ func (a *Oauth2ApiService) Oauth2AuthorizationCodesRetrieveExecute(r ApiOauth2Au newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1044,6 +1057,7 @@ func (a *Oauth2ApiService) Oauth2AuthorizationCodesRetrieveExecute(r ApiOauth2Au newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1104,7 +1118,7 @@ func (a *Oauth2ApiService) Oauth2AuthorizationCodesUsedByListExecute(r ApiOauth2 } localVarPath := localBasePath + "/oauth2/authorization_codes/{id}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1151,9 +1165,9 @@ func (a *Oauth2ApiService) Oauth2AuthorizationCodesUsedByListExecute(r ApiOauth2 return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1170,6 +1184,7 @@ func (a *Oauth2ApiService) Oauth2AuthorizationCodesUsedByListExecute(r ApiOauth2 newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1180,6 +1195,7 @@ func (a *Oauth2ApiService) Oauth2AuthorizationCodesUsedByListExecute(r ApiOauth2 newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1238,7 +1254,7 @@ func (a *Oauth2ApiService) Oauth2RefreshTokensDestroyExecute(r ApiOauth2RefreshT } localVarPath := localBasePath + "/oauth2/refresh_tokens/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1285,9 +1301,9 @@ func (a *Oauth2ApiService) Oauth2RefreshTokensDestroyExecute(r ApiOauth2RefreshT return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -1304,6 +1320,7 @@ func (a *Oauth2ApiService) Oauth2RefreshTokensDestroyExecute(r ApiOauth2RefreshT newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -1314,6 +1331,7 @@ func (a *Oauth2ApiService) Oauth2RefreshTokensDestroyExecute(r ApiOauth2RefreshT newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -1408,22 +1426,22 @@ func (a *Oauth2ApiService) Oauth2RefreshTokensListExecute(r ApiOauth2RefreshToke localVarFormParams := url.Values{} if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.provider != nil { - localVarQueryParams.Add("provider", parameterToString(*r.provider, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "provider", r.provider, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } if r.user != nil { - localVarQueryParams.Add("user", parameterToString(*r.user, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "user", r.user, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1466,9 +1484,9 @@ func (a *Oauth2ApiService) Oauth2RefreshTokensListExecute(r ApiOauth2RefreshToke return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1485,6 +1503,7 @@ func (a *Oauth2ApiService) Oauth2RefreshTokensListExecute(r ApiOauth2RefreshToke newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1495,6 +1514,7 @@ func (a *Oauth2ApiService) Oauth2RefreshTokensListExecute(r ApiOauth2RefreshToke newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1555,7 +1575,7 @@ func (a *Oauth2ApiService) Oauth2RefreshTokensRetrieveExecute(r ApiOauth2Refresh } localVarPath := localBasePath + "/oauth2/refresh_tokens/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1602,9 +1622,9 @@ func (a *Oauth2ApiService) Oauth2RefreshTokensRetrieveExecute(r ApiOauth2Refresh return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1621,6 +1641,7 @@ func (a *Oauth2ApiService) Oauth2RefreshTokensRetrieveExecute(r ApiOauth2Refresh newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1631,6 +1652,7 @@ func (a *Oauth2ApiService) Oauth2RefreshTokensRetrieveExecute(r ApiOauth2Refresh newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1691,7 +1713,7 @@ func (a *Oauth2ApiService) Oauth2RefreshTokensUsedByListExecute(r ApiOauth2Refre } localVarPath := localBasePath + "/oauth2/refresh_tokens/{id}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1738,9 +1760,9 @@ func (a *Oauth2ApiService) Oauth2RefreshTokensUsedByListExecute(r ApiOauth2Refre return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1757,6 +1779,7 @@ func (a *Oauth2ApiService) Oauth2RefreshTokensUsedByListExecute(r ApiOauth2Refre newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1767,6 +1790,7 @@ func (a *Oauth2ApiService) Oauth2RefreshTokensUsedByListExecute(r ApiOauth2Refre newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr diff --git a/api_outposts.go b/api_outposts.go index 476949794..cc197634a 100644 --- a/api_outposts.go +++ b/api_outposts.go @@ -14,7 +14,7 @@ package api import ( "bytes" "context" - "io/ioutil" + "io" "net/http" "net/url" "reflect" @@ -121,9 +121,9 @@ func (a *OutpostsApiService) OutpostsInstancesCreateExecute(r ApiOutpostsInstanc return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -140,6 +140,7 @@ func (a *OutpostsApiService) OutpostsInstancesCreateExecute(r ApiOutpostsInstanc newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -150,6 +151,7 @@ func (a *OutpostsApiService) OutpostsInstancesCreateExecute(r ApiOutpostsInstanc newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -253,9 +255,9 @@ func (a *OutpostsApiService) OutpostsInstancesDefaultSettingsRetrieveExecute(r A return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -272,6 +274,7 @@ func (a *OutpostsApiService) OutpostsInstancesDefaultSettingsRetrieveExecute(r A newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -282,6 +285,7 @@ func (a *OutpostsApiService) OutpostsInstancesDefaultSettingsRetrieveExecute(r A newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -340,7 +344,7 @@ func (a *OutpostsApiService) OutpostsInstancesDestroyExecute(r ApiOutpostsInstan } localVarPath := localBasePath + "/outposts/instances/{uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterToString(r.uuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterValueToString(r.uuid, "uuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -387,9 +391,9 @@ func (a *OutpostsApiService) OutpostsInstancesDestroyExecute(r ApiOutpostsInstan return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -406,6 +410,7 @@ func (a *OutpostsApiService) OutpostsInstancesDestroyExecute(r ApiOutpostsInstan newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -416,6 +421,7 @@ func (a *OutpostsApiService) OutpostsInstancesDestroyExecute(r ApiOutpostsInstan newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -529,49 +535,49 @@ func (a *OutpostsApiService) OutpostsInstancesHealthListExecute(r ApiOutpostsIns } localVarPath := localBasePath + "/outposts/instances/{uuid}/health/" - localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterToString(r.uuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterValueToString(r.uuid, "uuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} if r.managedIcontains != nil { - localVarQueryParams.Add("managed__icontains", parameterToString(*r.managedIcontains, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "managed__icontains", r.managedIcontains, "") } if r.managedIexact != nil { - localVarQueryParams.Add("managed__iexact", parameterToString(*r.managedIexact, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "managed__iexact", r.managedIexact, "") } if r.nameIcontains != nil { - localVarQueryParams.Add("name__icontains", parameterToString(*r.nameIcontains, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") } if r.nameIexact != nil { - localVarQueryParams.Add("name__iexact", parameterToString(*r.nameIexact, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name__iexact", r.nameIexact, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.providersIsnull != nil { - localVarQueryParams.Add("providers__isnull", parameterToString(*r.providersIsnull, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "providers__isnull", r.providersIsnull, "") } if r.providersByPk != nil { t := *r.providersByPk if reflect.TypeOf(t).Kind() == reflect.Slice { s := reflect.ValueOf(t) for i := 0; i < s.Len(); i++ { - localVarQueryParams.Add("providers_by_pk", parameterToString(s.Index(i), "multi")) + parameterAddToHeaderOrQuery(localVarQueryParams, "providers_by_pk", s.Index(i), "multi") } } else { - localVarQueryParams.Add("providers_by_pk", parameterToString(t, "multi")) + parameterAddToHeaderOrQuery(localVarQueryParams, "providers_by_pk", t, "multi") } } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } if r.serviceConnectionNameIcontains != nil { - localVarQueryParams.Add("service_connection__name__icontains", parameterToString(*r.serviceConnectionNameIcontains, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "service_connection__name__icontains", r.serviceConnectionNameIcontains, "") } if r.serviceConnectionNameIexact != nil { - localVarQueryParams.Add("service_connection__name__iexact", parameterToString(*r.serviceConnectionNameIexact, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "service_connection__name__iexact", r.serviceConnectionNameIexact, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -614,9 +620,9 @@ func (a *OutpostsApiService) OutpostsInstancesHealthListExecute(r ApiOutpostsIns return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -633,6 +639,7 @@ func (a *OutpostsApiService) OutpostsInstancesHealthListExecute(r ApiOutpostsIns newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -643,6 +650,7 @@ func (a *OutpostsApiService) OutpostsInstancesHealthListExecute(r ApiOutpostsIns newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -782,48 +790,48 @@ func (a *OutpostsApiService) OutpostsInstancesListExecute(r ApiOutpostsInstances localVarFormParams := url.Values{} if r.managedIcontains != nil { - localVarQueryParams.Add("managed__icontains", parameterToString(*r.managedIcontains, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "managed__icontains", r.managedIcontains, "") } if r.managedIexact != nil { - localVarQueryParams.Add("managed__iexact", parameterToString(*r.managedIexact, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "managed__iexact", r.managedIexact, "") } if r.nameIcontains != nil { - localVarQueryParams.Add("name__icontains", parameterToString(*r.nameIcontains, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") } if r.nameIexact != nil { - localVarQueryParams.Add("name__iexact", parameterToString(*r.nameIexact, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name__iexact", r.nameIexact, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.providersIsnull != nil { - localVarQueryParams.Add("providers__isnull", parameterToString(*r.providersIsnull, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "providers__isnull", r.providersIsnull, "") } if r.providersByPk != nil { t := *r.providersByPk if reflect.TypeOf(t).Kind() == reflect.Slice { s := reflect.ValueOf(t) for i := 0; i < s.Len(); i++ { - localVarQueryParams.Add("providers_by_pk", parameterToString(s.Index(i), "multi")) + parameterAddToHeaderOrQuery(localVarQueryParams, "providers_by_pk", s.Index(i), "multi") } } else { - localVarQueryParams.Add("providers_by_pk", parameterToString(t, "multi")) + parameterAddToHeaderOrQuery(localVarQueryParams, "providers_by_pk", t, "multi") } } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } if r.serviceConnectionNameIcontains != nil { - localVarQueryParams.Add("service_connection__name__icontains", parameterToString(*r.serviceConnectionNameIcontains, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "service_connection__name__icontains", r.serviceConnectionNameIcontains, "") } if r.serviceConnectionNameIexact != nil { - localVarQueryParams.Add("service_connection__name__iexact", parameterToString(*r.serviceConnectionNameIexact, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "service_connection__name__iexact", r.serviceConnectionNameIexact, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -866,9 +874,9 @@ func (a *OutpostsApiService) OutpostsInstancesListExecute(r ApiOutpostsInstances return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -885,6 +893,7 @@ func (a *OutpostsApiService) OutpostsInstancesListExecute(r ApiOutpostsInstances newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -895,6 +904,7 @@ func (a *OutpostsApiService) OutpostsInstancesListExecute(r ApiOutpostsInstances newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -961,7 +971,7 @@ func (a *OutpostsApiService) OutpostsInstancesPartialUpdateExecute(r ApiOutposts } localVarPath := localBasePath + "/outposts/instances/{uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterToString(r.uuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterValueToString(r.uuid, "uuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1010,9 +1020,9 @@ func (a *OutpostsApiService) OutpostsInstancesPartialUpdateExecute(r ApiOutposts return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1029,6 +1039,7 @@ func (a *OutpostsApiService) OutpostsInstancesPartialUpdateExecute(r ApiOutposts newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1039,6 +1050,7 @@ func (a *OutpostsApiService) OutpostsInstancesPartialUpdateExecute(r ApiOutposts newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1099,7 +1111,7 @@ func (a *OutpostsApiService) OutpostsInstancesRetrieveExecute(r ApiOutpostsInsta } localVarPath := localBasePath + "/outposts/instances/{uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterToString(r.uuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterValueToString(r.uuid, "uuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1146,9 +1158,9 @@ func (a *OutpostsApiService) OutpostsInstancesRetrieveExecute(r ApiOutpostsInsta return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1165,6 +1177,7 @@ func (a *OutpostsApiService) OutpostsInstancesRetrieveExecute(r ApiOutpostsInsta newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1175,6 +1188,7 @@ func (a *OutpostsApiService) OutpostsInstancesRetrieveExecute(r ApiOutpostsInsta newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1241,7 +1255,7 @@ func (a *OutpostsApiService) OutpostsInstancesUpdateExecute(r ApiOutpostsInstanc } localVarPath := localBasePath + "/outposts/instances/{uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterToString(r.uuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterValueToString(r.uuid, "uuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1293,9 +1307,9 @@ func (a *OutpostsApiService) OutpostsInstancesUpdateExecute(r ApiOutpostsInstanc return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1312,6 +1326,7 @@ func (a *OutpostsApiService) OutpostsInstancesUpdateExecute(r ApiOutpostsInstanc newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1322,6 +1337,7 @@ func (a *OutpostsApiService) OutpostsInstancesUpdateExecute(r ApiOutpostsInstanc newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1382,7 +1398,7 @@ func (a *OutpostsApiService) OutpostsInstancesUsedByListExecute(r ApiOutpostsIns } localVarPath := localBasePath + "/outposts/instances/{uuid}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterToString(r.uuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterValueToString(r.uuid, "uuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1429,9 +1445,9 @@ func (a *OutpostsApiService) OutpostsInstancesUsedByListExecute(r ApiOutpostsIns return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1448,6 +1464,7 @@ func (a *OutpostsApiService) OutpostsInstancesUsedByListExecute(r ApiOutpostsIns newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1458,6 +1475,7 @@ func (a *OutpostsApiService) OutpostsInstancesUsedByListExecute(r ApiOutpostsIns newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1555,19 +1573,19 @@ func (a *OutpostsApiService) OutpostsLdapListExecute(r ApiOutpostsLdapListReques localVarFormParams := url.Values{} if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1610,9 +1628,9 @@ func (a *OutpostsApiService) OutpostsLdapListExecute(r ApiOutpostsLdapListReques return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1629,6 +1647,7 @@ func (a *OutpostsApiService) OutpostsLdapListExecute(r ApiOutpostsLdapListReques newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1639,6 +1658,7 @@ func (a *OutpostsApiService) OutpostsLdapListExecute(r ApiOutpostsLdapListReques newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1699,7 +1719,7 @@ func (a *OutpostsApiService) OutpostsLdapRetrieveExecute(r ApiOutpostsLdapRetrie } localVarPath := localBasePath + "/outposts/ldap/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1746,9 +1766,9 @@ func (a *OutpostsApiService) OutpostsLdapRetrieveExecute(r ApiOutpostsLdapRetrie return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1765,6 +1785,7 @@ func (a *OutpostsApiService) OutpostsLdapRetrieveExecute(r ApiOutpostsLdapRetrie newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1775,6 +1796,7 @@ func (a *OutpostsApiService) OutpostsLdapRetrieveExecute(r ApiOutpostsLdapRetrie newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1872,19 +1894,19 @@ func (a *OutpostsApiService) OutpostsProxyListExecute(r ApiOutpostsProxyListRequ localVarFormParams := url.Values{} if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1927,9 +1949,9 @@ func (a *OutpostsApiService) OutpostsProxyListExecute(r ApiOutpostsProxyListRequ return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1946,6 +1968,7 @@ func (a *OutpostsApiService) OutpostsProxyListExecute(r ApiOutpostsProxyListRequ newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1956,6 +1979,7 @@ func (a *OutpostsApiService) OutpostsProxyListExecute(r ApiOutpostsProxyListRequ newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2016,7 +2040,7 @@ func (a *OutpostsApiService) OutpostsProxyRetrieveExecute(r ApiOutpostsProxyRetr } localVarPath := localBasePath + "/outposts/proxy/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2063,9 +2087,9 @@ func (a *OutpostsApiService) OutpostsProxyRetrieveExecute(r ApiOutpostsProxyRetr return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2082,6 +2106,7 @@ func (a *OutpostsApiService) OutpostsProxyRetrieveExecute(r ApiOutpostsProxyRetr newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2092,6 +2117,7 @@ func (a *OutpostsApiService) OutpostsProxyRetrieveExecute(r ApiOutpostsProxyRetr newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2189,19 +2215,19 @@ func (a *OutpostsApiService) OutpostsRadiusListExecute(r ApiOutpostsRadiusListRe localVarFormParams := url.Values{} if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -2244,9 +2270,9 @@ func (a *OutpostsApiService) OutpostsRadiusListExecute(r ApiOutpostsRadiusListRe return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2263,6 +2289,7 @@ func (a *OutpostsApiService) OutpostsRadiusListExecute(r ApiOutpostsRadiusListRe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2273,6 +2300,7 @@ func (a *OutpostsApiService) OutpostsRadiusListExecute(r ApiOutpostsRadiusListRe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2333,7 +2361,7 @@ func (a *OutpostsApiService) OutpostsRadiusRetrieveExecute(r ApiOutpostsRadiusRe } localVarPath := localBasePath + "/outposts/radius/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2380,9 +2408,9 @@ func (a *OutpostsApiService) OutpostsRadiusRetrieveExecute(r ApiOutpostsRadiusRe return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2399,6 +2427,7 @@ func (a *OutpostsApiService) OutpostsRadiusRetrieveExecute(r ApiOutpostsRadiusRe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2409,6 +2438,7 @@ func (a *OutpostsApiService) OutpostsRadiusRetrieveExecute(r ApiOutpostsRadiusRe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2467,7 +2497,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsAllDestroyExecute(r ApiOu } localVarPath := localBasePath + "/outposts/service_connections/all/{uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterToString(r.uuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterValueToString(r.uuid, "uuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2514,9 +2544,9 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsAllDestroyExecute(r ApiOu return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -2533,6 +2563,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsAllDestroyExecute(r ApiOu newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -2543,6 +2574,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsAllDestroyExecute(r ApiOu newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -2631,19 +2663,19 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsAllListExecute(r ApiOutpo localVarFormParams := url.Values{} if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -2686,9 +2718,9 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsAllListExecute(r ApiOutpo return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2705,6 +2737,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsAllListExecute(r ApiOutpo newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2715,6 +2748,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsAllListExecute(r ApiOutpo newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2775,7 +2809,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsAllRetrieveExecute(r ApiO } localVarPath := localBasePath + "/outposts/service_connections/all/{uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterToString(r.uuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterValueToString(r.uuid, "uuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2822,9 +2856,9 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsAllRetrieveExecute(r ApiO return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2841,6 +2875,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsAllRetrieveExecute(r ApiO newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2851,6 +2886,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsAllRetrieveExecute(r ApiO newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2911,7 +2947,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsAllStateRetrieveExecute(r } localVarPath := localBasePath + "/outposts/service_connections/all/{uuid}/state/" - localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterToString(r.uuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterValueToString(r.uuid, "uuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2958,9 +2994,9 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsAllStateRetrieveExecute(r return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2977,6 +3013,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsAllStateRetrieveExecute(r newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2987,6 +3024,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsAllStateRetrieveExecute(r newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3090,9 +3128,9 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsAllTypesListExecute(r Api return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -3109,6 +3147,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsAllTypesListExecute(r Api newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -3119,6 +3158,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsAllTypesListExecute(r Api newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3179,7 +3219,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsAllUsedByListExecute(r Ap } localVarPath := localBasePath + "/outposts/service_connections/all/{uuid}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterToString(r.uuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterValueToString(r.uuid, "uuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -3226,9 +3266,9 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsAllUsedByListExecute(r Ap return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -3245,6 +3285,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsAllUsedByListExecute(r Ap newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -3255,6 +3296,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsAllUsedByListExecute(r Ap newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3369,9 +3411,9 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsDockerCreateExecute(r Api return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -3388,6 +3430,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsDockerCreateExecute(r Api newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -3398,6 +3441,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsDockerCreateExecute(r Api newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3456,7 +3500,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsDockerDestroyExecute(r Ap } localVarPath := localBasePath + "/outposts/service_connections/docker/{uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterToString(r.uuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterValueToString(r.uuid, "uuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -3503,9 +3547,9 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsDockerDestroyExecute(r Ap return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -3522,6 +3566,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsDockerDestroyExecute(r Ap newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -3532,6 +3577,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsDockerDestroyExecute(r Ap newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -3644,31 +3690,31 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsDockerListExecute(r ApiOu localVarFormParams := url.Values{} if r.local != nil { - localVarQueryParams.Add("local", parameterToString(*r.local, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "local", r.local, "") } if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } if r.tlsAuthentication != nil { - localVarQueryParams.Add("tls_authentication", parameterToString(*r.tlsAuthentication, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "tls_authentication", r.tlsAuthentication, "") } if r.tlsVerification != nil { - localVarQueryParams.Add("tls_verification", parameterToString(*r.tlsVerification, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "tls_verification", r.tlsVerification, "") } if r.url != nil { - localVarQueryParams.Add("url", parameterToString(*r.url, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "url", r.url, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -3711,9 +3757,9 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsDockerListExecute(r ApiOu return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -3730,6 +3776,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsDockerListExecute(r ApiOu newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -3740,6 +3787,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsDockerListExecute(r ApiOu newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3806,7 +3854,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsDockerPartialUpdateExecut } localVarPath := localBasePath + "/outposts/service_connections/docker/{uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterToString(r.uuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterValueToString(r.uuid, "uuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -3855,9 +3903,9 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsDockerPartialUpdateExecut return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -3874,6 +3922,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsDockerPartialUpdateExecut newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -3884,6 +3933,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsDockerPartialUpdateExecut newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3944,7 +3994,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsDockerRetrieveExecute(r A } localVarPath := localBasePath + "/outposts/service_connections/docker/{uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterToString(r.uuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterValueToString(r.uuid, "uuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -3991,9 +4041,9 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsDockerRetrieveExecute(r A return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -4010,6 +4060,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsDockerRetrieveExecute(r A newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -4020,6 +4071,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsDockerRetrieveExecute(r A newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -4086,7 +4138,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsDockerUpdateExecute(r Api } localVarPath := localBasePath + "/outposts/service_connections/docker/{uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterToString(r.uuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterValueToString(r.uuid, "uuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -4138,9 +4190,9 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsDockerUpdateExecute(r Api return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -4157,6 +4209,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsDockerUpdateExecute(r Api newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -4167,6 +4220,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsDockerUpdateExecute(r Api newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -4227,7 +4281,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsDockerUsedByListExecute(r } localVarPath := localBasePath + "/outposts/service_connections/docker/{uuid}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterToString(r.uuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterValueToString(r.uuid, "uuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -4274,9 +4328,9 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsDockerUsedByListExecute(r return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -4293,6 +4347,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsDockerUsedByListExecute(r newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -4303,6 +4358,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsDockerUsedByListExecute(r newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -4417,9 +4473,9 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsKubernetesCreateExecute(r return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -4436,6 +4492,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsKubernetesCreateExecute(r newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -4446,6 +4503,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsKubernetesCreateExecute(r newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -4504,7 +4562,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsKubernetesDestroyExecute( } localVarPath := localBasePath + "/outposts/service_connections/kubernetes/{uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterToString(r.uuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterValueToString(r.uuid, "uuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -4551,9 +4609,9 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsKubernetesDestroyExecute( return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -4570,6 +4628,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsKubernetesDestroyExecute( newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -4580,6 +4639,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsKubernetesDestroyExecute( newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -4674,22 +4734,22 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsKubernetesListExecute(r A localVarFormParams := url.Values{} if r.local != nil { - localVarQueryParams.Add("local", parameterToString(*r.local, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "local", r.local, "") } if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -4732,9 +4792,9 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsKubernetesListExecute(r A return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -4751,6 +4811,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsKubernetesListExecute(r A newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -4761,6 +4822,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsKubernetesListExecute(r A newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -4827,7 +4889,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsKubernetesPartialUpdateEx } localVarPath := localBasePath + "/outposts/service_connections/kubernetes/{uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterToString(r.uuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterValueToString(r.uuid, "uuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -4876,9 +4938,9 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsKubernetesPartialUpdateEx return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -4895,6 +4957,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsKubernetesPartialUpdateEx newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -4905,6 +4968,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsKubernetesPartialUpdateEx newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -4965,7 +5029,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsKubernetesRetrieveExecute } localVarPath := localBasePath + "/outposts/service_connections/kubernetes/{uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterToString(r.uuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterValueToString(r.uuid, "uuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -5012,9 +5076,9 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsKubernetesRetrieveExecute return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -5031,6 +5095,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsKubernetesRetrieveExecute newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -5041,6 +5106,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsKubernetesRetrieveExecute newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -5107,7 +5173,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsKubernetesUpdateExecute(r } localVarPath := localBasePath + "/outposts/service_connections/kubernetes/{uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterToString(r.uuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterValueToString(r.uuid, "uuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -5159,9 +5225,9 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsKubernetesUpdateExecute(r return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -5178,6 +5244,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsKubernetesUpdateExecute(r newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -5188,6 +5255,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsKubernetesUpdateExecute(r newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -5248,7 +5316,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsKubernetesUsedByListExecu } localVarPath := localBasePath + "/outposts/service_connections/kubernetes/{uuid}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterToString(r.uuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterValueToString(r.uuid, "uuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -5295,9 +5363,9 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsKubernetesUsedByListExecu return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -5314,6 +5382,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsKubernetesUsedByListExecu newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -5324,6 +5393,7 @@ func (a *OutpostsApiService) OutpostsServiceConnectionsKubernetesUsedByListExecu newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr diff --git a/api_policies.go b/api_policies.go index b63b241c7..85afe8d99 100644 --- a/api_policies.go +++ b/api_policies.go @@ -14,7 +14,7 @@ package api import ( "bytes" "context" - "io/ioutil" + "io" "net/http" "net/url" "reflect" @@ -109,9 +109,9 @@ func (a *PoliciesApiService) PoliciesAllCacheClearCreateExecute(r ApiPoliciesAll return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -128,6 +128,7 @@ func (a *PoliciesApiService) PoliciesAllCacheClearCreateExecute(r ApiPoliciesAll newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -222,9 +223,9 @@ func (a *PoliciesApiService) PoliciesAllCacheInfoRetrieveExecute(r ApiPoliciesAl return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -241,6 +242,7 @@ func (a *PoliciesApiService) PoliciesAllCacheInfoRetrieveExecute(r ApiPoliciesAl newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -251,6 +253,7 @@ func (a *PoliciesApiService) PoliciesAllCacheInfoRetrieveExecute(r ApiPoliciesAl newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -309,7 +312,7 @@ func (a *PoliciesApiService) PoliciesAllDestroyExecute(r ApiPoliciesAllDestroyRe } localVarPath := localBasePath + "/policies/all/{policy_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterToString(r.policyUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterValueToString(r.policyUuid, "policyUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -356,9 +359,9 @@ func (a *PoliciesApiService) PoliciesAllDestroyExecute(r ApiPoliciesAllDestroyRe return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -375,6 +378,7 @@ func (a *PoliciesApiService) PoliciesAllDestroyExecute(r ApiPoliciesAllDestroyRe newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -385,6 +389,7 @@ func (a *PoliciesApiService) PoliciesAllDestroyExecute(r ApiPoliciesAllDestroyRe newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -479,22 +484,22 @@ func (a *PoliciesApiService) PoliciesAllListExecute(r ApiPoliciesAllListRequest) localVarFormParams := url.Values{} if r.bindingsIsnull != nil { - localVarQueryParams.Add("bindings__isnull", parameterToString(*r.bindingsIsnull, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "bindings__isnull", r.bindingsIsnull, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.promptstageIsnull != nil { - localVarQueryParams.Add("promptstage__isnull", parameterToString(*r.promptstageIsnull, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "promptstage__isnull", r.promptstageIsnull, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -537,9 +542,9 @@ func (a *PoliciesApiService) PoliciesAllListExecute(r ApiPoliciesAllListRequest) return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -556,6 +561,7 @@ func (a *PoliciesApiService) PoliciesAllListExecute(r ApiPoliciesAllListRequest) newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -566,6 +572,7 @@ func (a *PoliciesApiService) PoliciesAllListExecute(r ApiPoliciesAllListRequest) newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -626,7 +633,7 @@ func (a *PoliciesApiService) PoliciesAllRetrieveExecute(r ApiPoliciesAllRetrieve } localVarPath := localBasePath + "/policies/all/{policy_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterToString(r.policyUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterValueToString(r.policyUuid, "policyUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -673,9 +680,9 @@ func (a *PoliciesApiService) PoliciesAllRetrieveExecute(r ApiPoliciesAllRetrieve return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -692,6 +699,7 @@ func (a *PoliciesApiService) PoliciesAllRetrieveExecute(r ApiPoliciesAllRetrieve newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -702,6 +710,7 @@ func (a *PoliciesApiService) PoliciesAllRetrieveExecute(r ApiPoliciesAllRetrieve newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -768,7 +777,7 @@ func (a *PoliciesApiService) PoliciesAllTestCreateExecute(r ApiPoliciesAllTestCr } localVarPath := localBasePath + "/policies/all/{policy_uuid}/test/" - localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterToString(r.policyUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterValueToString(r.policyUuid, "policyUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -820,9 +829,9 @@ func (a *PoliciesApiService) PoliciesAllTestCreateExecute(r ApiPoliciesAllTestCr return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -839,6 +848,7 @@ func (a *PoliciesApiService) PoliciesAllTestCreateExecute(r ApiPoliciesAllTestCr newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -942,9 +952,9 @@ func (a *PoliciesApiService) PoliciesAllTypesListExecute(r ApiPoliciesAllTypesLi return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -961,6 +971,7 @@ func (a *PoliciesApiService) PoliciesAllTypesListExecute(r ApiPoliciesAllTypesLi newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -971,6 +982,7 @@ func (a *PoliciesApiService) PoliciesAllTypesListExecute(r ApiPoliciesAllTypesLi newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1031,7 +1043,7 @@ func (a *PoliciesApiService) PoliciesAllUsedByListExecute(r ApiPoliciesAllUsedBy } localVarPath := localBasePath + "/policies/all/{policy_uuid}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterToString(r.policyUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterValueToString(r.policyUuid, "policyUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1078,9 +1090,9 @@ func (a *PoliciesApiService) PoliciesAllUsedByListExecute(r ApiPoliciesAllUsedBy return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1097,6 +1109,7 @@ func (a *PoliciesApiService) PoliciesAllUsedByListExecute(r ApiPoliciesAllUsedBy newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1107,6 +1120,7 @@ func (a *PoliciesApiService) PoliciesAllUsedByListExecute(r ApiPoliciesAllUsedBy newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1221,9 +1235,9 @@ func (a *PoliciesApiService) PoliciesBindingsCreateExecute(r ApiPoliciesBindings return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1240,6 +1254,7 @@ func (a *PoliciesApiService) PoliciesBindingsCreateExecute(r ApiPoliciesBindings newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1250,6 +1265,7 @@ func (a *PoliciesApiService) PoliciesBindingsCreateExecute(r ApiPoliciesBindings newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1308,7 +1324,7 @@ func (a *PoliciesApiService) PoliciesBindingsDestroyExecute(r ApiPoliciesBinding } localVarPath := localBasePath + "/policies/bindings/{policy_binding_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"policy_binding_uuid"+"}", url.PathEscape(parameterToString(r.policyBindingUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"policy_binding_uuid"+"}", url.PathEscape(parameterValueToString(r.policyBindingUuid, "policyBindingUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1355,9 +1371,9 @@ func (a *PoliciesApiService) PoliciesBindingsDestroyExecute(r ApiPoliciesBinding return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -1374,6 +1390,7 @@ func (a *PoliciesApiService) PoliciesBindingsDestroyExecute(r ApiPoliciesBinding newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -1384,6 +1401,7 @@ func (a *PoliciesApiService) PoliciesBindingsDestroyExecute(r ApiPoliciesBinding newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -1508,45 +1526,45 @@ func (a *PoliciesApiService) PoliciesBindingsListExecute(r ApiPoliciesBindingsLi localVarFormParams := url.Values{} if r.enabled != nil { - localVarQueryParams.Add("enabled", parameterToString(*r.enabled, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "enabled", r.enabled, "") } if r.order != nil { - localVarQueryParams.Add("order", parameterToString(*r.order, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "order", r.order, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.policy != nil { - localVarQueryParams.Add("policy", parameterToString(*r.policy, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "policy", r.policy, "") } if r.policyIsnull != nil { - localVarQueryParams.Add("policy__isnull", parameterToString(*r.policyIsnull, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "policy__isnull", r.policyIsnull, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } if r.target != nil { - localVarQueryParams.Add("target", parameterToString(*r.target, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "target", r.target, "") } if r.targetIn != nil { t := *r.targetIn if reflect.TypeOf(t).Kind() == reflect.Slice { s := reflect.ValueOf(t) for i := 0; i < s.Len(); i++ { - localVarQueryParams.Add("target_in", parameterToString(s.Index(i), "multi")) + parameterAddToHeaderOrQuery(localVarQueryParams, "target_in", s.Index(i), "multi") } } else { - localVarQueryParams.Add("target_in", parameterToString(t, "multi")) + parameterAddToHeaderOrQuery(localVarQueryParams, "target_in", t, "multi") } } if r.timeout != nil { - localVarQueryParams.Add("timeout", parameterToString(*r.timeout, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "timeout", r.timeout, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1589,9 +1607,9 @@ func (a *PoliciesApiService) PoliciesBindingsListExecute(r ApiPoliciesBindingsLi return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1608,6 +1626,7 @@ func (a *PoliciesApiService) PoliciesBindingsListExecute(r ApiPoliciesBindingsLi newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1618,6 +1637,7 @@ func (a *PoliciesApiService) PoliciesBindingsListExecute(r ApiPoliciesBindingsLi newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1684,7 +1704,7 @@ func (a *PoliciesApiService) PoliciesBindingsPartialUpdateExecute(r ApiPoliciesB } localVarPath := localBasePath + "/policies/bindings/{policy_binding_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"policy_binding_uuid"+"}", url.PathEscape(parameterToString(r.policyBindingUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"policy_binding_uuid"+"}", url.PathEscape(parameterValueToString(r.policyBindingUuid, "policyBindingUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1733,9 +1753,9 @@ func (a *PoliciesApiService) PoliciesBindingsPartialUpdateExecute(r ApiPoliciesB return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1752,6 +1772,7 @@ func (a *PoliciesApiService) PoliciesBindingsPartialUpdateExecute(r ApiPoliciesB newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1762,6 +1783,7 @@ func (a *PoliciesApiService) PoliciesBindingsPartialUpdateExecute(r ApiPoliciesB newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1822,7 +1844,7 @@ func (a *PoliciesApiService) PoliciesBindingsRetrieveExecute(r ApiPoliciesBindin } localVarPath := localBasePath + "/policies/bindings/{policy_binding_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"policy_binding_uuid"+"}", url.PathEscape(parameterToString(r.policyBindingUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"policy_binding_uuid"+"}", url.PathEscape(parameterValueToString(r.policyBindingUuid, "policyBindingUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1869,9 +1891,9 @@ func (a *PoliciesApiService) PoliciesBindingsRetrieveExecute(r ApiPoliciesBindin return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1888,6 +1910,7 @@ func (a *PoliciesApiService) PoliciesBindingsRetrieveExecute(r ApiPoliciesBindin newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1898,6 +1921,7 @@ func (a *PoliciesApiService) PoliciesBindingsRetrieveExecute(r ApiPoliciesBindin newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1964,7 +1988,7 @@ func (a *PoliciesApiService) PoliciesBindingsUpdateExecute(r ApiPoliciesBindings } localVarPath := localBasePath + "/policies/bindings/{policy_binding_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"policy_binding_uuid"+"}", url.PathEscape(parameterToString(r.policyBindingUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"policy_binding_uuid"+"}", url.PathEscape(parameterValueToString(r.policyBindingUuid, "policyBindingUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2016,9 +2040,9 @@ func (a *PoliciesApiService) PoliciesBindingsUpdateExecute(r ApiPoliciesBindings return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2035,6 +2059,7 @@ func (a *PoliciesApiService) PoliciesBindingsUpdateExecute(r ApiPoliciesBindings newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2045,6 +2070,7 @@ func (a *PoliciesApiService) PoliciesBindingsUpdateExecute(r ApiPoliciesBindings newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2105,7 +2131,7 @@ func (a *PoliciesApiService) PoliciesBindingsUsedByListExecute(r ApiPoliciesBind } localVarPath := localBasePath + "/policies/bindings/{policy_binding_uuid}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"policy_binding_uuid"+"}", url.PathEscape(parameterToString(r.policyBindingUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"policy_binding_uuid"+"}", url.PathEscape(parameterValueToString(r.policyBindingUuid, "policyBindingUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2152,9 +2178,9 @@ func (a *PoliciesApiService) PoliciesBindingsUsedByListExecute(r ApiPoliciesBind return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2171,6 +2197,7 @@ func (a *PoliciesApiService) PoliciesBindingsUsedByListExecute(r ApiPoliciesBind newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2181,6 +2208,7 @@ func (a *PoliciesApiService) PoliciesBindingsUsedByListExecute(r ApiPoliciesBind newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2295,9 +2323,9 @@ func (a *PoliciesApiService) PoliciesDummyCreateExecute(r ApiPoliciesDummyCreate return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2314,6 +2342,7 @@ func (a *PoliciesApiService) PoliciesDummyCreateExecute(r ApiPoliciesDummyCreate newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2324,6 +2353,7 @@ func (a *PoliciesApiService) PoliciesDummyCreateExecute(r ApiPoliciesDummyCreate newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2382,7 +2412,7 @@ func (a *PoliciesApiService) PoliciesDummyDestroyExecute(r ApiPoliciesDummyDestr } localVarPath := localBasePath + "/policies/dummy/{policy_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterToString(r.policyUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterValueToString(r.policyUuid, "policyUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2429,9 +2459,9 @@ func (a *PoliciesApiService) PoliciesDummyDestroyExecute(r ApiPoliciesDummyDestr return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -2448,6 +2478,7 @@ func (a *PoliciesApiService) PoliciesDummyDestroyExecute(r ApiPoliciesDummyDestr newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -2458,6 +2489,7 @@ func (a *PoliciesApiService) PoliciesDummyDestroyExecute(r ApiPoliciesDummyDestr newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -2588,40 +2620,40 @@ func (a *PoliciesApiService) PoliciesDummyListExecute(r ApiPoliciesDummyListRequ localVarFormParams := url.Values{} if r.created != nil { - localVarQueryParams.Add("created", parameterToString(*r.created, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "created", r.created, "") } if r.executionLogging != nil { - localVarQueryParams.Add("execution_logging", parameterToString(*r.executionLogging, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "execution_logging", r.executionLogging, "") } if r.lastUpdated != nil { - localVarQueryParams.Add("last_updated", parameterToString(*r.lastUpdated, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "last_updated", r.lastUpdated, "") } if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.policyUuid != nil { - localVarQueryParams.Add("policy_uuid", parameterToString(*r.policyUuid, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "policy_uuid", r.policyUuid, "") } if r.result != nil { - localVarQueryParams.Add("result", parameterToString(*r.result, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "result", r.result, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } if r.waitMax != nil { - localVarQueryParams.Add("wait_max", parameterToString(*r.waitMax, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "wait_max", r.waitMax, "") } if r.waitMin != nil { - localVarQueryParams.Add("wait_min", parameterToString(*r.waitMin, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "wait_min", r.waitMin, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -2664,9 +2696,9 @@ func (a *PoliciesApiService) PoliciesDummyListExecute(r ApiPoliciesDummyListRequ return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2683,6 +2715,7 @@ func (a *PoliciesApiService) PoliciesDummyListExecute(r ApiPoliciesDummyListRequ newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2693,6 +2726,7 @@ func (a *PoliciesApiService) PoliciesDummyListExecute(r ApiPoliciesDummyListRequ newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2759,7 +2793,7 @@ func (a *PoliciesApiService) PoliciesDummyPartialUpdateExecute(r ApiPoliciesDumm } localVarPath := localBasePath + "/policies/dummy/{policy_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterToString(r.policyUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterValueToString(r.policyUuid, "policyUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2808,9 +2842,9 @@ func (a *PoliciesApiService) PoliciesDummyPartialUpdateExecute(r ApiPoliciesDumm return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2827,6 +2861,7 @@ func (a *PoliciesApiService) PoliciesDummyPartialUpdateExecute(r ApiPoliciesDumm newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2837,6 +2872,7 @@ func (a *PoliciesApiService) PoliciesDummyPartialUpdateExecute(r ApiPoliciesDumm newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2897,7 +2933,7 @@ func (a *PoliciesApiService) PoliciesDummyRetrieveExecute(r ApiPoliciesDummyRetr } localVarPath := localBasePath + "/policies/dummy/{policy_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterToString(r.policyUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterValueToString(r.policyUuid, "policyUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2944,9 +2980,9 @@ func (a *PoliciesApiService) PoliciesDummyRetrieveExecute(r ApiPoliciesDummyRetr return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2963,6 +2999,7 @@ func (a *PoliciesApiService) PoliciesDummyRetrieveExecute(r ApiPoliciesDummyRetr newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2973,6 +3010,7 @@ func (a *PoliciesApiService) PoliciesDummyRetrieveExecute(r ApiPoliciesDummyRetr newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3039,7 +3077,7 @@ func (a *PoliciesApiService) PoliciesDummyUpdateExecute(r ApiPoliciesDummyUpdate } localVarPath := localBasePath + "/policies/dummy/{policy_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterToString(r.policyUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterValueToString(r.policyUuid, "policyUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -3091,9 +3129,9 @@ func (a *PoliciesApiService) PoliciesDummyUpdateExecute(r ApiPoliciesDummyUpdate return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -3110,6 +3148,7 @@ func (a *PoliciesApiService) PoliciesDummyUpdateExecute(r ApiPoliciesDummyUpdate newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -3120,6 +3159,7 @@ func (a *PoliciesApiService) PoliciesDummyUpdateExecute(r ApiPoliciesDummyUpdate newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3180,7 +3220,7 @@ func (a *PoliciesApiService) PoliciesDummyUsedByListExecute(r ApiPoliciesDummyUs } localVarPath := localBasePath + "/policies/dummy/{policy_uuid}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterToString(r.policyUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterValueToString(r.policyUuid, "policyUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -3227,9 +3267,9 @@ func (a *PoliciesApiService) PoliciesDummyUsedByListExecute(r ApiPoliciesDummyUs return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -3246,6 +3286,7 @@ func (a *PoliciesApiService) PoliciesDummyUsedByListExecute(r ApiPoliciesDummyUs newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -3256,6 +3297,7 @@ func (a *PoliciesApiService) PoliciesDummyUsedByListExecute(r ApiPoliciesDummyUs newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3370,9 +3412,9 @@ func (a *PoliciesApiService) PoliciesEventMatcherCreateExecute(r ApiPoliciesEven return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -3389,6 +3431,7 @@ func (a *PoliciesApiService) PoliciesEventMatcherCreateExecute(r ApiPoliciesEven newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -3399,6 +3442,7 @@ func (a *PoliciesApiService) PoliciesEventMatcherCreateExecute(r ApiPoliciesEven newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3457,7 +3501,7 @@ func (a *PoliciesApiService) PoliciesEventMatcherDestroyExecute(r ApiPoliciesEve } localVarPath := localBasePath + "/policies/event_matcher/{policy_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterToString(r.policyUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterValueToString(r.policyUuid, "policyUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -3504,9 +3548,9 @@ func (a *PoliciesApiService) PoliciesEventMatcherDestroyExecute(r ApiPoliciesEve return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -3523,6 +3567,7 @@ func (a *PoliciesApiService) PoliciesEventMatcherDestroyExecute(r ApiPoliciesEve newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -3533,6 +3578,7 @@ func (a *PoliciesApiService) PoliciesEventMatcherDestroyExecute(r ApiPoliciesEve newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -3664,40 +3710,40 @@ func (a *PoliciesApiService) PoliciesEventMatcherListExecute(r ApiPoliciesEventM localVarFormParams := url.Values{} if r.action != nil { - localVarQueryParams.Add("action", parameterToString(*r.action, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "action", r.action, "") } if r.app != nil { - localVarQueryParams.Add("app", parameterToString(*r.app, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "app", r.app, "") } if r.clientIp != nil { - localVarQueryParams.Add("client_ip", parameterToString(*r.clientIp, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "client_ip", r.clientIp, "") } if r.created != nil { - localVarQueryParams.Add("created", parameterToString(*r.created, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "created", r.created, "") } if r.executionLogging != nil { - localVarQueryParams.Add("execution_logging", parameterToString(*r.executionLogging, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "execution_logging", r.executionLogging, "") } if r.lastUpdated != nil { - localVarQueryParams.Add("last_updated", parameterToString(*r.lastUpdated, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "last_updated", r.lastUpdated, "") } if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.policyUuid != nil { - localVarQueryParams.Add("policy_uuid", parameterToString(*r.policyUuid, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "policy_uuid", r.policyUuid, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -3740,9 +3786,9 @@ func (a *PoliciesApiService) PoliciesEventMatcherListExecute(r ApiPoliciesEventM return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -3759,6 +3805,7 @@ func (a *PoliciesApiService) PoliciesEventMatcherListExecute(r ApiPoliciesEventM newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -3769,6 +3816,7 @@ func (a *PoliciesApiService) PoliciesEventMatcherListExecute(r ApiPoliciesEventM newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3835,7 +3883,7 @@ func (a *PoliciesApiService) PoliciesEventMatcherPartialUpdateExecute(r ApiPolic } localVarPath := localBasePath + "/policies/event_matcher/{policy_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterToString(r.policyUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterValueToString(r.policyUuid, "policyUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -3884,9 +3932,9 @@ func (a *PoliciesApiService) PoliciesEventMatcherPartialUpdateExecute(r ApiPolic return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -3903,6 +3951,7 @@ func (a *PoliciesApiService) PoliciesEventMatcherPartialUpdateExecute(r ApiPolic newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -3913,6 +3962,7 @@ func (a *PoliciesApiService) PoliciesEventMatcherPartialUpdateExecute(r ApiPolic newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3973,7 +4023,7 @@ func (a *PoliciesApiService) PoliciesEventMatcherRetrieveExecute(r ApiPoliciesEv } localVarPath := localBasePath + "/policies/event_matcher/{policy_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterToString(r.policyUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterValueToString(r.policyUuid, "policyUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -4020,9 +4070,9 @@ func (a *PoliciesApiService) PoliciesEventMatcherRetrieveExecute(r ApiPoliciesEv return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -4039,6 +4089,7 @@ func (a *PoliciesApiService) PoliciesEventMatcherRetrieveExecute(r ApiPoliciesEv newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -4049,6 +4100,7 @@ func (a *PoliciesApiService) PoliciesEventMatcherRetrieveExecute(r ApiPoliciesEv newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -4115,7 +4167,7 @@ func (a *PoliciesApiService) PoliciesEventMatcherUpdateExecute(r ApiPoliciesEven } localVarPath := localBasePath + "/policies/event_matcher/{policy_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterToString(r.policyUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterValueToString(r.policyUuid, "policyUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -4167,9 +4219,9 @@ func (a *PoliciesApiService) PoliciesEventMatcherUpdateExecute(r ApiPoliciesEven return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -4186,6 +4238,7 @@ func (a *PoliciesApiService) PoliciesEventMatcherUpdateExecute(r ApiPoliciesEven newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -4196,6 +4249,7 @@ func (a *PoliciesApiService) PoliciesEventMatcherUpdateExecute(r ApiPoliciesEven newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -4256,7 +4310,7 @@ func (a *PoliciesApiService) PoliciesEventMatcherUsedByListExecute(r ApiPolicies } localVarPath := localBasePath + "/policies/event_matcher/{policy_uuid}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterToString(r.policyUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterValueToString(r.policyUuid, "policyUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -4303,9 +4357,9 @@ func (a *PoliciesApiService) PoliciesEventMatcherUsedByListExecute(r ApiPolicies return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -4322,6 +4376,7 @@ func (a *PoliciesApiService) PoliciesEventMatcherUsedByListExecute(r ApiPolicies newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -4332,6 +4387,7 @@ func (a *PoliciesApiService) PoliciesEventMatcherUsedByListExecute(r ApiPolicies newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -4446,9 +4502,9 @@ func (a *PoliciesApiService) PoliciesExpressionCreateExecute(r ApiPoliciesExpres return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -4465,6 +4521,7 @@ func (a *PoliciesApiService) PoliciesExpressionCreateExecute(r ApiPoliciesExpres newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -4475,6 +4532,7 @@ func (a *PoliciesApiService) PoliciesExpressionCreateExecute(r ApiPoliciesExpres newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -4533,7 +4591,7 @@ func (a *PoliciesApiService) PoliciesExpressionDestroyExecute(r ApiPoliciesExpre } localVarPath := localBasePath + "/policies/expression/{policy_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterToString(r.policyUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterValueToString(r.policyUuid, "policyUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -4580,9 +4638,9 @@ func (a *PoliciesApiService) PoliciesExpressionDestroyExecute(r ApiPoliciesExpre return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -4599,6 +4657,7 @@ func (a *PoliciesApiService) PoliciesExpressionDestroyExecute(r ApiPoliciesExpre newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -4609,6 +4668,7 @@ func (a *PoliciesApiService) PoliciesExpressionDestroyExecute(r ApiPoliciesExpre newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -4727,34 +4787,34 @@ func (a *PoliciesApiService) PoliciesExpressionListExecute(r ApiPoliciesExpressi localVarFormParams := url.Values{} if r.created != nil { - localVarQueryParams.Add("created", parameterToString(*r.created, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "created", r.created, "") } if r.executionLogging != nil { - localVarQueryParams.Add("execution_logging", parameterToString(*r.executionLogging, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "execution_logging", r.executionLogging, "") } if r.expression != nil { - localVarQueryParams.Add("expression", parameterToString(*r.expression, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "expression", r.expression, "") } if r.lastUpdated != nil { - localVarQueryParams.Add("last_updated", parameterToString(*r.lastUpdated, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "last_updated", r.lastUpdated, "") } if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.policyUuid != nil { - localVarQueryParams.Add("policy_uuid", parameterToString(*r.policyUuid, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "policy_uuid", r.policyUuid, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -4797,9 +4857,9 @@ func (a *PoliciesApiService) PoliciesExpressionListExecute(r ApiPoliciesExpressi return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -4816,6 +4876,7 @@ func (a *PoliciesApiService) PoliciesExpressionListExecute(r ApiPoliciesExpressi newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -4826,6 +4887,7 @@ func (a *PoliciesApiService) PoliciesExpressionListExecute(r ApiPoliciesExpressi newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -4892,7 +4954,7 @@ func (a *PoliciesApiService) PoliciesExpressionPartialUpdateExecute(r ApiPolicie } localVarPath := localBasePath + "/policies/expression/{policy_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterToString(r.policyUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterValueToString(r.policyUuid, "policyUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -4941,9 +5003,9 @@ func (a *PoliciesApiService) PoliciesExpressionPartialUpdateExecute(r ApiPolicie return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -4960,6 +5022,7 @@ func (a *PoliciesApiService) PoliciesExpressionPartialUpdateExecute(r ApiPolicie newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -4970,6 +5033,7 @@ func (a *PoliciesApiService) PoliciesExpressionPartialUpdateExecute(r ApiPolicie newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -5030,7 +5094,7 @@ func (a *PoliciesApiService) PoliciesExpressionRetrieveExecute(r ApiPoliciesExpr } localVarPath := localBasePath + "/policies/expression/{policy_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterToString(r.policyUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterValueToString(r.policyUuid, "policyUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -5077,9 +5141,9 @@ func (a *PoliciesApiService) PoliciesExpressionRetrieveExecute(r ApiPoliciesExpr return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -5096,6 +5160,7 @@ func (a *PoliciesApiService) PoliciesExpressionRetrieveExecute(r ApiPoliciesExpr newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -5106,6 +5171,7 @@ func (a *PoliciesApiService) PoliciesExpressionRetrieveExecute(r ApiPoliciesExpr newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -5172,7 +5238,7 @@ func (a *PoliciesApiService) PoliciesExpressionUpdateExecute(r ApiPoliciesExpres } localVarPath := localBasePath + "/policies/expression/{policy_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterToString(r.policyUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterValueToString(r.policyUuid, "policyUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -5224,9 +5290,9 @@ func (a *PoliciesApiService) PoliciesExpressionUpdateExecute(r ApiPoliciesExpres return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -5243,6 +5309,7 @@ func (a *PoliciesApiService) PoliciesExpressionUpdateExecute(r ApiPoliciesExpres newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -5253,6 +5320,7 @@ func (a *PoliciesApiService) PoliciesExpressionUpdateExecute(r ApiPoliciesExpres newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -5313,7 +5381,7 @@ func (a *PoliciesApiService) PoliciesExpressionUsedByListExecute(r ApiPoliciesEx } localVarPath := localBasePath + "/policies/expression/{policy_uuid}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterToString(r.policyUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterValueToString(r.policyUuid, "policyUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -5360,9 +5428,9 @@ func (a *PoliciesApiService) PoliciesExpressionUsedByListExecute(r ApiPoliciesEx return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -5379,6 +5447,7 @@ func (a *PoliciesApiService) PoliciesExpressionUsedByListExecute(r ApiPoliciesEx newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -5389,6 +5458,7 @@ func (a *PoliciesApiService) PoliciesExpressionUsedByListExecute(r ApiPoliciesEx newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -5503,9 +5573,9 @@ func (a *PoliciesApiService) PoliciesPasswordCreateExecute(r ApiPoliciesPassword return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -5522,6 +5592,7 @@ func (a *PoliciesApiService) PoliciesPasswordCreateExecute(r ApiPoliciesPassword newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -5532,6 +5603,7 @@ func (a *PoliciesApiService) PoliciesPasswordCreateExecute(r ApiPoliciesPassword newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -5590,7 +5662,7 @@ func (a *PoliciesApiService) PoliciesPasswordDestroyExecute(r ApiPoliciesPasswor } localVarPath := localBasePath + "/policies/password/{policy_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterToString(r.policyUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterValueToString(r.policyUuid, "policyUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -5637,9 +5709,9 @@ func (a *PoliciesApiService) PoliciesPasswordDestroyExecute(r ApiPoliciesPasswor return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -5656,6 +5728,7 @@ func (a *PoliciesApiService) PoliciesPasswordDestroyExecute(r ApiPoliciesPasswor newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -5666,6 +5739,7 @@ func (a *PoliciesApiService) PoliciesPasswordDestroyExecute(r ApiPoliciesPasswor newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -5771,9 +5845,9 @@ func (a *PoliciesApiService) PoliciesPasswordExpiryCreateExecute(r ApiPoliciesPa return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -5790,6 +5864,7 @@ func (a *PoliciesApiService) PoliciesPasswordExpiryCreateExecute(r ApiPoliciesPa newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -5800,6 +5875,7 @@ func (a *PoliciesApiService) PoliciesPasswordExpiryCreateExecute(r ApiPoliciesPa newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -5858,7 +5934,7 @@ func (a *PoliciesApiService) PoliciesPasswordExpiryDestroyExecute(r ApiPoliciesP } localVarPath := localBasePath + "/policies/password_expiry/{policy_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterToString(r.policyUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterValueToString(r.policyUuid, "policyUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -5905,9 +5981,9 @@ func (a *PoliciesApiService) PoliciesPasswordExpiryDestroyExecute(r ApiPoliciesP return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -5924,6 +6000,7 @@ func (a *PoliciesApiService) PoliciesPasswordExpiryDestroyExecute(r ApiPoliciesP newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -5934,6 +6011,7 @@ func (a *PoliciesApiService) PoliciesPasswordExpiryDestroyExecute(r ApiPoliciesP newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -6058,37 +6136,37 @@ func (a *PoliciesApiService) PoliciesPasswordExpiryListExecute(r ApiPoliciesPass localVarFormParams := url.Values{} if r.created != nil { - localVarQueryParams.Add("created", parameterToString(*r.created, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "created", r.created, "") } if r.days != nil { - localVarQueryParams.Add("days", parameterToString(*r.days, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "days", r.days, "") } if r.denyOnly != nil { - localVarQueryParams.Add("deny_only", parameterToString(*r.denyOnly, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "deny_only", r.denyOnly, "") } if r.executionLogging != nil { - localVarQueryParams.Add("execution_logging", parameterToString(*r.executionLogging, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "execution_logging", r.executionLogging, "") } if r.lastUpdated != nil { - localVarQueryParams.Add("last_updated", parameterToString(*r.lastUpdated, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "last_updated", r.lastUpdated, "") } if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.policyUuid != nil { - localVarQueryParams.Add("policy_uuid", parameterToString(*r.policyUuid, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "policy_uuid", r.policyUuid, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -6131,9 +6209,9 @@ func (a *PoliciesApiService) PoliciesPasswordExpiryListExecute(r ApiPoliciesPass return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -6150,6 +6228,7 @@ func (a *PoliciesApiService) PoliciesPasswordExpiryListExecute(r ApiPoliciesPass newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -6160,6 +6239,7 @@ func (a *PoliciesApiService) PoliciesPasswordExpiryListExecute(r ApiPoliciesPass newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -6226,7 +6306,7 @@ func (a *PoliciesApiService) PoliciesPasswordExpiryPartialUpdateExecute(r ApiPol } localVarPath := localBasePath + "/policies/password_expiry/{policy_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterToString(r.policyUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterValueToString(r.policyUuid, "policyUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -6275,9 +6355,9 @@ func (a *PoliciesApiService) PoliciesPasswordExpiryPartialUpdateExecute(r ApiPol return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -6294,6 +6374,7 @@ func (a *PoliciesApiService) PoliciesPasswordExpiryPartialUpdateExecute(r ApiPol newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -6304,6 +6385,7 @@ func (a *PoliciesApiService) PoliciesPasswordExpiryPartialUpdateExecute(r ApiPol newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -6364,7 +6446,7 @@ func (a *PoliciesApiService) PoliciesPasswordExpiryRetrieveExecute(r ApiPolicies } localVarPath := localBasePath + "/policies/password_expiry/{policy_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterToString(r.policyUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterValueToString(r.policyUuid, "policyUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -6411,9 +6493,9 @@ func (a *PoliciesApiService) PoliciesPasswordExpiryRetrieveExecute(r ApiPolicies return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -6430,6 +6512,7 @@ func (a *PoliciesApiService) PoliciesPasswordExpiryRetrieveExecute(r ApiPolicies newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -6440,6 +6523,7 @@ func (a *PoliciesApiService) PoliciesPasswordExpiryRetrieveExecute(r ApiPolicies newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -6506,7 +6590,7 @@ func (a *PoliciesApiService) PoliciesPasswordExpiryUpdateExecute(r ApiPoliciesPa } localVarPath := localBasePath + "/policies/password_expiry/{policy_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterToString(r.policyUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterValueToString(r.policyUuid, "policyUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -6558,9 +6642,9 @@ func (a *PoliciesApiService) PoliciesPasswordExpiryUpdateExecute(r ApiPoliciesPa return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -6577,6 +6661,7 @@ func (a *PoliciesApiService) PoliciesPasswordExpiryUpdateExecute(r ApiPoliciesPa newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -6587,6 +6672,7 @@ func (a *PoliciesApiService) PoliciesPasswordExpiryUpdateExecute(r ApiPoliciesPa newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -6647,7 +6733,7 @@ func (a *PoliciesApiService) PoliciesPasswordExpiryUsedByListExecute(r ApiPolici } localVarPath := localBasePath + "/policies/password_expiry/{policy_uuid}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterToString(r.policyUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterValueToString(r.policyUuid, "policyUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -6694,9 +6780,9 @@ func (a *PoliciesApiService) PoliciesPasswordExpiryUsedByListExecute(r ApiPolici return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -6713,6 +6799,7 @@ func (a *PoliciesApiService) PoliciesPasswordExpiryUsedByListExecute(r ApiPolici newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -6723,6 +6810,7 @@ func (a *PoliciesApiService) PoliciesPasswordExpiryUsedByListExecute(r ApiPolici newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -6922,70 +7010,70 @@ func (a *PoliciesApiService) PoliciesPasswordListExecute(r ApiPoliciesPasswordLi localVarFormParams := url.Values{} if r.amountDigits != nil { - localVarQueryParams.Add("amount_digits", parameterToString(*r.amountDigits, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "amount_digits", r.amountDigits, "") } if r.amountLowercase != nil { - localVarQueryParams.Add("amount_lowercase", parameterToString(*r.amountLowercase, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "amount_lowercase", r.amountLowercase, "") } if r.amountSymbols != nil { - localVarQueryParams.Add("amount_symbols", parameterToString(*r.amountSymbols, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "amount_symbols", r.amountSymbols, "") } if r.amountUppercase != nil { - localVarQueryParams.Add("amount_uppercase", parameterToString(*r.amountUppercase, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "amount_uppercase", r.amountUppercase, "") } if r.checkHaveIBeenPwned != nil { - localVarQueryParams.Add("check_have_i_been_pwned", parameterToString(*r.checkHaveIBeenPwned, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "check_have_i_been_pwned", r.checkHaveIBeenPwned, "") } if r.checkStaticRules != nil { - localVarQueryParams.Add("check_static_rules", parameterToString(*r.checkStaticRules, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "check_static_rules", r.checkStaticRules, "") } if r.checkZxcvbn != nil { - localVarQueryParams.Add("check_zxcvbn", parameterToString(*r.checkZxcvbn, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "check_zxcvbn", r.checkZxcvbn, "") } if r.created != nil { - localVarQueryParams.Add("created", parameterToString(*r.created, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "created", r.created, "") } if r.errorMessage != nil { - localVarQueryParams.Add("error_message", parameterToString(*r.errorMessage, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "error_message", r.errorMessage, "") } if r.executionLogging != nil { - localVarQueryParams.Add("execution_logging", parameterToString(*r.executionLogging, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "execution_logging", r.executionLogging, "") } if r.hibpAllowedCount != nil { - localVarQueryParams.Add("hibp_allowed_count", parameterToString(*r.hibpAllowedCount, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "hibp_allowed_count", r.hibpAllowedCount, "") } if r.lastUpdated != nil { - localVarQueryParams.Add("last_updated", parameterToString(*r.lastUpdated, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "last_updated", r.lastUpdated, "") } if r.lengthMin != nil { - localVarQueryParams.Add("length_min", parameterToString(*r.lengthMin, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "length_min", r.lengthMin, "") } if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.passwordField != nil { - localVarQueryParams.Add("password_field", parameterToString(*r.passwordField, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "password_field", r.passwordField, "") } if r.policyUuid != nil { - localVarQueryParams.Add("policy_uuid", parameterToString(*r.policyUuid, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "policy_uuid", r.policyUuid, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } if r.symbolCharset != nil { - localVarQueryParams.Add("symbol_charset", parameterToString(*r.symbolCharset, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "symbol_charset", r.symbolCharset, "") } if r.zxcvbnScoreThreshold != nil { - localVarQueryParams.Add("zxcvbn_score_threshold", parameterToString(*r.zxcvbnScoreThreshold, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "zxcvbn_score_threshold", r.zxcvbnScoreThreshold, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -7028,9 +7116,9 @@ func (a *PoliciesApiService) PoliciesPasswordListExecute(r ApiPoliciesPasswordLi return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -7047,6 +7135,7 @@ func (a *PoliciesApiService) PoliciesPasswordListExecute(r ApiPoliciesPasswordLi newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -7057,6 +7146,7 @@ func (a *PoliciesApiService) PoliciesPasswordListExecute(r ApiPoliciesPasswordLi newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -7123,7 +7213,7 @@ func (a *PoliciesApiService) PoliciesPasswordPartialUpdateExecute(r ApiPoliciesP } localVarPath := localBasePath + "/policies/password/{policy_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterToString(r.policyUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterValueToString(r.policyUuid, "policyUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -7172,9 +7262,9 @@ func (a *PoliciesApiService) PoliciesPasswordPartialUpdateExecute(r ApiPoliciesP return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -7191,6 +7281,7 @@ func (a *PoliciesApiService) PoliciesPasswordPartialUpdateExecute(r ApiPoliciesP newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -7201,6 +7292,7 @@ func (a *PoliciesApiService) PoliciesPasswordPartialUpdateExecute(r ApiPoliciesP newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -7261,7 +7353,7 @@ func (a *PoliciesApiService) PoliciesPasswordRetrieveExecute(r ApiPoliciesPasswo } localVarPath := localBasePath + "/policies/password/{policy_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterToString(r.policyUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterValueToString(r.policyUuid, "policyUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -7308,9 +7400,9 @@ func (a *PoliciesApiService) PoliciesPasswordRetrieveExecute(r ApiPoliciesPasswo return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -7327,6 +7419,7 @@ func (a *PoliciesApiService) PoliciesPasswordRetrieveExecute(r ApiPoliciesPasswo newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -7337,6 +7430,7 @@ func (a *PoliciesApiService) PoliciesPasswordRetrieveExecute(r ApiPoliciesPasswo newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -7403,7 +7497,7 @@ func (a *PoliciesApiService) PoliciesPasswordUpdateExecute(r ApiPoliciesPassword } localVarPath := localBasePath + "/policies/password/{policy_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterToString(r.policyUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterValueToString(r.policyUuid, "policyUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -7455,9 +7549,9 @@ func (a *PoliciesApiService) PoliciesPasswordUpdateExecute(r ApiPoliciesPassword return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -7474,6 +7568,7 @@ func (a *PoliciesApiService) PoliciesPasswordUpdateExecute(r ApiPoliciesPassword newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -7484,6 +7579,7 @@ func (a *PoliciesApiService) PoliciesPasswordUpdateExecute(r ApiPoliciesPassword newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -7544,7 +7640,7 @@ func (a *PoliciesApiService) PoliciesPasswordUsedByListExecute(r ApiPoliciesPass } localVarPath := localBasePath + "/policies/password/{policy_uuid}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterToString(r.policyUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterValueToString(r.policyUuid, "policyUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -7591,9 +7687,9 @@ func (a *PoliciesApiService) PoliciesPasswordUsedByListExecute(r ApiPoliciesPass return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -7610,6 +7706,7 @@ func (a *PoliciesApiService) PoliciesPasswordUsedByListExecute(r ApiPoliciesPass newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -7620,6 +7717,7 @@ func (a *PoliciesApiService) PoliciesPasswordUsedByListExecute(r ApiPoliciesPass newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -7734,9 +7832,9 @@ func (a *PoliciesApiService) PoliciesReputationCreateExecute(r ApiPoliciesReputa return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -7753,6 +7851,7 @@ func (a *PoliciesApiService) PoliciesReputationCreateExecute(r ApiPoliciesReputa newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -7763,6 +7862,7 @@ func (a *PoliciesApiService) PoliciesReputationCreateExecute(r ApiPoliciesReputa newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -7821,7 +7921,7 @@ func (a *PoliciesApiService) PoliciesReputationDestroyExecute(r ApiPoliciesReput } localVarPath := localBasePath + "/policies/reputation/{policy_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterToString(r.policyUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterValueToString(r.policyUuid, "policyUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -7868,9 +7968,9 @@ func (a *PoliciesApiService) PoliciesReputationDestroyExecute(r ApiPoliciesReput return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -7887,6 +7987,7 @@ func (a *PoliciesApiService) PoliciesReputationDestroyExecute(r ApiPoliciesReput newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -7897,6 +7998,7 @@ func (a *PoliciesApiService) PoliciesReputationDestroyExecute(r ApiPoliciesReput newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -8027,40 +8129,40 @@ func (a *PoliciesApiService) PoliciesReputationListExecute(r ApiPoliciesReputati localVarFormParams := url.Values{} if r.checkIp != nil { - localVarQueryParams.Add("check_ip", parameterToString(*r.checkIp, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "check_ip", r.checkIp, "") } if r.checkUsername != nil { - localVarQueryParams.Add("check_username", parameterToString(*r.checkUsername, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "check_username", r.checkUsername, "") } if r.created != nil { - localVarQueryParams.Add("created", parameterToString(*r.created, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "created", r.created, "") } if r.executionLogging != nil { - localVarQueryParams.Add("execution_logging", parameterToString(*r.executionLogging, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "execution_logging", r.executionLogging, "") } if r.lastUpdated != nil { - localVarQueryParams.Add("last_updated", parameterToString(*r.lastUpdated, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "last_updated", r.lastUpdated, "") } if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.policyUuid != nil { - localVarQueryParams.Add("policy_uuid", parameterToString(*r.policyUuid, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "policy_uuid", r.policyUuid, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } if r.threshold != nil { - localVarQueryParams.Add("threshold", parameterToString(*r.threshold, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "threshold", r.threshold, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -8103,9 +8205,9 @@ func (a *PoliciesApiService) PoliciesReputationListExecute(r ApiPoliciesReputati return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -8122,6 +8224,7 @@ func (a *PoliciesApiService) PoliciesReputationListExecute(r ApiPoliciesReputati newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -8132,6 +8235,7 @@ func (a *PoliciesApiService) PoliciesReputationListExecute(r ApiPoliciesReputati newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -8198,7 +8302,7 @@ func (a *PoliciesApiService) PoliciesReputationPartialUpdateExecute(r ApiPolicie } localVarPath := localBasePath + "/policies/reputation/{policy_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterToString(r.policyUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterValueToString(r.policyUuid, "policyUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -8247,9 +8351,9 @@ func (a *PoliciesApiService) PoliciesReputationPartialUpdateExecute(r ApiPolicie return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -8266,6 +8370,7 @@ func (a *PoliciesApiService) PoliciesReputationPartialUpdateExecute(r ApiPolicie newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -8276,6 +8381,7 @@ func (a *PoliciesApiService) PoliciesReputationPartialUpdateExecute(r ApiPolicie newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -8336,7 +8442,7 @@ func (a *PoliciesApiService) PoliciesReputationRetrieveExecute(r ApiPoliciesRepu } localVarPath := localBasePath + "/policies/reputation/{policy_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterToString(r.policyUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterValueToString(r.policyUuid, "policyUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -8383,9 +8489,9 @@ func (a *PoliciesApiService) PoliciesReputationRetrieveExecute(r ApiPoliciesRepu return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -8402,6 +8508,7 @@ func (a *PoliciesApiService) PoliciesReputationRetrieveExecute(r ApiPoliciesRepu newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -8412,6 +8519,7 @@ func (a *PoliciesApiService) PoliciesReputationRetrieveExecute(r ApiPoliciesRepu newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -8470,7 +8578,7 @@ func (a *PoliciesApiService) PoliciesReputationScoresDestroyExecute(r ApiPolicie } localVarPath := localBasePath + "/policies/reputation/scores/{reputation_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"reputation_uuid"+"}", url.PathEscape(parameterToString(r.reputationUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"reputation_uuid"+"}", url.PathEscape(parameterValueToString(r.reputationUuid, "reputationUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -8517,9 +8625,9 @@ func (a *PoliciesApiService) PoliciesReputationScoresDestroyExecute(r ApiPolicie return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -8536,6 +8644,7 @@ func (a *PoliciesApiService) PoliciesReputationScoresDestroyExecute(r ApiPolicie newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -8546,6 +8655,7 @@ func (a *PoliciesApiService) PoliciesReputationScoresDestroyExecute(r ApiPolicie newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -8646,25 +8756,25 @@ func (a *PoliciesApiService) PoliciesReputationScoresListExecute(r ApiPoliciesRe localVarFormParams := url.Values{} if r.identifier != nil { - localVarQueryParams.Add("identifier", parameterToString(*r.identifier, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "identifier", r.identifier, "") } if r.ip != nil { - localVarQueryParams.Add("ip", parameterToString(*r.ip, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ip", r.ip, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.score != nil { - localVarQueryParams.Add("score", parameterToString(*r.score, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "score", r.score, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -8707,9 +8817,9 @@ func (a *PoliciesApiService) PoliciesReputationScoresListExecute(r ApiPoliciesRe return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -8726,6 +8836,7 @@ func (a *PoliciesApiService) PoliciesReputationScoresListExecute(r ApiPoliciesRe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -8736,6 +8847,7 @@ func (a *PoliciesApiService) PoliciesReputationScoresListExecute(r ApiPoliciesRe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -8796,7 +8908,7 @@ func (a *PoliciesApiService) PoliciesReputationScoresRetrieveExecute(r ApiPolici } localVarPath := localBasePath + "/policies/reputation/scores/{reputation_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"reputation_uuid"+"}", url.PathEscape(parameterToString(r.reputationUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"reputation_uuid"+"}", url.PathEscape(parameterValueToString(r.reputationUuid, "reputationUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -8843,9 +8955,9 @@ func (a *PoliciesApiService) PoliciesReputationScoresRetrieveExecute(r ApiPolici return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -8862,6 +8974,7 @@ func (a *PoliciesApiService) PoliciesReputationScoresRetrieveExecute(r ApiPolici newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -8872,6 +8985,7 @@ func (a *PoliciesApiService) PoliciesReputationScoresRetrieveExecute(r ApiPolici newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -8932,7 +9046,7 @@ func (a *PoliciesApiService) PoliciesReputationScoresUsedByListExecute(r ApiPoli } localVarPath := localBasePath + "/policies/reputation/scores/{reputation_uuid}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"reputation_uuid"+"}", url.PathEscape(parameterToString(r.reputationUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"reputation_uuid"+"}", url.PathEscape(parameterValueToString(r.reputationUuid, "reputationUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -8979,9 +9093,9 @@ func (a *PoliciesApiService) PoliciesReputationScoresUsedByListExecute(r ApiPoli return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -8998,6 +9112,7 @@ func (a *PoliciesApiService) PoliciesReputationScoresUsedByListExecute(r ApiPoli newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -9008,6 +9123,7 @@ func (a *PoliciesApiService) PoliciesReputationScoresUsedByListExecute(r ApiPoli newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -9074,7 +9190,7 @@ func (a *PoliciesApiService) PoliciesReputationUpdateExecute(r ApiPoliciesReputa } localVarPath := localBasePath + "/policies/reputation/{policy_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterToString(r.policyUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterValueToString(r.policyUuid, "policyUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -9126,9 +9242,9 @@ func (a *PoliciesApiService) PoliciesReputationUpdateExecute(r ApiPoliciesReputa return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -9145,6 +9261,7 @@ func (a *PoliciesApiService) PoliciesReputationUpdateExecute(r ApiPoliciesReputa newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -9155,6 +9272,7 @@ func (a *PoliciesApiService) PoliciesReputationUpdateExecute(r ApiPoliciesReputa newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -9215,7 +9333,7 @@ func (a *PoliciesApiService) PoliciesReputationUsedByListExecute(r ApiPoliciesRe } localVarPath := localBasePath + "/policies/reputation/{policy_uuid}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterToString(r.policyUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"policy_uuid"+"}", url.PathEscape(parameterValueToString(r.policyUuid, "policyUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -9262,9 +9380,9 @@ func (a *PoliciesApiService) PoliciesReputationUsedByListExecute(r ApiPoliciesRe return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -9281,6 +9399,7 @@ func (a *PoliciesApiService) PoliciesReputationUsedByListExecute(r ApiPoliciesRe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -9291,6 +9410,7 @@ func (a *PoliciesApiService) PoliciesReputationUsedByListExecute(r ApiPoliciesRe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr diff --git a/api_propertymappings.go b/api_propertymappings.go index 9ad2a54c6..740179da8 100644 --- a/api_propertymappings.go +++ b/api_propertymappings.go @@ -14,7 +14,7 @@ package api import ( "bytes" "context" - "io/ioutil" + "io" "net/http" "net/url" "reflect" @@ -65,7 +65,7 @@ func (a *PropertymappingsApiService) PropertymappingsAllDestroyExecute(r ApiProp } localVarPath := localBasePath + "/propertymappings/all/{pm_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterToString(r.pmUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterValueToString(r.pmUuid, "pmUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -112,9 +112,9 @@ func (a *PropertymappingsApiService) PropertymappingsAllDestroyExecute(r ApiProp return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -131,6 +131,7 @@ func (a *PropertymappingsApiService) PropertymappingsAllDestroyExecute(r ApiProp newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -141,6 +142,7 @@ func (a *PropertymappingsApiService) PropertymappingsAllDestroyExecute(r ApiProp newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -229,19 +231,19 @@ func (a *PropertymappingsApiService) PropertymappingsAllListExecute(r ApiPropert localVarFormParams := url.Values{} if r.managedIsnull != nil { - localVarQueryParams.Add("managed__isnull", parameterToString(*r.managedIsnull, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "managed__isnull", r.managedIsnull, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -284,9 +286,9 @@ func (a *PropertymappingsApiService) PropertymappingsAllListExecute(r ApiPropert return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -303,6 +305,7 @@ func (a *PropertymappingsApiService) PropertymappingsAllListExecute(r ApiPropert newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -313,6 +316,7 @@ func (a *PropertymappingsApiService) PropertymappingsAllListExecute(r ApiPropert newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -373,7 +377,7 @@ func (a *PropertymappingsApiService) PropertymappingsAllRetrieveExecute(r ApiPro } localVarPath := localBasePath + "/propertymappings/all/{pm_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterToString(r.pmUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterValueToString(r.pmUuid, "pmUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -420,9 +424,9 @@ func (a *PropertymappingsApiService) PropertymappingsAllRetrieveExecute(r ApiPro return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -439,6 +443,7 @@ func (a *PropertymappingsApiService) PropertymappingsAllRetrieveExecute(r ApiPro newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -449,6 +454,7 @@ func (a *PropertymappingsApiService) PropertymappingsAllRetrieveExecute(r ApiPro newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -521,7 +527,7 @@ func (a *PropertymappingsApiService) PropertymappingsAllTestCreateExecute(r ApiP } localVarPath := localBasePath + "/propertymappings/all/{pm_uuid}/test/" - localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterToString(r.pmUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterValueToString(r.pmUuid, "pmUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -531,7 +537,7 @@ func (a *PropertymappingsApiService) PropertymappingsAllTestCreateExecute(r ApiP } if r.formatResult != nil { - localVarQueryParams.Add("format_result", parameterToString(*r.formatResult, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "format_result", r.formatResult, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -576,9 +582,9 @@ func (a *PropertymappingsApiService) PropertymappingsAllTestCreateExecute(r ApiP return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -595,6 +601,7 @@ func (a *PropertymappingsApiService) PropertymappingsAllTestCreateExecute(r ApiP newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -698,9 +705,9 @@ func (a *PropertymappingsApiService) PropertymappingsAllTypesListExecute(r ApiPr return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -717,6 +724,7 @@ func (a *PropertymappingsApiService) PropertymappingsAllTypesListExecute(r ApiPr newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -727,6 +735,7 @@ func (a *PropertymappingsApiService) PropertymappingsAllTypesListExecute(r ApiPr newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -787,7 +796,7 @@ func (a *PropertymappingsApiService) PropertymappingsAllUsedByListExecute(r ApiP } localVarPath := localBasePath + "/propertymappings/all/{pm_uuid}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterToString(r.pmUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterValueToString(r.pmUuid, "pmUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -834,9 +843,9 @@ func (a *PropertymappingsApiService) PropertymappingsAllUsedByListExecute(r ApiP return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -853,6 +862,7 @@ func (a *PropertymappingsApiService) PropertymappingsAllUsedByListExecute(r ApiP newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -863,6 +873,7 @@ func (a *PropertymappingsApiService) PropertymappingsAllUsedByListExecute(r ApiP newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -977,9 +988,9 @@ func (a *PropertymappingsApiService) PropertymappingsLdapCreateExecute(r ApiProp return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -996,6 +1007,7 @@ func (a *PropertymappingsApiService) PropertymappingsLdapCreateExecute(r ApiProp newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1006,6 +1018,7 @@ func (a *PropertymappingsApiService) PropertymappingsLdapCreateExecute(r ApiProp newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1064,7 +1077,7 @@ func (a *PropertymappingsApiService) PropertymappingsLdapDestroyExecute(r ApiPro } localVarPath := localBasePath + "/propertymappings/ldap/{pm_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterToString(r.pmUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterValueToString(r.pmUuid, "pmUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1111,9 +1124,9 @@ func (a *PropertymappingsApiService) PropertymappingsLdapDestroyExecute(r ApiPro return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -1130,6 +1143,7 @@ func (a *PropertymappingsApiService) PropertymappingsLdapDestroyExecute(r ApiPro newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -1140,6 +1154,7 @@ func (a *PropertymappingsApiService) PropertymappingsLdapDestroyExecute(r ApiPro newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -1252,39 +1267,39 @@ func (a *PropertymappingsApiService) PropertymappingsLdapListExecute(r ApiProper localVarFormParams := url.Values{} if r.expression != nil { - localVarQueryParams.Add("expression", parameterToString(*r.expression, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "expression", r.expression, "") } if r.managed != nil { t := *r.managed if reflect.TypeOf(t).Kind() == reflect.Slice { s := reflect.ValueOf(t) for i := 0; i < s.Len(); i++ { - localVarQueryParams.Add("managed", parameterToString(s.Index(i), "multi")) + parameterAddToHeaderOrQuery(localVarQueryParams, "managed", s.Index(i), "multi") } } else { - localVarQueryParams.Add("managed", parameterToString(t, "multi")) + parameterAddToHeaderOrQuery(localVarQueryParams, "managed", t, "multi") } } if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.objectField != nil { - localVarQueryParams.Add("object_field", parameterToString(*r.objectField, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "object_field", r.objectField, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.pmUuid != nil { - localVarQueryParams.Add("pm_uuid", parameterToString(*r.pmUuid, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "pm_uuid", r.pmUuid, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1327,9 +1342,9 @@ func (a *PropertymappingsApiService) PropertymappingsLdapListExecute(r ApiProper return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1346,6 +1361,7 @@ func (a *PropertymappingsApiService) PropertymappingsLdapListExecute(r ApiProper newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1356,6 +1372,7 @@ func (a *PropertymappingsApiService) PropertymappingsLdapListExecute(r ApiProper newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1422,7 +1439,7 @@ func (a *PropertymappingsApiService) PropertymappingsLdapPartialUpdateExecute(r } localVarPath := localBasePath + "/propertymappings/ldap/{pm_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterToString(r.pmUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterValueToString(r.pmUuid, "pmUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1471,9 +1488,9 @@ func (a *PropertymappingsApiService) PropertymappingsLdapPartialUpdateExecute(r return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1490,6 +1507,7 @@ func (a *PropertymappingsApiService) PropertymappingsLdapPartialUpdateExecute(r newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1500,6 +1518,7 @@ func (a *PropertymappingsApiService) PropertymappingsLdapPartialUpdateExecute(r newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1560,7 +1579,7 @@ func (a *PropertymappingsApiService) PropertymappingsLdapRetrieveExecute(r ApiPr } localVarPath := localBasePath + "/propertymappings/ldap/{pm_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterToString(r.pmUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterValueToString(r.pmUuid, "pmUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1607,9 +1626,9 @@ func (a *PropertymappingsApiService) PropertymappingsLdapRetrieveExecute(r ApiPr return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1626,6 +1645,7 @@ func (a *PropertymappingsApiService) PropertymappingsLdapRetrieveExecute(r ApiPr newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1636,6 +1656,7 @@ func (a *PropertymappingsApiService) PropertymappingsLdapRetrieveExecute(r ApiPr newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1702,7 +1723,7 @@ func (a *PropertymappingsApiService) PropertymappingsLdapUpdateExecute(r ApiProp } localVarPath := localBasePath + "/propertymappings/ldap/{pm_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterToString(r.pmUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterValueToString(r.pmUuid, "pmUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1754,9 +1775,9 @@ func (a *PropertymappingsApiService) PropertymappingsLdapUpdateExecute(r ApiProp return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1773,6 +1794,7 @@ func (a *PropertymappingsApiService) PropertymappingsLdapUpdateExecute(r ApiProp newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1783,6 +1805,7 @@ func (a *PropertymappingsApiService) PropertymappingsLdapUpdateExecute(r ApiProp newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1843,7 +1866,7 @@ func (a *PropertymappingsApiService) PropertymappingsLdapUsedByListExecute(r Api } localVarPath := localBasePath + "/propertymappings/ldap/{pm_uuid}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterToString(r.pmUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterValueToString(r.pmUuid, "pmUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1890,9 +1913,9 @@ func (a *PropertymappingsApiService) PropertymappingsLdapUsedByListExecute(r Api return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1909,6 +1932,7 @@ func (a *PropertymappingsApiService) PropertymappingsLdapUsedByListExecute(r Api newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1919,6 +1943,7 @@ func (a *PropertymappingsApiService) PropertymappingsLdapUsedByListExecute(r Api newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2033,9 +2058,9 @@ func (a *PropertymappingsApiService) PropertymappingsNotificationCreateExecute(r return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2052,6 +2077,7 @@ func (a *PropertymappingsApiService) PropertymappingsNotificationCreateExecute(r newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2062,6 +2088,7 @@ func (a *PropertymappingsApiService) PropertymappingsNotificationCreateExecute(r newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2120,7 +2147,7 @@ func (a *PropertymappingsApiService) PropertymappingsNotificationDestroyExecute( } localVarPath := localBasePath + "/propertymappings/notification/{pm_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterToString(r.pmUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterValueToString(r.pmUuid, "pmUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2167,9 +2194,9 @@ func (a *PropertymappingsApiService) PropertymappingsNotificationDestroyExecute( return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -2186,6 +2213,7 @@ func (a *PropertymappingsApiService) PropertymappingsNotificationDestroyExecute( newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -2196,6 +2224,7 @@ func (a *PropertymappingsApiService) PropertymappingsNotificationDestroyExecute( newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -2284,19 +2313,19 @@ func (a *PropertymappingsApiService) PropertymappingsNotificationListExecute(r A localVarFormParams := url.Values{} if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -2339,9 +2368,9 @@ func (a *PropertymappingsApiService) PropertymappingsNotificationListExecute(r A return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2358,6 +2387,7 @@ func (a *PropertymappingsApiService) PropertymappingsNotificationListExecute(r A newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2368,6 +2398,7 @@ func (a *PropertymappingsApiService) PropertymappingsNotificationListExecute(r A newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2434,7 +2465,7 @@ func (a *PropertymappingsApiService) PropertymappingsNotificationPartialUpdateEx } localVarPath := localBasePath + "/propertymappings/notification/{pm_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterToString(r.pmUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterValueToString(r.pmUuid, "pmUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2483,9 +2514,9 @@ func (a *PropertymappingsApiService) PropertymappingsNotificationPartialUpdateEx return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2502,6 +2533,7 @@ func (a *PropertymappingsApiService) PropertymappingsNotificationPartialUpdateEx newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2512,6 +2544,7 @@ func (a *PropertymappingsApiService) PropertymappingsNotificationPartialUpdateEx newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2572,7 +2605,7 @@ func (a *PropertymappingsApiService) PropertymappingsNotificationRetrieveExecute } localVarPath := localBasePath + "/propertymappings/notification/{pm_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterToString(r.pmUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterValueToString(r.pmUuid, "pmUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2619,9 +2652,9 @@ func (a *PropertymappingsApiService) PropertymappingsNotificationRetrieveExecute return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2638,6 +2671,7 @@ func (a *PropertymappingsApiService) PropertymappingsNotificationRetrieveExecute newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2648,6 +2682,7 @@ func (a *PropertymappingsApiService) PropertymappingsNotificationRetrieveExecute newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2714,7 +2749,7 @@ func (a *PropertymappingsApiService) PropertymappingsNotificationUpdateExecute(r } localVarPath := localBasePath + "/propertymappings/notification/{pm_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterToString(r.pmUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterValueToString(r.pmUuid, "pmUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2766,9 +2801,9 @@ func (a *PropertymappingsApiService) PropertymappingsNotificationUpdateExecute(r return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2785,6 +2820,7 @@ func (a *PropertymappingsApiService) PropertymappingsNotificationUpdateExecute(r newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2795,6 +2831,7 @@ func (a *PropertymappingsApiService) PropertymappingsNotificationUpdateExecute(r newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2855,7 +2892,7 @@ func (a *PropertymappingsApiService) PropertymappingsNotificationUsedByListExecu } localVarPath := localBasePath + "/propertymappings/notification/{pm_uuid}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterToString(r.pmUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterValueToString(r.pmUuid, "pmUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2902,9 +2939,9 @@ func (a *PropertymappingsApiService) PropertymappingsNotificationUsedByListExecu return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2921,6 +2958,7 @@ func (a *PropertymappingsApiService) PropertymappingsNotificationUsedByListExecu newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2931,6 +2969,7 @@ func (a *PropertymappingsApiService) PropertymappingsNotificationUsedByListExecu newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3045,9 +3084,9 @@ func (a *PropertymappingsApiService) PropertymappingsSamlCreateExecute(r ApiProp return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -3064,6 +3103,7 @@ func (a *PropertymappingsApiService) PropertymappingsSamlCreateExecute(r ApiProp newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -3074,6 +3114,7 @@ func (a *PropertymappingsApiService) PropertymappingsSamlCreateExecute(r ApiProp newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3132,7 +3173,7 @@ func (a *PropertymappingsApiService) PropertymappingsSamlDestroyExecute(r ApiPro } localVarPath := localBasePath + "/propertymappings/saml/{pm_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterToString(r.pmUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterValueToString(r.pmUuid, "pmUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -3179,9 +3220,9 @@ func (a *PropertymappingsApiService) PropertymappingsSamlDestroyExecute(r ApiPro return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -3198,6 +3239,7 @@ func (a *PropertymappingsApiService) PropertymappingsSamlDestroyExecute(r ApiPro newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -3208,6 +3250,7 @@ func (a *PropertymappingsApiService) PropertymappingsSamlDestroyExecute(r ApiPro newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -3326,42 +3369,42 @@ func (a *PropertymappingsApiService) PropertymappingsSamlListExecute(r ApiProper localVarFormParams := url.Values{} if r.expression != nil { - localVarQueryParams.Add("expression", parameterToString(*r.expression, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "expression", r.expression, "") } if r.friendlyName != nil { - localVarQueryParams.Add("friendly_name", parameterToString(*r.friendlyName, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "friendly_name", r.friendlyName, "") } if r.managed != nil { t := *r.managed if reflect.TypeOf(t).Kind() == reflect.Slice { s := reflect.ValueOf(t) for i := 0; i < s.Len(); i++ { - localVarQueryParams.Add("managed", parameterToString(s.Index(i), "multi")) + parameterAddToHeaderOrQuery(localVarQueryParams, "managed", s.Index(i), "multi") } } else { - localVarQueryParams.Add("managed", parameterToString(t, "multi")) + parameterAddToHeaderOrQuery(localVarQueryParams, "managed", t, "multi") } } if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.pmUuid != nil { - localVarQueryParams.Add("pm_uuid", parameterToString(*r.pmUuid, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "pm_uuid", r.pmUuid, "") } if r.samlName != nil { - localVarQueryParams.Add("saml_name", parameterToString(*r.samlName, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "saml_name", r.samlName, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -3404,9 +3447,9 @@ func (a *PropertymappingsApiService) PropertymappingsSamlListExecute(r ApiProper return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -3423,6 +3466,7 @@ func (a *PropertymappingsApiService) PropertymappingsSamlListExecute(r ApiProper newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -3433,6 +3477,7 @@ func (a *PropertymappingsApiService) PropertymappingsSamlListExecute(r ApiProper newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3499,7 +3544,7 @@ func (a *PropertymappingsApiService) PropertymappingsSamlPartialUpdateExecute(r } localVarPath := localBasePath + "/propertymappings/saml/{pm_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterToString(r.pmUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterValueToString(r.pmUuid, "pmUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -3548,9 +3593,9 @@ func (a *PropertymappingsApiService) PropertymappingsSamlPartialUpdateExecute(r return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -3567,6 +3612,7 @@ func (a *PropertymappingsApiService) PropertymappingsSamlPartialUpdateExecute(r newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -3577,6 +3623,7 @@ func (a *PropertymappingsApiService) PropertymappingsSamlPartialUpdateExecute(r newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3637,7 +3684,7 @@ func (a *PropertymappingsApiService) PropertymappingsSamlRetrieveExecute(r ApiPr } localVarPath := localBasePath + "/propertymappings/saml/{pm_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterToString(r.pmUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterValueToString(r.pmUuid, "pmUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -3684,9 +3731,9 @@ func (a *PropertymappingsApiService) PropertymappingsSamlRetrieveExecute(r ApiPr return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -3703,6 +3750,7 @@ func (a *PropertymappingsApiService) PropertymappingsSamlRetrieveExecute(r ApiPr newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -3713,6 +3761,7 @@ func (a *PropertymappingsApiService) PropertymappingsSamlRetrieveExecute(r ApiPr newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3779,7 +3828,7 @@ func (a *PropertymappingsApiService) PropertymappingsSamlUpdateExecute(r ApiProp } localVarPath := localBasePath + "/propertymappings/saml/{pm_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterToString(r.pmUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterValueToString(r.pmUuid, "pmUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -3831,9 +3880,9 @@ func (a *PropertymappingsApiService) PropertymappingsSamlUpdateExecute(r ApiProp return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -3850,6 +3899,7 @@ func (a *PropertymappingsApiService) PropertymappingsSamlUpdateExecute(r ApiProp newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -3860,6 +3910,7 @@ func (a *PropertymappingsApiService) PropertymappingsSamlUpdateExecute(r ApiProp newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3920,7 +3971,7 @@ func (a *PropertymappingsApiService) PropertymappingsSamlUsedByListExecute(r Api } localVarPath := localBasePath + "/propertymappings/saml/{pm_uuid}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterToString(r.pmUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterValueToString(r.pmUuid, "pmUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -3967,9 +4018,9 @@ func (a *PropertymappingsApiService) PropertymappingsSamlUsedByListExecute(r Api return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -3986,6 +4037,7 @@ func (a *PropertymappingsApiService) PropertymappingsSamlUsedByListExecute(r Api newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -3996,6 +4048,7 @@ func (a *PropertymappingsApiService) PropertymappingsSamlUsedByListExecute(r Api newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -4110,9 +4163,9 @@ func (a *PropertymappingsApiService) PropertymappingsScimCreateExecute(r ApiProp return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -4129,6 +4182,7 @@ func (a *PropertymappingsApiService) PropertymappingsScimCreateExecute(r ApiProp newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -4139,6 +4193,7 @@ func (a *PropertymappingsApiService) PropertymappingsScimCreateExecute(r ApiProp newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -4197,7 +4252,7 @@ func (a *PropertymappingsApiService) PropertymappingsScimDestroyExecute(r ApiPro } localVarPath := localBasePath + "/propertymappings/scim/{pm_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterToString(r.pmUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterValueToString(r.pmUuid, "pmUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -4244,9 +4299,9 @@ func (a *PropertymappingsApiService) PropertymappingsScimDestroyExecute(r ApiPro return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -4263,6 +4318,7 @@ func (a *PropertymappingsApiService) PropertymappingsScimDestroyExecute(r ApiPro newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -4273,6 +4329,7 @@ func (a *PropertymappingsApiService) PropertymappingsScimDestroyExecute(r ApiPro newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -4379,36 +4436,36 @@ func (a *PropertymappingsApiService) PropertymappingsScimListExecute(r ApiProper localVarFormParams := url.Values{} if r.expression != nil { - localVarQueryParams.Add("expression", parameterToString(*r.expression, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "expression", r.expression, "") } if r.managed != nil { t := *r.managed if reflect.TypeOf(t).Kind() == reflect.Slice { s := reflect.ValueOf(t) for i := 0; i < s.Len(); i++ { - localVarQueryParams.Add("managed", parameterToString(s.Index(i), "multi")) + parameterAddToHeaderOrQuery(localVarQueryParams, "managed", s.Index(i), "multi") } } else { - localVarQueryParams.Add("managed", parameterToString(t, "multi")) + parameterAddToHeaderOrQuery(localVarQueryParams, "managed", t, "multi") } } if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.pmUuid != nil { - localVarQueryParams.Add("pm_uuid", parameterToString(*r.pmUuid, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "pm_uuid", r.pmUuid, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -4451,9 +4508,9 @@ func (a *PropertymappingsApiService) PropertymappingsScimListExecute(r ApiProper return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -4470,6 +4527,7 @@ func (a *PropertymappingsApiService) PropertymappingsScimListExecute(r ApiProper newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -4480,6 +4538,7 @@ func (a *PropertymappingsApiService) PropertymappingsScimListExecute(r ApiProper newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -4546,7 +4605,7 @@ func (a *PropertymappingsApiService) PropertymappingsScimPartialUpdateExecute(r } localVarPath := localBasePath + "/propertymappings/scim/{pm_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterToString(r.pmUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterValueToString(r.pmUuid, "pmUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -4595,9 +4654,9 @@ func (a *PropertymappingsApiService) PropertymappingsScimPartialUpdateExecute(r return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -4614,6 +4673,7 @@ func (a *PropertymappingsApiService) PropertymappingsScimPartialUpdateExecute(r newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -4624,6 +4684,7 @@ func (a *PropertymappingsApiService) PropertymappingsScimPartialUpdateExecute(r newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -4684,7 +4745,7 @@ func (a *PropertymappingsApiService) PropertymappingsScimRetrieveExecute(r ApiPr } localVarPath := localBasePath + "/propertymappings/scim/{pm_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterToString(r.pmUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterValueToString(r.pmUuid, "pmUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -4731,9 +4792,9 @@ func (a *PropertymappingsApiService) PropertymappingsScimRetrieveExecute(r ApiPr return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -4750,6 +4811,7 @@ func (a *PropertymappingsApiService) PropertymappingsScimRetrieveExecute(r ApiPr newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -4760,6 +4822,7 @@ func (a *PropertymappingsApiService) PropertymappingsScimRetrieveExecute(r ApiPr newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -4826,7 +4889,7 @@ func (a *PropertymappingsApiService) PropertymappingsScimUpdateExecute(r ApiProp } localVarPath := localBasePath + "/propertymappings/scim/{pm_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterToString(r.pmUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterValueToString(r.pmUuid, "pmUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -4878,9 +4941,9 @@ func (a *PropertymappingsApiService) PropertymappingsScimUpdateExecute(r ApiProp return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -4897,6 +4960,7 @@ func (a *PropertymappingsApiService) PropertymappingsScimUpdateExecute(r ApiProp newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -4907,6 +4971,7 @@ func (a *PropertymappingsApiService) PropertymappingsScimUpdateExecute(r ApiProp newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -4967,7 +5032,7 @@ func (a *PropertymappingsApiService) PropertymappingsScimUsedByListExecute(r Api } localVarPath := localBasePath + "/propertymappings/scim/{pm_uuid}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterToString(r.pmUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterValueToString(r.pmUuid, "pmUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -5014,9 +5079,9 @@ func (a *PropertymappingsApiService) PropertymappingsScimUsedByListExecute(r Api return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -5033,6 +5098,7 @@ func (a *PropertymappingsApiService) PropertymappingsScimUsedByListExecute(r Api newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -5043,6 +5109,7 @@ func (a *PropertymappingsApiService) PropertymappingsScimUsedByListExecute(r Api newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -5157,9 +5224,9 @@ func (a *PropertymappingsApiService) PropertymappingsScopeCreateExecute(r ApiPro return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -5176,6 +5243,7 @@ func (a *PropertymappingsApiService) PropertymappingsScopeCreateExecute(r ApiPro newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -5186,6 +5254,7 @@ func (a *PropertymappingsApiService) PropertymappingsScopeCreateExecute(r ApiPro newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -5244,7 +5313,7 @@ func (a *PropertymappingsApiService) PropertymappingsScopeDestroyExecute(r ApiPr } localVarPath := localBasePath + "/propertymappings/scope/{pm_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterToString(r.pmUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterValueToString(r.pmUuid, "pmUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -5291,9 +5360,9 @@ func (a *PropertymappingsApiService) PropertymappingsScopeDestroyExecute(r ApiPr return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -5310,6 +5379,7 @@ func (a *PropertymappingsApiService) PropertymappingsScopeDestroyExecute(r ApiPr newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -5320,6 +5390,7 @@ func (a *PropertymappingsApiService) PropertymappingsScopeDestroyExecute(r ApiPr newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -5424,29 +5495,29 @@ func (a *PropertymappingsApiService) PropertymappingsScopeListExecute(r ApiPrope if reflect.TypeOf(t).Kind() == reflect.Slice { s := reflect.ValueOf(t) for i := 0; i < s.Len(); i++ { - localVarQueryParams.Add("managed", parameterToString(s.Index(i), "multi")) + parameterAddToHeaderOrQuery(localVarQueryParams, "managed", s.Index(i), "multi") } } else { - localVarQueryParams.Add("managed", parameterToString(t, "multi")) + parameterAddToHeaderOrQuery(localVarQueryParams, "managed", t, "multi") } } if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.scopeName != nil { - localVarQueryParams.Add("scope_name", parameterToString(*r.scopeName, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "scope_name", r.scopeName, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -5489,9 +5560,9 @@ func (a *PropertymappingsApiService) PropertymappingsScopeListExecute(r ApiPrope return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -5508,6 +5579,7 @@ func (a *PropertymappingsApiService) PropertymappingsScopeListExecute(r ApiPrope newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -5518,6 +5590,7 @@ func (a *PropertymappingsApiService) PropertymappingsScopeListExecute(r ApiPrope newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -5584,7 +5657,7 @@ func (a *PropertymappingsApiService) PropertymappingsScopePartialUpdateExecute(r } localVarPath := localBasePath + "/propertymappings/scope/{pm_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterToString(r.pmUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterValueToString(r.pmUuid, "pmUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -5633,9 +5706,9 @@ func (a *PropertymappingsApiService) PropertymappingsScopePartialUpdateExecute(r return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -5652,6 +5725,7 @@ func (a *PropertymappingsApiService) PropertymappingsScopePartialUpdateExecute(r newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -5662,6 +5736,7 @@ func (a *PropertymappingsApiService) PropertymappingsScopePartialUpdateExecute(r newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -5722,7 +5797,7 @@ func (a *PropertymappingsApiService) PropertymappingsScopeRetrieveExecute(r ApiP } localVarPath := localBasePath + "/propertymappings/scope/{pm_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterToString(r.pmUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterValueToString(r.pmUuid, "pmUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -5769,9 +5844,9 @@ func (a *PropertymappingsApiService) PropertymappingsScopeRetrieveExecute(r ApiP return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -5788,6 +5863,7 @@ func (a *PropertymappingsApiService) PropertymappingsScopeRetrieveExecute(r ApiP newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -5798,6 +5874,7 @@ func (a *PropertymappingsApiService) PropertymappingsScopeRetrieveExecute(r ApiP newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -5864,7 +5941,7 @@ func (a *PropertymappingsApiService) PropertymappingsScopeUpdateExecute(r ApiPro } localVarPath := localBasePath + "/propertymappings/scope/{pm_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterToString(r.pmUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterValueToString(r.pmUuid, "pmUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -5916,9 +5993,9 @@ func (a *PropertymappingsApiService) PropertymappingsScopeUpdateExecute(r ApiPro return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -5935,6 +6012,7 @@ func (a *PropertymappingsApiService) PropertymappingsScopeUpdateExecute(r ApiPro newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -5945,6 +6023,7 @@ func (a *PropertymappingsApiService) PropertymappingsScopeUpdateExecute(r ApiPro newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -6005,7 +6084,7 @@ func (a *PropertymappingsApiService) PropertymappingsScopeUsedByListExecute(r Ap } localVarPath := localBasePath + "/propertymappings/scope/{pm_uuid}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterToString(r.pmUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"pm_uuid"+"}", url.PathEscape(parameterValueToString(r.pmUuid, "pmUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -6052,9 +6131,9 @@ func (a *PropertymappingsApiService) PropertymappingsScopeUsedByListExecute(r Ap return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -6071,6 +6150,7 @@ func (a *PropertymappingsApiService) PropertymappingsScopeUsedByListExecute(r Ap newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -6081,6 +6161,7 @@ func (a *PropertymappingsApiService) PropertymappingsScopeUsedByListExecute(r Ap newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr diff --git a/api_providers.go b/api_providers.go index 2297c462a..13beac28d 100644 --- a/api_providers.go +++ b/api_providers.go @@ -14,7 +14,7 @@ package api import ( "bytes" "context" - "io/ioutil" + "io" "net/http" "net/url" "os" @@ -66,7 +66,7 @@ func (a *ProvidersApiService) ProvidersAllDestroyExecute(r ApiProvidersAllDestro } localVarPath := localBasePath + "/providers/all/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -113,9 +113,9 @@ func (a *ProvidersApiService) ProvidersAllDestroyExecute(r ApiProvidersAllDestro return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -132,6 +132,7 @@ func (a *ProvidersApiService) ProvidersAllDestroyExecute(r ApiProvidersAllDestro newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -142,6 +143,7 @@ func (a *ProvidersApiService) ProvidersAllDestroyExecute(r ApiProvidersAllDestro newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -230,19 +232,19 @@ func (a *ProvidersApiService) ProvidersAllListExecute(r ApiProvidersAllListReque localVarFormParams := url.Values{} if r.applicationIsnull != nil { - localVarQueryParams.Add("application__isnull", parameterToString(*r.applicationIsnull, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "application__isnull", r.applicationIsnull, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -285,9 +287,9 @@ func (a *ProvidersApiService) ProvidersAllListExecute(r ApiProvidersAllListReque return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -304,6 +306,7 @@ func (a *ProvidersApiService) ProvidersAllListExecute(r ApiProvidersAllListReque newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -314,6 +317,7 @@ func (a *ProvidersApiService) ProvidersAllListExecute(r ApiProvidersAllListReque newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -374,7 +378,7 @@ func (a *ProvidersApiService) ProvidersAllRetrieveExecute(r ApiProvidersAllRetri } localVarPath := localBasePath + "/providers/all/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -421,9 +425,9 @@ func (a *ProvidersApiService) ProvidersAllRetrieveExecute(r ApiProvidersAllRetri return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -440,6 +444,7 @@ func (a *ProvidersApiService) ProvidersAllRetrieveExecute(r ApiProvidersAllRetri newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -450,6 +455,7 @@ func (a *ProvidersApiService) ProvidersAllRetrieveExecute(r ApiProvidersAllRetri newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -553,9 +559,9 @@ func (a *ProvidersApiService) ProvidersAllTypesListExecute(r ApiProvidersAllType return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -572,6 +578,7 @@ func (a *ProvidersApiService) ProvidersAllTypesListExecute(r ApiProvidersAllType newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -582,6 +589,7 @@ func (a *ProvidersApiService) ProvidersAllTypesListExecute(r ApiProvidersAllType newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -642,7 +650,7 @@ func (a *ProvidersApiService) ProvidersAllUsedByListExecute(r ApiProvidersAllUse } localVarPath := localBasePath + "/providers/all/{id}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -689,9 +697,9 @@ func (a *ProvidersApiService) ProvidersAllUsedByListExecute(r ApiProvidersAllUse return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -708,6 +716,7 @@ func (a *ProvidersApiService) ProvidersAllUsedByListExecute(r ApiProvidersAllUse newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -718,6 +727,7 @@ func (a *ProvidersApiService) ProvidersAllUsedByListExecute(r ApiProvidersAllUse newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -832,9 +842,9 @@ func (a *ProvidersApiService) ProvidersLdapCreateExecute(r ApiProvidersLdapCreat return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -851,6 +861,7 @@ func (a *ProvidersApiService) ProvidersLdapCreateExecute(r ApiProvidersLdapCreat newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -861,6 +872,7 @@ func (a *ProvidersApiService) ProvidersLdapCreateExecute(r ApiProvidersLdapCreat newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -919,7 +931,7 @@ func (a *ProvidersApiService) ProvidersLdapDestroyExecute(r ApiProvidersLdapDest } localVarPath := localBasePath + "/providers/ldap/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -966,9 +978,9 @@ func (a *ProvidersApiService) ProvidersLdapDestroyExecute(r ApiProvidersLdapDest return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -985,6 +997,7 @@ func (a *ProvidersApiService) ProvidersLdapDestroyExecute(r ApiProvidersLdapDest newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -995,6 +1008,7 @@ func (a *ProvidersApiService) ProvidersLdapDestroyExecute(r ApiProvidersLdapDest newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -1143,49 +1157,49 @@ func (a *ProvidersApiService) ProvidersLdapListExecute(r ApiProvidersLdapListReq localVarFormParams := url.Values{} if r.applicationIsnull != nil { - localVarQueryParams.Add("application__isnull", parameterToString(*r.applicationIsnull, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "application__isnull", r.applicationIsnull, "") } if r.authorizationFlowSlugIexact != nil { - localVarQueryParams.Add("authorization_flow__slug__iexact", parameterToString(*r.authorizationFlowSlugIexact, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "authorization_flow__slug__iexact", r.authorizationFlowSlugIexact, "") } if r.baseDnIexact != nil { - localVarQueryParams.Add("base_dn__iexact", parameterToString(*r.baseDnIexact, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "base_dn__iexact", r.baseDnIexact, "") } if r.certificateKpUuidIexact != nil { - localVarQueryParams.Add("certificate__kp_uuid__iexact", parameterToString(*r.certificateKpUuidIexact, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "certificate__kp_uuid__iexact", r.certificateKpUuidIexact, "") } if r.certificateNameIexact != nil { - localVarQueryParams.Add("certificate__name__iexact", parameterToString(*r.certificateNameIexact, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "certificate__name__iexact", r.certificateNameIexact, "") } if r.gidStartNumberIexact != nil { - localVarQueryParams.Add("gid_start_number__iexact", parameterToString(*r.gidStartNumberIexact, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "gid_start_number__iexact", r.gidStartNumberIexact, "") } if r.nameIexact != nil { - localVarQueryParams.Add("name__iexact", parameterToString(*r.nameIexact, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name__iexact", r.nameIexact, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } if r.searchGroupGroupUuidIexact != nil { - localVarQueryParams.Add("search_group__group_uuid__iexact", parameterToString(*r.searchGroupGroupUuidIexact, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search_group__group_uuid__iexact", r.searchGroupGroupUuidIexact, "") } if r.searchGroupNameIexact != nil { - localVarQueryParams.Add("search_group__name__iexact", parameterToString(*r.searchGroupNameIexact, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search_group__name__iexact", r.searchGroupNameIexact, "") } if r.tlsServerNameIexact != nil { - localVarQueryParams.Add("tls_server_name__iexact", parameterToString(*r.tlsServerNameIexact, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "tls_server_name__iexact", r.tlsServerNameIexact, "") } if r.uidStartNumberIexact != nil { - localVarQueryParams.Add("uid_start_number__iexact", parameterToString(*r.uidStartNumberIexact, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "uid_start_number__iexact", r.uidStartNumberIexact, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1228,9 +1242,9 @@ func (a *ProvidersApiService) ProvidersLdapListExecute(r ApiProvidersLdapListReq return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1247,6 +1261,7 @@ func (a *ProvidersApiService) ProvidersLdapListExecute(r ApiProvidersLdapListReq newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1257,6 +1272,7 @@ func (a *ProvidersApiService) ProvidersLdapListExecute(r ApiProvidersLdapListReq newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1323,7 +1339,7 @@ func (a *ProvidersApiService) ProvidersLdapPartialUpdateExecute(r ApiProvidersLd } localVarPath := localBasePath + "/providers/ldap/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1372,9 +1388,9 @@ func (a *ProvidersApiService) ProvidersLdapPartialUpdateExecute(r ApiProvidersLd return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1391,6 +1407,7 @@ func (a *ProvidersApiService) ProvidersLdapPartialUpdateExecute(r ApiProvidersLd newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1401,6 +1418,7 @@ func (a *ProvidersApiService) ProvidersLdapPartialUpdateExecute(r ApiProvidersLd newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1461,7 +1479,7 @@ func (a *ProvidersApiService) ProvidersLdapRetrieveExecute(r ApiProvidersLdapRet } localVarPath := localBasePath + "/providers/ldap/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1508,9 +1526,9 @@ func (a *ProvidersApiService) ProvidersLdapRetrieveExecute(r ApiProvidersLdapRet return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1527,6 +1545,7 @@ func (a *ProvidersApiService) ProvidersLdapRetrieveExecute(r ApiProvidersLdapRet newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1537,6 +1556,7 @@ func (a *ProvidersApiService) ProvidersLdapRetrieveExecute(r ApiProvidersLdapRet newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1603,7 +1623,7 @@ func (a *ProvidersApiService) ProvidersLdapUpdateExecute(r ApiProvidersLdapUpdat } localVarPath := localBasePath + "/providers/ldap/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1655,9 +1675,9 @@ func (a *ProvidersApiService) ProvidersLdapUpdateExecute(r ApiProvidersLdapUpdat return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1674,6 +1694,7 @@ func (a *ProvidersApiService) ProvidersLdapUpdateExecute(r ApiProvidersLdapUpdat newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1684,6 +1705,7 @@ func (a *ProvidersApiService) ProvidersLdapUpdateExecute(r ApiProvidersLdapUpdat newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1744,7 +1766,7 @@ func (a *ProvidersApiService) ProvidersLdapUsedByListExecute(r ApiProvidersLdapU } localVarPath := localBasePath + "/providers/ldap/{id}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1791,9 +1813,9 @@ func (a *ProvidersApiService) ProvidersLdapUsedByListExecute(r ApiProvidersLdapU return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1810,6 +1832,7 @@ func (a *ProvidersApiService) ProvidersLdapUsedByListExecute(r ApiProvidersLdapU newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1820,6 +1843,7 @@ func (a *ProvidersApiService) ProvidersLdapUsedByListExecute(r ApiProvidersLdapU newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1934,9 +1958,9 @@ func (a *ProvidersApiService) ProvidersOauth2CreateExecute(r ApiProvidersOauth2C return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1953,6 +1977,7 @@ func (a *ProvidersApiService) ProvidersOauth2CreateExecute(r ApiProvidersOauth2C newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1963,6 +1988,7 @@ func (a *ProvidersApiService) ProvidersOauth2CreateExecute(r ApiProvidersOauth2C newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2021,7 +2047,7 @@ func (a *ProvidersApiService) ProvidersOauth2DestroyExecute(r ApiProvidersOauth2 } localVarPath := localBasePath + "/providers/oauth2/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2068,9 +2094,9 @@ func (a *ProvidersApiService) ProvidersOauth2DestroyExecute(r ApiProvidersOauth2 return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -2087,6 +2113,7 @@ func (a *ProvidersApiService) ProvidersOauth2DestroyExecute(r ApiProvidersOauth2 newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -2097,6 +2124,7 @@ func (a *ProvidersApiService) ProvidersOauth2DestroyExecute(r ApiProvidersOauth2 newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -2266,66 +2294,66 @@ func (a *ProvidersApiService) ProvidersOauth2ListExecute(r ApiProvidersOauth2Lis localVarFormParams := url.Values{} if r.accessCodeValidity != nil { - localVarQueryParams.Add("access_code_validity", parameterToString(*r.accessCodeValidity, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "access_code_validity", r.accessCodeValidity, "") } if r.accessTokenValidity != nil { - localVarQueryParams.Add("access_token_validity", parameterToString(*r.accessTokenValidity, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "access_token_validity", r.accessTokenValidity, "") } if r.application != nil { - localVarQueryParams.Add("application", parameterToString(*r.application, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "application", r.application, "") } if r.authorizationFlow != nil { - localVarQueryParams.Add("authorization_flow", parameterToString(*r.authorizationFlow, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "authorization_flow", r.authorizationFlow, "") } if r.clientId != nil { - localVarQueryParams.Add("client_id", parameterToString(*r.clientId, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "client_id", r.clientId, "") } if r.clientType != nil { - localVarQueryParams.Add("client_type", parameterToString(*r.clientType, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "client_type", r.clientType, "") } if r.includeClaimsInIdToken != nil { - localVarQueryParams.Add("include_claims_in_id_token", parameterToString(*r.includeClaimsInIdToken, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "include_claims_in_id_token", r.includeClaimsInIdToken, "") } if r.issuerMode != nil { - localVarQueryParams.Add("issuer_mode", parameterToString(*r.issuerMode, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "issuer_mode", r.issuerMode, "") } if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.propertyMappings != nil { t := *r.propertyMappings if reflect.TypeOf(t).Kind() == reflect.Slice { s := reflect.ValueOf(t) for i := 0; i < s.Len(); i++ { - localVarQueryParams.Add("property_mappings", parameterToString(s.Index(i), "multi")) + parameterAddToHeaderOrQuery(localVarQueryParams, "property_mappings", s.Index(i), "multi") } } else { - localVarQueryParams.Add("property_mappings", parameterToString(t, "multi")) + parameterAddToHeaderOrQuery(localVarQueryParams, "property_mappings", t, "multi") } } if r.redirectUris != nil { - localVarQueryParams.Add("redirect_uris", parameterToString(*r.redirectUris, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "redirect_uris", r.redirectUris, "") } if r.refreshTokenValidity != nil { - localVarQueryParams.Add("refresh_token_validity", parameterToString(*r.refreshTokenValidity, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "refresh_token_validity", r.refreshTokenValidity, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } if r.signingKey != nil { - localVarQueryParams.Add("signing_key", parameterToString(*r.signingKey, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "signing_key", r.signingKey, "") } if r.subMode != nil { - localVarQueryParams.Add("sub_mode", parameterToString(*r.subMode, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "sub_mode", r.subMode, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -2368,9 +2396,9 @@ func (a *ProvidersApiService) ProvidersOauth2ListExecute(r ApiProvidersOauth2Lis return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2387,6 +2415,7 @@ func (a *ProvidersApiService) ProvidersOauth2ListExecute(r ApiProvidersOauth2Lis newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2397,6 +2426,7 @@ func (a *ProvidersApiService) ProvidersOauth2ListExecute(r ApiProvidersOauth2Lis newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2463,7 +2493,7 @@ func (a *ProvidersApiService) ProvidersOauth2PartialUpdateExecute(r ApiProviders } localVarPath := localBasePath + "/providers/oauth2/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2512,9 +2542,9 @@ func (a *ProvidersApiService) ProvidersOauth2PartialUpdateExecute(r ApiProviders return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2531,6 +2561,7 @@ func (a *ProvidersApiService) ProvidersOauth2PartialUpdateExecute(r ApiProviders newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2541,6 +2572,7 @@ func (a *ProvidersApiService) ProvidersOauth2PartialUpdateExecute(r ApiProviders newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2601,7 +2633,7 @@ func (a *ProvidersApiService) ProvidersOauth2PreviewUserRetrieveExecute(r ApiPro } localVarPath := localBasePath + "/providers/oauth2/{id}/preview_user/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2648,9 +2680,9 @@ func (a *ProvidersApiService) ProvidersOauth2PreviewUserRetrieveExecute(r ApiPro return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2667,6 +2699,7 @@ func (a *ProvidersApiService) ProvidersOauth2PreviewUserRetrieveExecute(r ApiPro newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2727,7 +2760,7 @@ func (a *ProvidersApiService) ProvidersOauth2RetrieveExecute(r ApiProvidersOauth } localVarPath := localBasePath + "/providers/oauth2/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2774,9 +2807,9 @@ func (a *ProvidersApiService) ProvidersOauth2RetrieveExecute(r ApiProvidersOauth return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2793,6 +2826,7 @@ func (a *ProvidersApiService) ProvidersOauth2RetrieveExecute(r ApiProvidersOauth newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2803,6 +2837,7 @@ func (a *ProvidersApiService) ProvidersOauth2RetrieveExecute(r ApiProvidersOauth newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2863,7 +2898,7 @@ func (a *ProvidersApiService) ProvidersOauth2SetupUrlsRetrieveExecute(r ApiProvi } localVarPath := localBasePath + "/providers/oauth2/{id}/setup_urls/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2910,9 +2945,9 @@ func (a *ProvidersApiService) ProvidersOauth2SetupUrlsRetrieveExecute(r ApiProvi return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2929,6 +2964,7 @@ func (a *ProvidersApiService) ProvidersOauth2SetupUrlsRetrieveExecute(r ApiProvi newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2939,6 +2975,7 @@ func (a *ProvidersApiService) ProvidersOauth2SetupUrlsRetrieveExecute(r ApiProvi newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3005,7 +3042,7 @@ func (a *ProvidersApiService) ProvidersOauth2UpdateExecute(r ApiProvidersOauth2U } localVarPath := localBasePath + "/providers/oauth2/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -3057,9 +3094,9 @@ func (a *ProvidersApiService) ProvidersOauth2UpdateExecute(r ApiProvidersOauth2U return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -3076,6 +3113,7 @@ func (a *ProvidersApiService) ProvidersOauth2UpdateExecute(r ApiProvidersOauth2U newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -3086,6 +3124,7 @@ func (a *ProvidersApiService) ProvidersOauth2UpdateExecute(r ApiProvidersOauth2U newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3146,7 +3185,7 @@ func (a *ProvidersApiService) ProvidersOauth2UsedByListExecute(r ApiProvidersOau } localVarPath := localBasePath + "/providers/oauth2/{id}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -3193,9 +3232,9 @@ func (a *ProvidersApiService) ProvidersOauth2UsedByListExecute(r ApiProvidersOau return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -3212,6 +3251,7 @@ func (a *ProvidersApiService) ProvidersOauth2UsedByListExecute(r ApiProvidersOau newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -3222,6 +3262,7 @@ func (a *ProvidersApiService) ProvidersOauth2UsedByListExecute(r ApiProvidersOau newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3336,9 +3377,9 @@ func (a *ProvidersApiService) ProvidersProxyCreateExecute(r ApiProvidersProxyCre return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -3355,6 +3396,7 @@ func (a *ProvidersApiService) ProvidersProxyCreateExecute(r ApiProvidersProxyCre newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -3365,6 +3407,7 @@ func (a *ProvidersApiService) ProvidersProxyCreateExecute(r ApiProvidersProxyCre newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3423,7 +3466,7 @@ func (a *ProvidersApiService) ProvidersProxyDestroyExecute(r ApiProvidersProxyDe } localVarPath := localBasePath + "/providers/proxy/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -3470,9 +3513,9 @@ func (a *ProvidersApiService) ProvidersProxyDestroyExecute(r ApiProvidersProxyDe return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -3489,6 +3532,7 @@ func (a *ProvidersApiService) ProvidersProxyDestroyExecute(r ApiProvidersProxyDe newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -3499,6 +3543,7 @@ func (a *ProvidersApiService) ProvidersProxyDestroyExecute(r ApiProvidersProxyDe newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -3677,72 +3722,72 @@ func (a *ProvidersApiService) ProvidersProxyListExecute(r ApiProvidersProxyListR localVarFormParams := url.Values{} if r.applicationIsnull != nil { - localVarQueryParams.Add("application__isnull", parameterToString(*r.applicationIsnull, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "application__isnull", r.applicationIsnull, "") } if r.authorizationFlowSlugIexact != nil { - localVarQueryParams.Add("authorization_flow__slug__iexact", parameterToString(*r.authorizationFlowSlugIexact, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "authorization_flow__slug__iexact", r.authorizationFlowSlugIexact, "") } if r.basicAuthEnabledIexact != nil { - localVarQueryParams.Add("basic_auth_enabled__iexact", parameterToString(*r.basicAuthEnabledIexact, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "basic_auth_enabled__iexact", r.basicAuthEnabledIexact, "") } if r.basicAuthPasswordAttributeIexact != nil { - localVarQueryParams.Add("basic_auth_password_attribute__iexact", parameterToString(*r.basicAuthPasswordAttributeIexact, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "basic_auth_password_attribute__iexact", r.basicAuthPasswordAttributeIexact, "") } if r.basicAuthUserAttributeIexact != nil { - localVarQueryParams.Add("basic_auth_user_attribute__iexact", parameterToString(*r.basicAuthUserAttributeIexact, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "basic_auth_user_attribute__iexact", r.basicAuthUserAttributeIexact, "") } if r.certificateKpUuidIexact != nil { - localVarQueryParams.Add("certificate__kp_uuid__iexact", parameterToString(*r.certificateKpUuidIexact, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "certificate__kp_uuid__iexact", r.certificateKpUuidIexact, "") } if r.certificateNameIexact != nil { - localVarQueryParams.Add("certificate__name__iexact", parameterToString(*r.certificateNameIexact, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "certificate__name__iexact", r.certificateNameIexact, "") } if r.cookieDomainIexact != nil { - localVarQueryParams.Add("cookie_domain__iexact", parameterToString(*r.cookieDomainIexact, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "cookie_domain__iexact", r.cookieDomainIexact, "") } if r.externalHostIexact != nil { - localVarQueryParams.Add("external_host__iexact", parameterToString(*r.externalHostIexact, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "external_host__iexact", r.externalHostIexact, "") } if r.internalHostIexact != nil { - localVarQueryParams.Add("internal_host__iexact", parameterToString(*r.internalHostIexact, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "internal_host__iexact", r.internalHostIexact, "") } if r.internalHostSslValidationIexact != nil { - localVarQueryParams.Add("internal_host_ssl_validation__iexact", parameterToString(*r.internalHostSslValidationIexact, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "internal_host_ssl_validation__iexact", r.internalHostSslValidationIexact, "") } if r.modeIexact != nil { - localVarQueryParams.Add("mode__iexact", parameterToString(*r.modeIexact, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "mode__iexact", r.modeIexact, "") } if r.nameIexact != nil { - localVarQueryParams.Add("name__iexact", parameterToString(*r.nameIexact, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name__iexact", r.nameIexact, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.propertyMappingsIexact != nil { t := *r.propertyMappingsIexact if reflect.TypeOf(t).Kind() == reflect.Slice { s := reflect.ValueOf(t) for i := 0; i < s.Len(); i++ { - localVarQueryParams.Add("property_mappings__iexact", parameterToString(s.Index(i), "multi")) + parameterAddToHeaderOrQuery(localVarQueryParams, "property_mappings__iexact", s.Index(i), "multi") } } else { - localVarQueryParams.Add("property_mappings__iexact", parameterToString(t, "multi")) + parameterAddToHeaderOrQuery(localVarQueryParams, "property_mappings__iexact", t, "multi") } } if r.redirectUrisIexact != nil { - localVarQueryParams.Add("redirect_uris__iexact", parameterToString(*r.redirectUrisIexact, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "redirect_uris__iexact", r.redirectUrisIexact, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } if r.skipPathRegexIexact != nil { - localVarQueryParams.Add("skip_path_regex__iexact", parameterToString(*r.skipPathRegexIexact, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "skip_path_regex__iexact", r.skipPathRegexIexact, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -3785,9 +3830,9 @@ func (a *ProvidersApiService) ProvidersProxyListExecute(r ApiProvidersProxyListR return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -3804,6 +3849,7 @@ func (a *ProvidersApiService) ProvidersProxyListExecute(r ApiProvidersProxyListR newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -3814,6 +3860,7 @@ func (a *ProvidersApiService) ProvidersProxyListExecute(r ApiProvidersProxyListR newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3880,7 +3927,7 @@ func (a *ProvidersApiService) ProvidersProxyPartialUpdateExecute(r ApiProvidersP } localVarPath := localBasePath + "/providers/proxy/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -3929,9 +3976,9 @@ func (a *ProvidersApiService) ProvidersProxyPartialUpdateExecute(r ApiProvidersP return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -3948,6 +3995,7 @@ func (a *ProvidersApiService) ProvidersProxyPartialUpdateExecute(r ApiProvidersP newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -3958,6 +4006,7 @@ func (a *ProvidersApiService) ProvidersProxyPartialUpdateExecute(r ApiProvidersP newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -4018,7 +4067,7 @@ func (a *ProvidersApiService) ProvidersProxyRetrieveExecute(r ApiProvidersProxyR } localVarPath := localBasePath + "/providers/proxy/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -4065,9 +4114,9 @@ func (a *ProvidersApiService) ProvidersProxyRetrieveExecute(r ApiProvidersProxyR return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -4084,6 +4133,7 @@ func (a *ProvidersApiService) ProvidersProxyRetrieveExecute(r ApiProvidersProxyR newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -4094,6 +4144,7 @@ func (a *ProvidersApiService) ProvidersProxyRetrieveExecute(r ApiProvidersProxyR newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -4160,7 +4211,7 @@ func (a *ProvidersApiService) ProvidersProxyUpdateExecute(r ApiProvidersProxyUpd } localVarPath := localBasePath + "/providers/proxy/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -4212,9 +4263,9 @@ func (a *ProvidersApiService) ProvidersProxyUpdateExecute(r ApiProvidersProxyUpd return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -4231,6 +4282,7 @@ func (a *ProvidersApiService) ProvidersProxyUpdateExecute(r ApiProvidersProxyUpd newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -4241,6 +4293,7 @@ func (a *ProvidersApiService) ProvidersProxyUpdateExecute(r ApiProvidersProxyUpd newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -4301,7 +4354,7 @@ func (a *ProvidersApiService) ProvidersProxyUsedByListExecute(r ApiProvidersProx } localVarPath := localBasePath + "/providers/proxy/{id}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -4348,9 +4401,9 @@ func (a *ProvidersApiService) ProvidersProxyUsedByListExecute(r ApiProvidersProx return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -4367,6 +4420,7 @@ func (a *ProvidersApiService) ProvidersProxyUsedByListExecute(r ApiProvidersProx newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -4377,6 +4431,7 @@ func (a *ProvidersApiService) ProvidersProxyUsedByListExecute(r ApiProvidersProx newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -4491,9 +4546,9 @@ func (a *ProvidersApiService) ProvidersRadiusCreateExecute(r ApiProvidersRadiusC return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -4510,6 +4565,7 @@ func (a *ProvidersApiService) ProvidersRadiusCreateExecute(r ApiProvidersRadiusC newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -4520,6 +4576,7 @@ func (a *ProvidersApiService) ProvidersRadiusCreateExecute(r ApiProvidersRadiusC newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -4578,7 +4635,7 @@ func (a *ProvidersApiService) ProvidersRadiusDestroyExecute(r ApiProvidersRadius } localVarPath := localBasePath + "/providers/radius/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -4625,9 +4682,9 @@ func (a *ProvidersApiService) ProvidersRadiusDestroyExecute(r ApiProvidersRadius return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -4644,6 +4701,7 @@ func (a *ProvidersApiService) ProvidersRadiusDestroyExecute(r ApiProvidersRadius newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -4654,6 +4712,7 @@ func (a *ProvidersApiService) ProvidersRadiusDestroyExecute(r ApiProvidersRadius newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -4760,28 +4819,28 @@ func (a *ProvidersApiService) ProvidersRadiusListExecute(r ApiProvidersRadiusLis localVarFormParams := url.Values{} if r.applicationIsnull != nil { - localVarQueryParams.Add("application__isnull", parameterToString(*r.applicationIsnull, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "application__isnull", r.applicationIsnull, "") } if r.authorizationFlowSlugIexact != nil { - localVarQueryParams.Add("authorization_flow__slug__iexact", parameterToString(*r.authorizationFlowSlugIexact, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "authorization_flow__slug__iexact", r.authorizationFlowSlugIexact, "") } if r.clientNetworksIexact != nil { - localVarQueryParams.Add("client_networks__iexact", parameterToString(*r.clientNetworksIexact, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "client_networks__iexact", r.clientNetworksIexact, "") } if r.nameIexact != nil { - localVarQueryParams.Add("name__iexact", parameterToString(*r.nameIexact, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name__iexact", r.nameIexact, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -4824,9 +4883,9 @@ func (a *ProvidersApiService) ProvidersRadiusListExecute(r ApiProvidersRadiusLis return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -4843,6 +4902,7 @@ func (a *ProvidersApiService) ProvidersRadiusListExecute(r ApiProvidersRadiusLis newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -4853,6 +4913,7 @@ func (a *ProvidersApiService) ProvidersRadiusListExecute(r ApiProvidersRadiusLis newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -4919,7 +4980,7 @@ func (a *ProvidersApiService) ProvidersRadiusPartialUpdateExecute(r ApiProviders } localVarPath := localBasePath + "/providers/radius/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -4968,9 +5029,9 @@ func (a *ProvidersApiService) ProvidersRadiusPartialUpdateExecute(r ApiProviders return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -4987,6 +5048,7 @@ func (a *ProvidersApiService) ProvidersRadiusPartialUpdateExecute(r ApiProviders newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -4997,6 +5059,7 @@ func (a *ProvidersApiService) ProvidersRadiusPartialUpdateExecute(r ApiProviders newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -5057,7 +5120,7 @@ func (a *ProvidersApiService) ProvidersRadiusRetrieveExecute(r ApiProvidersRadiu } localVarPath := localBasePath + "/providers/radius/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -5104,9 +5167,9 @@ func (a *ProvidersApiService) ProvidersRadiusRetrieveExecute(r ApiProvidersRadiu return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -5123,6 +5186,7 @@ func (a *ProvidersApiService) ProvidersRadiusRetrieveExecute(r ApiProvidersRadiu newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -5133,6 +5197,7 @@ func (a *ProvidersApiService) ProvidersRadiusRetrieveExecute(r ApiProvidersRadiu newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -5199,7 +5264,7 @@ func (a *ProvidersApiService) ProvidersRadiusUpdateExecute(r ApiProvidersRadiusU } localVarPath := localBasePath + "/providers/radius/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -5251,9 +5316,9 @@ func (a *ProvidersApiService) ProvidersRadiusUpdateExecute(r ApiProvidersRadiusU return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -5270,6 +5335,7 @@ func (a *ProvidersApiService) ProvidersRadiusUpdateExecute(r ApiProvidersRadiusU newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -5280,6 +5346,7 @@ func (a *ProvidersApiService) ProvidersRadiusUpdateExecute(r ApiProvidersRadiusU newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -5340,7 +5407,7 @@ func (a *ProvidersApiService) ProvidersRadiusUsedByListExecute(r ApiProvidersRad } localVarPath := localBasePath + "/providers/radius/{id}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -5387,9 +5454,9 @@ func (a *ProvidersApiService) ProvidersRadiusUsedByListExecute(r ApiProvidersRad return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -5406,6 +5473,7 @@ func (a *ProvidersApiService) ProvidersRadiusUsedByListExecute(r ApiProvidersRad newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -5416,6 +5484,7 @@ func (a *ProvidersApiService) ProvidersRadiusUsedByListExecute(r ApiProvidersRad newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -5530,9 +5599,9 @@ func (a *ProvidersApiService) ProvidersSamlCreateExecute(r ApiProvidersSamlCreat return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -5549,6 +5618,7 @@ func (a *ProvidersApiService) ProvidersSamlCreateExecute(r ApiProvidersSamlCreat newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -5559,6 +5629,7 @@ func (a *ProvidersApiService) ProvidersSamlCreateExecute(r ApiProvidersSamlCreat newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -5617,7 +5688,7 @@ func (a *ProvidersApiService) ProvidersSamlDestroyExecute(r ApiProvidersSamlDest } localVarPath := localBasePath + "/providers/saml/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -5664,9 +5735,9 @@ func (a *ProvidersApiService) ProvidersSamlDestroyExecute(r ApiProvidersSamlDest return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -5683,6 +5754,7 @@ func (a *ProvidersApiService) ProvidersSamlDestroyExecute(r ApiProvidersSamlDest newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -5693,6 +5765,7 @@ func (a *ProvidersApiService) ProvidersSamlDestroyExecute(r ApiProvidersSamlDest newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -5706,7 +5779,7 @@ type ApiProvidersSamlImportMetadataCreateRequest struct { ApiService *ProvidersApiService name *string authorizationFlow *string - file **os.File + file *os.File } func (r ApiProvidersSamlImportMetadataCreateRequest) Name(name string) ApiProvidersSamlImportMetadataCreateRequest { @@ -5721,7 +5794,7 @@ func (r ApiProvidersSamlImportMetadataCreateRequest) AuthorizationFlow(authoriza } func (r ApiProvidersSamlImportMetadataCreateRequest) File(file *os.File) ApiProvidersSamlImportMetadataCreateRequest { - r.file = &file + r.file = file return r } @@ -5795,22 +5868,24 @@ func (a *ProvidersApiService) ProvidersSamlImportMetadataCreateExecute(r ApiProv if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - localVarFormParams.Add("name", parameterToString(*r.name, "")) - localVarFormParams.Add("authorization_flow", parameterToString(*r.authorizationFlow, "")) + parameterAddToHeaderOrQuery(localVarFormParams, "name", r.name, "") + parameterAddToHeaderOrQuery(localVarFormParams, "authorization_flow", r.authorizationFlow, "") var fileLocalVarFormFileName string var fileLocalVarFileName string var fileLocalVarFileBytes []byte fileLocalVarFormFileName = "file" - fileLocalVarFile := *r.file + fileLocalVarFile := r.file + if fileLocalVarFile != nil { - fbs, _ := ioutil.ReadAll(fileLocalVarFile) + fbs, _ := io.ReadAll(fileLocalVarFile) + fileLocalVarFileBytes = fbs fileLocalVarFileName = fileLocalVarFile.Name() fileLocalVarFile.Close() + formFiles = append(formFiles, formFile{fileBytes: fileLocalVarFileBytes, fileName: fileLocalVarFileName, formFileName: fileLocalVarFormFileName}) } - formFiles = append(formFiles, formFile{fileBytes: fileLocalVarFileBytes, fileName: fileLocalVarFileName, formFileName: fileLocalVarFormFileName}) if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { @@ -5835,9 +5910,9 @@ func (a *ProvidersApiService) ProvidersSamlImportMetadataCreateExecute(r ApiProv return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -5854,6 +5929,7 @@ func (a *ProvidersApiService) ProvidersSamlImportMetadataCreateExecute(r ApiProv newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -6035,72 +6111,72 @@ func (a *ProvidersApiService) ProvidersSamlListExecute(r ApiProvidersSamlListReq localVarFormParams := url.Values{} if r.acsUrl != nil { - localVarQueryParams.Add("acs_url", parameterToString(*r.acsUrl, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "acs_url", r.acsUrl, "") } if r.assertionValidNotBefore != nil { - localVarQueryParams.Add("assertion_valid_not_before", parameterToString(*r.assertionValidNotBefore, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "assertion_valid_not_before", r.assertionValidNotBefore, "") } if r.assertionValidNotOnOrAfter != nil { - localVarQueryParams.Add("assertion_valid_not_on_or_after", parameterToString(*r.assertionValidNotOnOrAfter, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "assertion_valid_not_on_or_after", r.assertionValidNotOnOrAfter, "") } if r.audience != nil { - localVarQueryParams.Add("audience", parameterToString(*r.audience, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "audience", r.audience, "") } if r.authenticationFlow != nil { - localVarQueryParams.Add("authentication_flow", parameterToString(*r.authenticationFlow, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "authentication_flow", r.authenticationFlow, "") } if r.authorizationFlow != nil { - localVarQueryParams.Add("authorization_flow", parameterToString(*r.authorizationFlow, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "authorization_flow", r.authorizationFlow, "") } if r.digestAlgorithm != nil { - localVarQueryParams.Add("digest_algorithm", parameterToString(*r.digestAlgorithm, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "digest_algorithm", r.digestAlgorithm, "") } if r.issuer != nil { - localVarQueryParams.Add("issuer", parameterToString(*r.issuer, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "issuer", r.issuer, "") } if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.nameIdMapping != nil { - localVarQueryParams.Add("name_id_mapping", parameterToString(*r.nameIdMapping, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name_id_mapping", r.nameIdMapping, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.propertyMappings != nil { t := *r.propertyMappings if reflect.TypeOf(t).Kind() == reflect.Slice { s := reflect.ValueOf(t) for i := 0; i < s.Len(); i++ { - localVarQueryParams.Add("property_mappings", parameterToString(s.Index(i), "multi")) + parameterAddToHeaderOrQuery(localVarQueryParams, "property_mappings", s.Index(i), "multi") } } else { - localVarQueryParams.Add("property_mappings", parameterToString(t, "multi")) + parameterAddToHeaderOrQuery(localVarQueryParams, "property_mappings", t, "multi") } } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } if r.sessionValidNotOnOrAfter != nil { - localVarQueryParams.Add("session_valid_not_on_or_after", parameterToString(*r.sessionValidNotOnOrAfter, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "session_valid_not_on_or_after", r.sessionValidNotOnOrAfter, "") } if r.signatureAlgorithm != nil { - localVarQueryParams.Add("signature_algorithm", parameterToString(*r.signatureAlgorithm, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "signature_algorithm", r.signatureAlgorithm, "") } if r.signingKp != nil { - localVarQueryParams.Add("signing_kp", parameterToString(*r.signingKp, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "signing_kp", r.signingKp, "") } if r.spBinding != nil { - localVarQueryParams.Add("sp_binding", parameterToString(*r.spBinding, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "sp_binding", r.spBinding, "") } if r.verificationKp != nil { - localVarQueryParams.Add("verification_kp", parameterToString(*r.verificationKp, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "verification_kp", r.verificationKp, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -6143,9 +6219,9 @@ func (a *ProvidersApiService) ProvidersSamlListExecute(r ApiProvidersSamlListReq return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -6162,6 +6238,7 @@ func (a *ProvidersApiService) ProvidersSamlListExecute(r ApiProvidersSamlListReq newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -6172,6 +6249,7 @@ func (a *ProvidersApiService) ProvidersSamlListExecute(r ApiProvidersSamlListReq newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -6245,17 +6323,17 @@ func (a *ProvidersApiService) ProvidersSamlMetadataRetrieveExecute(r ApiProvider } localVarPath := localBasePath + "/providers/saml/{id}/metadata/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} if r.download != nil { - localVarQueryParams.Add("download", parameterToString(*r.download, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "download", r.download, "") } if r.forceBinding != nil { - localVarQueryParams.Add("force_binding", parameterToString(*r.forceBinding, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "force_binding", r.forceBinding, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -6298,9 +6376,9 @@ func (a *ProvidersApiService) ProvidersSamlMetadataRetrieveExecute(r ApiProvider return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -6317,6 +6395,7 @@ func (a *ProvidersApiService) ProvidersSamlMetadataRetrieveExecute(r ApiProvider newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -6327,6 +6406,7 @@ func (a *ProvidersApiService) ProvidersSamlMetadataRetrieveExecute(r ApiProvider newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -6393,7 +6473,7 @@ func (a *ProvidersApiService) ProvidersSamlPartialUpdateExecute(r ApiProvidersSa } localVarPath := localBasePath + "/providers/saml/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -6442,9 +6522,9 @@ func (a *ProvidersApiService) ProvidersSamlPartialUpdateExecute(r ApiProvidersSa return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -6461,6 +6541,7 @@ func (a *ProvidersApiService) ProvidersSamlPartialUpdateExecute(r ApiProvidersSa newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -6471,6 +6552,7 @@ func (a *ProvidersApiService) ProvidersSamlPartialUpdateExecute(r ApiProvidersSa newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -6531,7 +6613,7 @@ func (a *ProvidersApiService) ProvidersSamlPreviewUserRetrieveExecute(r ApiProvi } localVarPath := localBasePath + "/providers/saml/{id}/preview_user/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -6578,9 +6660,9 @@ func (a *ProvidersApiService) ProvidersSamlPreviewUserRetrieveExecute(r ApiProvi return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -6597,6 +6679,7 @@ func (a *ProvidersApiService) ProvidersSamlPreviewUserRetrieveExecute(r ApiProvi newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -6657,7 +6740,7 @@ func (a *ProvidersApiService) ProvidersSamlRetrieveExecute(r ApiProvidersSamlRet } localVarPath := localBasePath + "/providers/saml/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -6704,9 +6787,9 @@ func (a *ProvidersApiService) ProvidersSamlRetrieveExecute(r ApiProvidersSamlRet return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -6723,6 +6806,7 @@ func (a *ProvidersApiService) ProvidersSamlRetrieveExecute(r ApiProvidersSamlRet newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -6733,6 +6817,7 @@ func (a *ProvidersApiService) ProvidersSamlRetrieveExecute(r ApiProvidersSamlRet newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -6799,7 +6884,7 @@ func (a *ProvidersApiService) ProvidersSamlUpdateExecute(r ApiProvidersSamlUpdat } localVarPath := localBasePath + "/providers/saml/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -6851,9 +6936,9 @@ func (a *ProvidersApiService) ProvidersSamlUpdateExecute(r ApiProvidersSamlUpdat return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -6870,6 +6955,7 @@ func (a *ProvidersApiService) ProvidersSamlUpdateExecute(r ApiProvidersSamlUpdat newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -6880,6 +6966,7 @@ func (a *ProvidersApiService) ProvidersSamlUpdateExecute(r ApiProvidersSamlUpdat newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -6940,7 +7027,7 @@ func (a *ProvidersApiService) ProvidersSamlUsedByListExecute(r ApiProvidersSamlU } localVarPath := localBasePath + "/providers/saml/{id}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -6987,9 +7074,9 @@ func (a *ProvidersApiService) ProvidersSamlUsedByListExecute(r ApiProvidersSamlU return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -7006,6 +7093,7 @@ func (a *ProvidersApiService) ProvidersSamlUsedByListExecute(r ApiProvidersSamlU newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -7016,6 +7104,7 @@ func (a *ProvidersApiService) ProvidersSamlUsedByListExecute(r ApiProvidersSamlU newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -7130,9 +7219,9 @@ func (a *ProvidersApiService) ProvidersScimCreateExecute(r ApiProvidersScimCreat return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -7149,6 +7238,7 @@ func (a *ProvidersApiService) ProvidersScimCreateExecute(r ApiProvidersScimCreat newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -7159,6 +7249,7 @@ func (a *ProvidersApiService) ProvidersScimCreateExecute(r ApiProvidersScimCreat newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -7217,7 +7308,7 @@ func (a *ProvidersApiService) ProvidersScimDestroyExecute(r ApiProvidersScimDest } localVarPath := localBasePath + "/providers/scim/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -7264,9 +7355,9 @@ func (a *ProvidersApiService) ProvidersScimDestroyExecute(r ApiProvidersScimDest return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -7283,6 +7374,7 @@ func (a *ProvidersApiService) ProvidersScimDestroyExecute(r ApiProvidersScimDest newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -7293,6 +7385,7 @@ func (a *ProvidersApiService) ProvidersScimDestroyExecute(r ApiProvidersScimDest newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -7399,28 +7492,28 @@ func (a *ProvidersApiService) ProvidersScimListExecute(r ApiProvidersScimListReq localVarFormParams := url.Values{} if r.excludeUsersServiceAccount != nil { - localVarQueryParams.Add("exclude_users_service_account", parameterToString(*r.excludeUsersServiceAccount, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_users_service_account", r.excludeUsersServiceAccount, "") } if r.filterGroup != nil { - localVarQueryParams.Add("filter_group", parameterToString(*r.filterGroup, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "filter_group", r.filterGroup, "") } if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } if r.url != nil { - localVarQueryParams.Add("url", parameterToString(*r.url, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "url", r.url, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -7463,9 +7556,9 @@ func (a *ProvidersApiService) ProvidersScimListExecute(r ApiProvidersScimListReq return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -7482,6 +7575,7 @@ func (a *ProvidersApiService) ProvidersScimListExecute(r ApiProvidersScimListReq newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -7492,6 +7586,7 @@ func (a *ProvidersApiService) ProvidersScimListExecute(r ApiProvidersScimListReq newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -7558,7 +7653,7 @@ func (a *ProvidersApiService) ProvidersScimPartialUpdateExecute(r ApiProvidersSc } localVarPath := localBasePath + "/providers/scim/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -7607,9 +7702,9 @@ func (a *ProvidersApiService) ProvidersScimPartialUpdateExecute(r ApiProvidersSc return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -7626,6 +7721,7 @@ func (a *ProvidersApiService) ProvidersScimPartialUpdateExecute(r ApiProvidersSc newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -7636,6 +7732,7 @@ func (a *ProvidersApiService) ProvidersScimPartialUpdateExecute(r ApiProvidersSc newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -7696,7 +7793,7 @@ func (a *ProvidersApiService) ProvidersScimRetrieveExecute(r ApiProvidersScimRet } localVarPath := localBasePath + "/providers/scim/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -7743,9 +7840,9 @@ func (a *ProvidersApiService) ProvidersScimRetrieveExecute(r ApiProvidersScimRet return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -7762,6 +7859,7 @@ func (a *ProvidersApiService) ProvidersScimRetrieveExecute(r ApiProvidersScimRet newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -7772,6 +7870,7 @@ func (a *ProvidersApiService) ProvidersScimRetrieveExecute(r ApiProvidersScimRet newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -7832,7 +7931,7 @@ func (a *ProvidersApiService) ProvidersScimSyncStatusRetrieveExecute(r ApiProvid } localVarPath := localBasePath + "/providers/scim/{id}/sync_status/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -7879,9 +7978,9 @@ func (a *ProvidersApiService) ProvidersScimSyncStatusRetrieveExecute(r ApiProvid return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -7898,6 +7997,7 @@ func (a *ProvidersApiService) ProvidersScimSyncStatusRetrieveExecute(r ApiProvid newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -7908,6 +8008,7 @@ func (a *ProvidersApiService) ProvidersScimSyncStatusRetrieveExecute(r ApiProvid newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -7974,7 +8075,7 @@ func (a *ProvidersApiService) ProvidersScimUpdateExecute(r ApiProvidersScimUpdat } localVarPath := localBasePath + "/providers/scim/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -8026,9 +8127,9 @@ func (a *ProvidersApiService) ProvidersScimUpdateExecute(r ApiProvidersScimUpdat return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -8045,6 +8146,7 @@ func (a *ProvidersApiService) ProvidersScimUpdateExecute(r ApiProvidersScimUpdat newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -8055,6 +8157,7 @@ func (a *ProvidersApiService) ProvidersScimUpdateExecute(r ApiProvidersScimUpdat newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -8115,7 +8218,7 @@ func (a *ProvidersApiService) ProvidersScimUsedByListExecute(r ApiProvidersScimU } localVarPath := localBasePath + "/providers/scim/{id}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -8162,9 +8265,9 @@ func (a *ProvidersApiService) ProvidersScimUsedByListExecute(r ApiProvidersScimU return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -8181,6 +8284,7 @@ func (a *ProvidersApiService) ProvidersScimUsedByListExecute(r ApiProvidersScimU newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -8191,6 +8295,7 @@ func (a *ProvidersApiService) ProvidersScimUsedByListExecute(r ApiProvidersScimU newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr diff --git a/api_root.go b/api_root.go index 6b2fbb735..b9b679059 100644 --- a/api_root.go +++ b/api_root.go @@ -14,7 +14,7 @@ package api import ( "bytes" "context" - "io/ioutil" + "io" "net/http" "net/url" ) @@ -108,9 +108,9 @@ func (a *RootApiService) RootConfigRetrieveExecute(r ApiRootConfigRetrieveReques return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -127,6 +127,7 @@ func (a *RootApiService) RootConfigRetrieveExecute(r ApiRootConfigRetrieveReques newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -137,6 +138,7 @@ func (a *RootApiService) RootConfigRetrieveExecute(r ApiRootConfigRetrieveReques newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr diff --git a/api_schema.go b/api_schema.go index bb8e40fe2..2552c8101 100644 --- a/api_schema.go +++ b/api_schema.go @@ -14,7 +14,7 @@ package api import ( "bytes" "context" - "io/ioutil" + "io" "net/http" "net/url" ) @@ -83,10 +83,10 @@ func (a *SchemaApiService) SchemaRetrieveExecute(r ApiSchemaRetrieveRequest) (ma localVarFormParams := url.Values{} if r.format != nil { - localVarQueryParams.Add("format", parameterToString(*r.format, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "format", r.format, "") } if r.lang != nil { - localVarQueryParams.Add("lang", parameterToString(*r.lang, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "lang", r.lang, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -129,9 +129,9 @@ func (a *SchemaApiService) SchemaRetrieveExecute(r ApiSchemaRetrieveRequest) (ma return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -148,6 +148,7 @@ func (a *SchemaApiService) SchemaRetrieveExecute(r ApiSchemaRetrieveRequest) (ma newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -158,6 +159,7 @@ func (a *SchemaApiService) SchemaRetrieveExecute(r ApiSchemaRetrieveRequest) (ma newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr diff --git a/api_sources.go b/api_sources.go index b0e6b35b4..a0dd029ac 100644 --- a/api_sources.go +++ b/api_sources.go @@ -14,7 +14,7 @@ package api import ( "bytes" "context" - "io/ioutil" + "io" "net/http" "net/url" "os" @@ -66,7 +66,7 @@ func (a *SourcesApiService) SourcesAllDestroyExecute(r ApiSourcesAllDestroyReque } localVarPath := localBasePath + "/sources/all/{slug}/" - localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterToString(r.slug, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterValueToString(r.slug, "slug")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -113,9 +113,9 @@ func (a *SourcesApiService) SourcesAllDestroyExecute(r ApiSourcesAllDestroyReque return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -132,6 +132,7 @@ func (a *SourcesApiService) SourcesAllDestroyExecute(r ApiSourcesAllDestroyReque newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -142,6 +143,7 @@ func (a *SourcesApiService) SourcesAllDestroyExecute(r ApiSourcesAllDestroyReque newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -242,25 +244,25 @@ func (a *SourcesApiService) SourcesAllListExecute(r ApiSourcesAllListRequest) (* localVarFormParams := url.Values{} if r.managed != nil { - localVarQueryParams.Add("managed", parameterToString(*r.managed, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "managed", r.managed, "") } if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } if r.slug != nil { - localVarQueryParams.Add("slug", parameterToString(*r.slug, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "slug", r.slug, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -303,9 +305,9 @@ func (a *SourcesApiService) SourcesAllListExecute(r ApiSourcesAllListRequest) (* return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -322,6 +324,7 @@ func (a *SourcesApiService) SourcesAllListExecute(r ApiSourcesAllListRequest) (* newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -332,6 +335,7 @@ func (a *SourcesApiService) SourcesAllListExecute(r ApiSourcesAllListRequest) (* newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -392,7 +396,7 @@ func (a *SourcesApiService) SourcesAllRetrieveExecute(r ApiSourcesAllRetrieveReq } localVarPath := localBasePath + "/sources/all/{slug}/" - localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterToString(r.slug, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterValueToString(r.slug, "slug")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -439,9 +443,9 @@ func (a *SourcesApiService) SourcesAllRetrieveExecute(r ApiSourcesAllRetrieveReq return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -458,6 +462,7 @@ func (a *SourcesApiService) SourcesAllRetrieveExecute(r ApiSourcesAllRetrieveReq newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -468,6 +473,7 @@ func (a *SourcesApiService) SourcesAllRetrieveExecute(r ApiSourcesAllRetrieveReq newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -489,12 +495,12 @@ type ApiSourcesAllSetIconCreateRequest struct { ctx context.Context ApiService *SourcesApiService slug string - file **os.File + file *os.File clear *bool } func (r ApiSourcesAllSetIconCreateRequest) File(file *os.File) ApiSourcesAllSetIconCreateRequest { - r.file = &file + r.file = file return r } @@ -538,7 +544,7 @@ func (a *SourcesApiService) SourcesAllSetIconCreateExecute(r ApiSourcesAllSetIco } localVarPath := localBasePath + "/sources/all/{slug}/set_icon/" - localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterToString(r.slug, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterValueToString(r.slug, "slug")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -567,19 +573,18 @@ func (a *SourcesApiService) SourcesAllSetIconCreateExecute(r ApiSourcesAllSetIco fileLocalVarFormFileName = "file" - var fileLocalVarFile *os.File - if r.file != nil { - fileLocalVarFile = *r.file - } + fileLocalVarFile := r.file + if fileLocalVarFile != nil { - fbs, _ := ioutil.ReadAll(fileLocalVarFile) + fbs, _ := io.ReadAll(fileLocalVarFile) + fileLocalVarFileBytes = fbs fileLocalVarFileName = fileLocalVarFile.Name() fileLocalVarFile.Close() + formFiles = append(formFiles, formFile{fileBytes: fileLocalVarFileBytes, fileName: fileLocalVarFileName, formFileName: fileLocalVarFormFileName}) } - formFiles = append(formFiles, formFile{fileBytes: fileLocalVarFileBytes, fileName: fileLocalVarFileName, formFileName: fileLocalVarFormFileName}) if r.clear != nil { - localVarFormParams.Add("clear", parameterToString(*r.clear, "")) + parameterAddToHeaderOrQuery(localVarFormParams, "clear", r.clear, "") } if r.ctx != nil { // API Key Authentication @@ -605,9 +610,9 @@ func (a *SourcesApiService) SourcesAllSetIconCreateExecute(r ApiSourcesAllSetIco return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -624,6 +629,7 @@ func (a *SourcesApiService) SourcesAllSetIconCreateExecute(r ApiSourcesAllSetIco newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -679,7 +685,7 @@ func (a *SourcesApiService) SourcesAllSetIconUrlCreateExecute(r ApiSourcesAllSet } localVarPath := localBasePath + "/sources/all/{slug}/set_icon_url/" - localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterToString(r.slug, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterValueToString(r.slug, "slug")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -731,9 +737,9 @@ func (a *SourcesApiService) SourcesAllSetIconUrlCreateExecute(r ApiSourcesAllSet return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -750,6 +756,7 @@ func (a *SourcesApiService) SourcesAllSetIconUrlCreateExecute(r ApiSourcesAllSet newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -844,9 +851,9 @@ func (a *SourcesApiService) SourcesAllTypesListExecute(r ApiSourcesAllTypesListR return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -863,6 +870,7 @@ func (a *SourcesApiService) SourcesAllTypesListExecute(r ApiSourcesAllTypesListR newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -873,6 +881,7 @@ func (a *SourcesApiService) SourcesAllTypesListExecute(r ApiSourcesAllTypesListR newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -933,7 +942,7 @@ func (a *SourcesApiService) SourcesAllUsedByListExecute(r ApiSourcesAllUsedByLis } localVarPath := localBasePath + "/sources/all/{slug}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterToString(r.slug, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterValueToString(r.slug, "slug")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -980,9 +989,9 @@ func (a *SourcesApiService) SourcesAllUsedByListExecute(r ApiSourcesAllUsedByLis return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -999,6 +1008,7 @@ func (a *SourcesApiService) SourcesAllUsedByListExecute(r ApiSourcesAllUsedByLis newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1009,6 +1019,7 @@ func (a *SourcesApiService) SourcesAllUsedByListExecute(r ApiSourcesAllUsedByLis newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1112,9 +1123,9 @@ func (a *SourcesApiService) SourcesAllUserSettingsListExecute(r ApiSourcesAllUse return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1131,6 +1142,7 @@ func (a *SourcesApiService) SourcesAllUserSettingsListExecute(r ApiSourcesAllUse newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1141,6 +1153,7 @@ func (a *SourcesApiService) SourcesAllUserSettingsListExecute(r ApiSourcesAllUse newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1255,9 +1268,9 @@ func (a *SourcesApiService) SourcesLdapCreateExecute(r ApiSourcesLdapCreateReque return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1274,6 +1287,7 @@ func (a *SourcesApiService) SourcesLdapCreateExecute(r ApiSourcesLdapCreateReque newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1284,6 +1298,7 @@ func (a *SourcesApiService) SourcesLdapCreateExecute(r ApiSourcesLdapCreateReque newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1344,7 +1359,7 @@ func (a *SourcesApiService) SourcesLdapDebugRetrieveExecute(r ApiSourcesLdapDebu } localVarPath := localBasePath + "/sources/ldap/{slug}/debug/" - localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterToString(r.slug, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterValueToString(r.slug, "slug")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1391,9 +1406,9 @@ func (a *SourcesApiService) SourcesLdapDebugRetrieveExecute(r ApiSourcesLdapDebu return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1410,6 +1425,7 @@ func (a *SourcesApiService) SourcesLdapDebugRetrieveExecute(r ApiSourcesLdapDebu newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1420,6 +1436,7 @@ func (a *SourcesApiService) SourcesLdapDebugRetrieveExecute(r ApiSourcesLdapDebu newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1478,7 +1495,7 @@ func (a *SourcesApiService) SourcesLdapDestroyExecute(r ApiSourcesLdapDestroyReq } localVarPath := localBasePath + "/sources/ldap/{slug}/" - localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterToString(r.slug, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterValueToString(r.slug, "slug")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1525,9 +1542,9 @@ func (a *SourcesApiService) SourcesLdapDestroyExecute(r ApiSourcesLdapDestroyReq return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -1544,6 +1561,7 @@ func (a *SourcesApiService) SourcesLdapDestroyExecute(r ApiSourcesLdapDestroyReq newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -1554,6 +1572,7 @@ func (a *SourcesApiService) SourcesLdapDestroyExecute(r ApiSourcesLdapDestroyReq newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -1756,53 +1775,53 @@ func (a *SourcesApiService) SourcesLdapListExecute(r ApiSourcesLdapListRequest) localVarFormParams := url.Values{} if r.additionalGroupDn != nil { - localVarQueryParams.Add("additional_group_dn", parameterToString(*r.additionalGroupDn, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "additional_group_dn", r.additionalGroupDn, "") } if r.additionalUserDn != nil { - localVarQueryParams.Add("additional_user_dn", parameterToString(*r.additionalUserDn, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "additional_user_dn", r.additionalUserDn, "") } if r.baseDn != nil { - localVarQueryParams.Add("base_dn", parameterToString(*r.baseDn, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "base_dn", r.baseDn, "") } if r.bindCn != nil { - localVarQueryParams.Add("bind_cn", parameterToString(*r.bindCn, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "bind_cn", r.bindCn, "") } if r.enabled != nil { - localVarQueryParams.Add("enabled", parameterToString(*r.enabled, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "enabled", r.enabled, "") } if r.groupMembershipField != nil { - localVarQueryParams.Add("group_membership_field", parameterToString(*r.groupMembershipField, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "group_membership_field", r.groupMembershipField, "") } if r.groupObjectFilter != nil { - localVarQueryParams.Add("group_object_filter", parameterToString(*r.groupObjectFilter, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "group_object_filter", r.groupObjectFilter, "") } if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.objectUniquenessField != nil { - localVarQueryParams.Add("object_uniqueness_field", parameterToString(*r.objectUniquenessField, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "object_uniqueness_field", r.objectUniquenessField, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.peerCertificate != nil { - localVarQueryParams.Add("peer_certificate", parameterToString(*r.peerCertificate, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "peer_certificate", r.peerCertificate, "") } if r.propertyMappings != nil { t := *r.propertyMappings if reflect.TypeOf(t).Kind() == reflect.Slice { s := reflect.ValueOf(t) for i := 0; i < s.Len(); i++ { - localVarQueryParams.Add("property_mappings", parameterToString(s.Index(i), "multi")) + parameterAddToHeaderOrQuery(localVarQueryParams, "property_mappings", s.Index(i), "multi") } } else { - localVarQueryParams.Add("property_mappings", parameterToString(t, "multi")) + parameterAddToHeaderOrQuery(localVarQueryParams, "property_mappings", t, "multi") } } if r.propertyMappingsGroup != nil { @@ -1810,38 +1829,38 @@ func (a *SourcesApiService) SourcesLdapListExecute(r ApiSourcesLdapListRequest) if reflect.TypeOf(t).Kind() == reflect.Slice { s := reflect.ValueOf(t) for i := 0; i < s.Len(); i++ { - localVarQueryParams.Add("property_mappings_group", parameterToString(s.Index(i), "multi")) + parameterAddToHeaderOrQuery(localVarQueryParams, "property_mappings_group", s.Index(i), "multi") } } else { - localVarQueryParams.Add("property_mappings_group", parameterToString(t, "multi")) + parameterAddToHeaderOrQuery(localVarQueryParams, "property_mappings_group", t, "multi") } } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } if r.serverUri != nil { - localVarQueryParams.Add("server_uri", parameterToString(*r.serverUri, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "server_uri", r.serverUri, "") } if r.slug != nil { - localVarQueryParams.Add("slug", parameterToString(*r.slug, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "slug", r.slug, "") } if r.startTls != nil { - localVarQueryParams.Add("start_tls", parameterToString(*r.startTls, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "start_tls", r.startTls, "") } if r.syncGroups != nil { - localVarQueryParams.Add("sync_groups", parameterToString(*r.syncGroups, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "sync_groups", r.syncGroups, "") } if r.syncParentGroup != nil { - localVarQueryParams.Add("sync_parent_group", parameterToString(*r.syncParentGroup, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "sync_parent_group", r.syncParentGroup, "") } if r.syncUsers != nil { - localVarQueryParams.Add("sync_users", parameterToString(*r.syncUsers, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "sync_users", r.syncUsers, "") } if r.syncUsersPassword != nil { - localVarQueryParams.Add("sync_users_password", parameterToString(*r.syncUsersPassword, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "sync_users_password", r.syncUsersPassword, "") } if r.userObjectFilter != nil { - localVarQueryParams.Add("user_object_filter", parameterToString(*r.userObjectFilter, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "user_object_filter", r.userObjectFilter, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1884,9 +1903,9 @@ func (a *SourcesApiService) SourcesLdapListExecute(r ApiSourcesLdapListRequest) return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1903,6 +1922,7 @@ func (a *SourcesApiService) SourcesLdapListExecute(r ApiSourcesLdapListRequest) newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1913,6 +1933,7 @@ func (a *SourcesApiService) SourcesLdapListExecute(r ApiSourcesLdapListRequest) newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1979,7 +2000,7 @@ func (a *SourcesApiService) SourcesLdapPartialUpdateExecute(r ApiSourcesLdapPart } localVarPath := localBasePath + "/sources/ldap/{slug}/" - localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterToString(r.slug, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterValueToString(r.slug, "slug")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2028,9 +2049,9 @@ func (a *SourcesApiService) SourcesLdapPartialUpdateExecute(r ApiSourcesLdapPart return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2047,6 +2068,7 @@ func (a *SourcesApiService) SourcesLdapPartialUpdateExecute(r ApiSourcesLdapPart newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2057,6 +2079,7 @@ func (a *SourcesApiService) SourcesLdapPartialUpdateExecute(r ApiSourcesLdapPart newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2117,7 +2140,7 @@ func (a *SourcesApiService) SourcesLdapRetrieveExecute(r ApiSourcesLdapRetrieveR } localVarPath := localBasePath + "/sources/ldap/{slug}/" - localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterToString(r.slug, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterValueToString(r.slug, "slug")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2164,9 +2187,9 @@ func (a *SourcesApiService) SourcesLdapRetrieveExecute(r ApiSourcesLdapRetrieveR return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2183,6 +2206,7 @@ func (a *SourcesApiService) SourcesLdapRetrieveExecute(r ApiSourcesLdapRetrieveR newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2193,6 +2217,7 @@ func (a *SourcesApiService) SourcesLdapRetrieveExecute(r ApiSourcesLdapRetrieveR newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2253,7 +2278,7 @@ func (a *SourcesApiService) SourcesLdapSyncStatusListExecute(r ApiSourcesLdapSyn } localVarPath := localBasePath + "/sources/ldap/{slug}/sync_status/" - localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterToString(r.slug, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterValueToString(r.slug, "slug")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2300,9 +2325,9 @@ func (a *SourcesApiService) SourcesLdapSyncStatusListExecute(r ApiSourcesLdapSyn return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2319,6 +2344,7 @@ func (a *SourcesApiService) SourcesLdapSyncStatusListExecute(r ApiSourcesLdapSyn newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2329,6 +2355,7 @@ func (a *SourcesApiService) SourcesLdapSyncStatusListExecute(r ApiSourcesLdapSyn newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2395,7 +2422,7 @@ func (a *SourcesApiService) SourcesLdapUpdateExecute(r ApiSourcesLdapUpdateReque } localVarPath := localBasePath + "/sources/ldap/{slug}/" - localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterToString(r.slug, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterValueToString(r.slug, "slug")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2447,9 +2474,9 @@ func (a *SourcesApiService) SourcesLdapUpdateExecute(r ApiSourcesLdapUpdateReque return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2466,6 +2493,7 @@ func (a *SourcesApiService) SourcesLdapUpdateExecute(r ApiSourcesLdapUpdateReque newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2476,6 +2504,7 @@ func (a *SourcesApiService) SourcesLdapUpdateExecute(r ApiSourcesLdapUpdateReque newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2536,7 +2565,7 @@ func (a *SourcesApiService) SourcesLdapUsedByListExecute(r ApiSourcesLdapUsedByL } localVarPath := localBasePath + "/sources/ldap/{slug}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterToString(r.slug, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterValueToString(r.slug, "slug")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2583,9 +2612,9 @@ func (a *SourcesApiService) SourcesLdapUsedByListExecute(r ApiSourcesLdapUsedByL return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2602,6 +2631,7 @@ func (a *SourcesApiService) SourcesLdapUsedByListExecute(r ApiSourcesLdapUsedByL newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2612,6 +2642,7 @@ func (a *SourcesApiService) SourcesLdapUsedByListExecute(r ApiSourcesLdapUsedByL newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2726,9 +2757,9 @@ func (a *SourcesApiService) SourcesOauthCreateExecute(r ApiSourcesOauthCreateReq return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2745,6 +2776,7 @@ func (a *SourcesApiService) SourcesOauthCreateExecute(r ApiSourcesOauthCreateReq newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2755,6 +2787,7 @@ func (a *SourcesApiService) SourcesOauthCreateExecute(r ApiSourcesOauthCreateReq newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2813,7 +2846,7 @@ func (a *SourcesApiService) SourcesOauthDestroyExecute(r ApiSourcesOauthDestroyR } localVarPath := localBasePath + "/sources/oauth/{slug}/" - localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterToString(r.slug, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterValueToString(r.slug, "slug")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2860,9 +2893,9 @@ func (a *SourcesApiService) SourcesOauthDestroyExecute(r ApiSourcesOauthDestroyR return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -2879,6 +2912,7 @@ func (a *SourcesApiService) SourcesOauthDestroyExecute(r ApiSourcesOauthDestroyR newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -2889,6 +2923,7 @@ func (a *SourcesApiService) SourcesOauthDestroyExecute(r ApiSourcesOauthDestroyR newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -3064,61 +3099,61 @@ func (a *SourcesApiService) SourcesOauthListExecute(r ApiSourcesOauthListRequest localVarFormParams := url.Values{} if r.accessTokenUrl != nil { - localVarQueryParams.Add("access_token_url", parameterToString(*r.accessTokenUrl, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "access_token_url", r.accessTokenUrl, "") } if r.additionalScopes != nil { - localVarQueryParams.Add("additional_scopes", parameterToString(*r.additionalScopes, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "additional_scopes", r.additionalScopes, "") } if r.authenticationFlow != nil { - localVarQueryParams.Add("authentication_flow", parameterToString(*r.authenticationFlow, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "authentication_flow", r.authenticationFlow, "") } if r.authorizationUrl != nil { - localVarQueryParams.Add("authorization_url", parameterToString(*r.authorizationUrl, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "authorization_url", r.authorizationUrl, "") } if r.consumerKey != nil { - localVarQueryParams.Add("consumer_key", parameterToString(*r.consumerKey, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "consumer_key", r.consumerKey, "") } if r.enabled != nil { - localVarQueryParams.Add("enabled", parameterToString(*r.enabled, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "enabled", r.enabled, "") } if r.enrollmentFlow != nil { - localVarQueryParams.Add("enrollment_flow", parameterToString(*r.enrollmentFlow, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "enrollment_flow", r.enrollmentFlow, "") } if r.hasJwks != nil { - localVarQueryParams.Add("has_jwks", parameterToString(*r.hasJwks, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "has_jwks", r.hasJwks, "") } if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.policyEngineMode != nil { - localVarQueryParams.Add("policy_engine_mode", parameterToString(*r.policyEngineMode, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "policy_engine_mode", r.policyEngineMode, "") } if r.profileUrl != nil { - localVarQueryParams.Add("profile_url", parameterToString(*r.profileUrl, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "profile_url", r.profileUrl, "") } if r.providerType != nil { - localVarQueryParams.Add("provider_type", parameterToString(*r.providerType, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "provider_type", r.providerType, "") } if r.requestTokenUrl != nil { - localVarQueryParams.Add("request_token_url", parameterToString(*r.requestTokenUrl, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "request_token_url", r.requestTokenUrl, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } if r.slug != nil { - localVarQueryParams.Add("slug", parameterToString(*r.slug, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "slug", r.slug, "") } if r.userMatchingMode != nil { - localVarQueryParams.Add("user_matching_mode", parameterToString(*r.userMatchingMode, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "user_matching_mode", r.userMatchingMode, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -3161,9 +3196,9 @@ func (a *SourcesApiService) SourcesOauthListExecute(r ApiSourcesOauthListRequest return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -3180,6 +3215,7 @@ func (a *SourcesApiService) SourcesOauthListExecute(r ApiSourcesOauthListRequest newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -3190,6 +3226,7 @@ func (a *SourcesApiService) SourcesOauthListExecute(r ApiSourcesOauthListRequest newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3256,7 +3293,7 @@ func (a *SourcesApiService) SourcesOauthPartialUpdateExecute(r ApiSourcesOauthPa } localVarPath := localBasePath + "/sources/oauth/{slug}/" - localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterToString(r.slug, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterValueToString(r.slug, "slug")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -3305,9 +3342,9 @@ func (a *SourcesApiService) SourcesOauthPartialUpdateExecute(r ApiSourcesOauthPa return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -3324,6 +3361,7 @@ func (a *SourcesApiService) SourcesOauthPartialUpdateExecute(r ApiSourcesOauthPa newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -3334,6 +3372,7 @@ func (a *SourcesApiService) SourcesOauthPartialUpdateExecute(r ApiSourcesOauthPa newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3394,7 +3433,7 @@ func (a *SourcesApiService) SourcesOauthRetrieveExecute(r ApiSourcesOauthRetriev } localVarPath := localBasePath + "/sources/oauth/{slug}/" - localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterToString(r.slug, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterValueToString(r.slug, "slug")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -3441,9 +3480,9 @@ func (a *SourcesApiService) SourcesOauthRetrieveExecute(r ApiSourcesOauthRetriev return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -3460,6 +3499,7 @@ func (a *SourcesApiService) SourcesOauthRetrieveExecute(r ApiSourcesOauthRetriev newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -3470,6 +3510,7 @@ func (a *SourcesApiService) SourcesOauthRetrieveExecute(r ApiSourcesOauthRetriev newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3540,7 +3581,7 @@ func (a *SourcesApiService) SourcesOauthSourceTypesListExecute(r ApiSourcesOauth localVarFormParams := url.Values{} if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -3583,9 +3624,9 @@ func (a *SourcesApiService) SourcesOauthSourceTypesListExecute(r ApiSourcesOauth return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -3602,6 +3643,7 @@ func (a *SourcesApiService) SourcesOauthSourceTypesListExecute(r ApiSourcesOauth newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -3612,6 +3654,7 @@ func (a *SourcesApiService) SourcesOauthSourceTypesListExecute(r ApiSourcesOauth newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3678,7 +3721,7 @@ func (a *SourcesApiService) SourcesOauthUpdateExecute(r ApiSourcesOauthUpdateReq } localVarPath := localBasePath + "/sources/oauth/{slug}/" - localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterToString(r.slug, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterValueToString(r.slug, "slug")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -3730,9 +3773,9 @@ func (a *SourcesApiService) SourcesOauthUpdateExecute(r ApiSourcesOauthUpdateReq return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -3749,6 +3792,7 @@ func (a *SourcesApiService) SourcesOauthUpdateExecute(r ApiSourcesOauthUpdateReq newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -3759,6 +3803,7 @@ func (a *SourcesApiService) SourcesOauthUpdateExecute(r ApiSourcesOauthUpdateReq newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3819,7 +3864,7 @@ func (a *SourcesApiService) SourcesOauthUsedByListExecute(r ApiSourcesOauthUsedB } localVarPath := localBasePath + "/sources/oauth/{slug}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterToString(r.slug, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterValueToString(r.slug, "slug")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -3866,9 +3911,9 @@ func (a *SourcesApiService) SourcesOauthUsedByListExecute(r ApiSourcesOauthUsedB return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -3885,6 +3930,7 @@ func (a *SourcesApiService) SourcesOauthUsedByListExecute(r ApiSourcesOauthUsedB newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -3895,6 +3941,7 @@ func (a *SourcesApiService) SourcesOauthUsedByListExecute(r ApiSourcesOauthUsedB newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -4009,9 +4056,9 @@ func (a *SourcesApiService) SourcesPlexCreateExecute(r ApiSourcesPlexCreateReque return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -4028,6 +4075,7 @@ func (a *SourcesApiService) SourcesPlexCreateExecute(r ApiSourcesPlexCreateReque newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -4038,6 +4086,7 @@ func (a *SourcesApiService) SourcesPlexCreateExecute(r ApiSourcesPlexCreateReque newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -4096,7 +4145,7 @@ func (a *SourcesApiService) SourcesPlexDestroyExecute(r ApiSourcesPlexDestroyReq } localVarPath := localBasePath + "/sources/plex/{slug}/" - localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterToString(r.slug, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterValueToString(r.slug, "slug")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -4143,9 +4192,9 @@ func (a *SourcesApiService) SourcesPlexDestroyExecute(r ApiSourcesPlexDestroyReq return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -4162,6 +4211,7 @@ func (a *SourcesApiService) SourcesPlexDestroyExecute(r ApiSourcesPlexDestroyReq newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -4172,6 +4222,7 @@ func (a *SourcesApiService) SourcesPlexDestroyExecute(r ApiSourcesPlexDestroyReq newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -4310,43 +4361,43 @@ func (a *SourcesApiService) SourcesPlexListExecute(r ApiSourcesPlexListRequest) localVarFormParams := url.Values{} if r.allowFriends != nil { - localVarQueryParams.Add("allow_friends", parameterToString(*r.allowFriends, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "allow_friends", r.allowFriends, "") } if r.authenticationFlow != nil { - localVarQueryParams.Add("authentication_flow", parameterToString(*r.authenticationFlow, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "authentication_flow", r.authenticationFlow, "") } if r.clientId != nil { - localVarQueryParams.Add("client_id", parameterToString(*r.clientId, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "client_id", r.clientId, "") } if r.enabled != nil { - localVarQueryParams.Add("enabled", parameterToString(*r.enabled, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "enabled", r.enabled, "") } if r.enrollmentFlow != nil { - localVarQueryParams.Add("enrollment_flow", parameterToString(*r.enrollmentFlow, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "enrollment_flow", r.enrollmentFlow, "") } if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.policyEngineMode != nil { - localVarQueryParams.Add("policy_engine_mode", parameterToString(*r.policyEngineMode, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "policy_engine_mode", r.policyEngineMode, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } if r.slug != nil { - localVarQueryParams.Add("slug", parameterToString(*r.slug, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "slug", r.slug, "") } if r.userMatchingMode != nil { - localVarQueryParams.Add("user_matching_mode", parameterToString(*r.userMatchingMode, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "user_matching_mode", r.userMatchingMode, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -4389,9 +4440,9 @@ func (a *SourcesApiService) SourcesPlexListExecute(r ApiSourcesPlexListRequest) return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -4408,6 +4459,7 @@ func (a *SourcesApiService) SourcesPlexListExecute(r ApiSourcesPlexListRequest) newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -4418,6 +4470,7 @@ func (a *SourcesApiService) SourcesPlexListExecute(r ApiSourcesPlexListRequest) newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -4484,7 +4537,7 @@ func (a *SourcesApiService) SourcesPlexPartialUpdateExecute(r ApiSourcesPlexPart } localVarPath := localBasePath + "/sources/plex/{slug}/" - localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterToString(r.slug, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterValueToString(r.slug, "slug")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -4533,9 +4586,9 @@ func (a *SourcesApiService) SourcesPlexPartialUpdateExecute(r ApiSourcesPlexPart return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -4552,6 +4605,7 @@ func (a *SourcesApiService) SourcesPlexPartialUpdateExecute(r ApiSourcesPlexPart newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -4562,6 +4616,7 @@ func (a *SourcesApiService) SourcesPlexPartialUpdateExecute(r ApiSourcesPlexPart newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -4638,7 +4693,7 @@ func (a *SourcesApiService) SourcesPlexRedeemTokenAuthenticatedCreateExecute(r A } if r.slug != nil { - localVarQueryParams.Add("slug", parameterToString(*r.slug, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "slug", r.slug, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -4683,9 +4738,9 @@ func (a *SourcesApiService) SourcesPlexRedeemTokenAuthenticatedCreateExecute(r A return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -4763,7 +4818,7 @@ func (a *SourcesApiService) SourcesPlexRedeemTokenCreateExecute(r ApiSourcesPlex } if r.slug != nil { - localVarQueryParams.Add("slug", parameterToString(*r.slug, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "slug", r.slug, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -4808,9 +4863,9 @@ func (a *SourcesApiService) SourcesPlexRedeemTokenCreateExecute(r ApiSourcesPlex return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -4878,7 +4933,7 @@ func (a *SourcesApiService) SourcesPlexRetrieveExecute(r ApiSourcesPlexRetrieveR } localVarPath := localBasePath + "/sources/plex/{slug}/" - localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterToString(r.slug, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterValueToString(r.slug, "slug")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -4925,9 +4980,9 @@ func (a *SourcesApiService) SourcesPlexRetrieveExecute(r ApiSourcesPlexRetrieveR return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -4944,6 +4999,7 @@ func (a *SourcesApiService) SourcesPlexRetrieveExecute(r ApiSourcesPlexRetrieveR newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -4954,6 +5010,7 @@ func (a *SourcesApiService) SourcesPlexRetrieveExecute(r ApiSourcesPlexRetrieveR newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -5020,7 +5077,7 @@ func (a *SourcesApiService) SourcesPlexUpdateExecute(r ApiSourcesPlexUpdateReque } localVarPath := localBasePath + "/sources/plex/{slug}/" - localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterToString(r.slug, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterValueToString(r.slug, "slug")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -5072,9 +5129,9 @@ func (a *SourcesApiService) SourcesPlexUpdateExecute(r ApiSourcesPlexUpdateReque return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -5091,6 +5148,7 @@ func (a *SourcesApiService) SourcesPlexUpdateExecute(r ApiSourcesPlexUpdateReque newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -5101,6 +5159,7 @@ func (a *SourcesApiService) SourcesPlexUpdateExecute(r ApiSourcesPlexUpdateReque newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -5161,7 +5220,7 @@ func (a *SourcesApiService) SourcesPlexUsedByListExecute(r ApiSourcesPlexUsedByL } localVarPath := localBasePath + "/sources/plex/{slug}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterToString(r.slug, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterValueToString(r.slug, "slug")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -5208,9 +5267,9 @@ func (a *SourcesApiService) SourcesPlexUsedByListExecute(r ApiSourcesPlexUsedByL return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -5227,6 +5286,7 @@ func (a *SourcesApiService) SourcesPlexUsedByListExecute(r ApiSourcesPlexUsedByL newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -5237,6 +5297,7 @@ func (a *SourcesApiService) SourcesPlexUsedByListExecute(r ApiSourcesPlexUsedByL newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -5351,9 +5412,9 @@ func (a *SourcesApiService) SourcesSamlCreateExecute(r ApiSourcesSamlCreateReque return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -5370,6 +5431,7 @@ func (a *SourcesApiService) SourcesSamlCreateExecute(r ApiSourcesSamlCreateReque newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -5380,6 +5442,7 @@ func (a *SourcesApiService) SourcesSamlCreateExecute(r ApiSourcesSamlCreateReque newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -5438,7 +5501,7 @@ func (a *SourcesApiService) SourcesSamlDestroyExecute(r ApiSourcesSamlDestroyReq } localVarPath := localBasePath + "/sources/saml/{slug}/" - localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterToString(r.slug, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterValueToString(r.slug, "slug")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -5485,9 +5548,9 @@ func (a *SourcesApiService) SourcesSamlDestroyExecute(r ApiSourcesSamlDestroyReq return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -5504,6 +5567,7 @@ func (a *SourcesApiService) SourcesSamlDestroyExecute(r ApiSourcesSamlDestroyReq newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -5514,6 +5578,7 @@ func (a *SourcesApiService) SourcesSamlDestroyExecute(r ApiSourcesSamlDestroyReq newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -5716,73 +5781,73 @@ func (a *SourcesApiService) SourcesSamlListExecute(r ApiSourcesSamlListRequest) localVarFormParams := url.Values{} if r.allowIdpInitiated != nil { - localVarQueryParams.Add("allow_idp_initiated", parameterToString(*r.allowIdpInitiated, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "allow_idp_initiated", r.allowIdpInitiated, "") } if r.authenticationFlow != nil { - localVarQueryParams.Add("authentication_flow", parameterToString(*r.authenticationFlow, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "authentication_flow", r.authenticationFlow, "") } if r.bindingType != nil { - localVarQueryParams.Add("binding_type", parameterToString(*r.bindingType, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "binding_type", r.bindingType, "") } if r.digestAlgorithm != nil { - localVarQueryParams.Add("digest_algorithm", parameterToString(*r.digestAlgorithm, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "digest_algorithm", r.digestAlgorithm, "") } if r.enabled != nil { - localVarQueryParams.Add("enabled", parameterToString(*r.enabled, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "enabled", r.enabled, "") } if r.enrollmentFlow != nil { - localVarQueryParams.Add("enrollment_flow", parameterToString(*r.enrollmentFlow, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "enrollment_flow", r.enrollmentFlow, "") } if r.issuer != nil { - localVarQueryParams.Add("issuer", parameterToString(*r.issuer, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "issuer", r.issuer, "") } if r.managed != nil { - localVarQueryParams.Add("managed", parameterToString(*r.managed, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "managed", r.managed, "") } if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.nameIdPolicy != nil { - localVarQueryParams.Add("name_id_policy", parameterToString(*r.nameIdPolicy, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name_id_policy", r.nameIdPolicy, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.policyEngineMode != nil { - localVarQueryParams.Add("policy_engine_mode", parameterToString(*r.policyEngineMode, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "policy_engine_mode", r.policyEngineMode, "") } if r.preAuthenticationFlow != nil { - localVarQueryParams.Add("pre_authentication_flow", parameterToString(*r.preAuthenticationFlow, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "pre_authentication_flow", r.preAuthenticationFlow, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } if r.signatureAlgorithm != nil { - localVarQueryParams.Add("signature_algorithm", parameterToString(*r.signatureAlgorithm, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "signature_algorithm", r.signatureAlgorithm, "") } if r.signingKp != nil { - localVarQueryParams.Add("signing_kp", parameterToString(*r.signingKp, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "signing_kp", r.signingKp, "") } if r.sloUrl != nil { - localVarQueryParams.Add("slo_url", parameterToString(*r.sloUrl, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "slo_url", r.sloUrl, "") } if r.slug != nil { - localVarQueryParams.Add("slug", parameterToString(*r.slug, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "slug", r.slug, "") } if r.ssoUrl != nil { - localVarQueryParams.Add("sso_url", parameterToString(*r.ssoUrl, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "sso_url", r.ssoUrl, "") } if r.temporaryUserDeleteAfter != nil { - localVarQueryParams.Add("temporary_user_delete_after", parameterToString(*r.temporaryUserDeleteAfter, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "temporary_user_delete_after", r.temporaryUserDeleteAfter, "") } if r.userMatchingMode != nil { - localVarQueryParams.Add("user_matching_mode", parameterToString(*r.userMatchingMode, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "user_matching_mode", r.userMatchingMode, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -5825,9 +5890,9 @@ func (a *SourcesApiService) SourcesSamlListExecute(r ApiSourcesSamlListRequest) return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -5844,6 +5909,7 @@ func (a *SourcesApiService) SourcesSamlListExecute(r ApiSourcesSamlListRequest) newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -5854,6 +5920,7 @@ func (a *SourcesApiService) SourcesSamlListExecute(r ApiSourcesSamlListRequest) newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -5914,7 +5981,7 @@ func (a *SourcesApiService) SourcesSamlMetadataRetrieveExecute(r ApiSourcesSamlM } localVarPath := localBasePath + "/sources/saml/{slug}/metadata/" - localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterToString(r.slug, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterValueToString(r.slug, "slug")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -5961,9 +6028,9 @@ func (a *SourcesApiService) SourcesSamlMetadataRetrieveExecute(r ApiSourcesSamlM return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -5980,6 +6047,7 @@ func (a *SourcesApiService) SourcesSamlMetadataRetrieveExecute(r ApiSourcesSamlM newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -5990,6 +6058,7 @@ func (a *SourcesApiService) SourcesSamlMetadataRetrieveExecute(r ApiSourcesSamlM newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -6056,7 +6125,7 @@ func (a *SourcesApiService) SourcesSamlPartialUpdateExecute(r ApiSourcesSamlPart } localVarPath := localBasePath + "/sources/saml/{slug}/" - localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterToString(r.slug, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterValueToString(r.slug, "slug")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -6105,9 +6174,9 @@ func (a *SourcesApiService) SourcesSamlPartialUpdateExecute(r ApiSourcesSamlPart return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -6124,6 +6193,7 @@ func (a *SourcesApiService) SourcesSamlPartialUpdateExecute(r ApiSourcesSamlPart newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -6134,6 +6204,7 @@ func (a *SourcesApiService) SourcesSamlPartialUpdateExecute(r ApiSourcesSamlPart newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -6194,7 +6265,7 @@ func (a *SourcesApiService) SourcesSamlRetrieveExecute(r ApiSourcesSamlRetrieveR } localVarPath := localBasePath + "/sources/saml/{slug}/" - localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterToString(r.slug, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterValueToString(r.slug, "slug")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -6241,9 +6312,9 @@ func (a *SourcesApiService) SourcesSamlRetrieveExecute(r ApiSourcesSamlRetrieveR return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -6260,6 +6331,7 @@ func (a *SourcesApiService) SourcesSamlRetrieveExecute(r ApiSourcesSamlRetrieveR newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -6270,6 +6342,7 @@ func (a *SourcesApiService) SourcesSamlRetrieveExecute(r ApiSourcesSamlRetrieveR newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -6336,7 +6409,7 @@ func (a *SourcesApiService) SourcesSamlUpdateExecute(r ApiSourcesSamlUpdateReque } localVarPath := localBasePath + "/sources/saml/{slug}/" - localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterToString(r.slug, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterValueToString(r.slug, "slug")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -6388,9 +6461,9 @@ func (a *SourcesApiService) SourcesSamlUpdateExecute(r ApiSourcesSamlUpdateReque return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -6407,6 +6480,7 @@ func (a *SourcesApiService) SourcesSamlUpdateExecute(r ApiSourcesSamlUpdateReque newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -6417,6 +6491,7 @@ func (a *SourcesApiService) SourcesSamlUpdateExecute(r ApiSourcesSamlUpdateReque newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -6477,7 +6552,7 @@ func (a *SourcesApiService) SourcesSamlUsedByListExecute(r ApiSourcesSamlUsedByL } localVarPath := localBasePath + "/sources/saml/{slug}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterToString(r.slug, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", url.PathEscape(parameterValueToString(r.slug, "slug")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -6524,9 +6599,9 @@ func (a *SourcesApiService) SourcesSamlUsedByListExecute(r ApiSourcesSamlUsedByL return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -6543,6 +6618,7 @@ func (a *SourcesApiService) SourcesSamlUsedByListExecute(r ApiSourcesSamlUsedByL newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -6553,6 +6629,7 @@ func (a *SourcesApiService) SourcesSamlUsedByListExecute(r ApiSourcesSamlUsedByL newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -6611,7 +6688,7 @@ func (a *SourcesApiService) SourcesUserConnectionsAllDestroyExecute(r ApiSources } localVarPath := localBasePath + "/sources/user_connections/all/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -6658,9 +6735,9 @@ func (a *SourcesApiService) SourcesUserConnectionsAllDestroyExecute(r ApiSources return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -6677,6 +6754,7 @@ func (a *SourcesApiService) SourcesUserConnectionsAllDestroyExecute(r ApiSources newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -6687,6 +6765,7 @@ func (a *SourcesApiService) SourcesUserConnectionsAllDestroyExecute(r ApiSources newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -6775,19 +6854,19 @@ func (a *SourcesApiService) SourcesUserConnectionsAllListExecute(r ApiSourcesUse localVarFormParams := url.Values{} if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } if r.user != nil { - localVarQueryParams.Add("user", parameterToString(*r.user, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "user", r.user, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -6830,9 +6909,9 @@ func (a *SourcesApiService) SourcesUserConnectionsAllListExecute(r ApiSourcesUse return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -6849,6 +6928,7 @@ func (a *SourcesApiService) SourcesUserConnectionsAllListExecute(r ApiSourcesUse newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -6859,6 +6939,7 @@ func (a *SourcesApiService) SourcesUserConnectionsAllListExecute(r ApiSourcesUse newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -6919,7 +7000,7 @@ func (a *SourcesApiService) SourcesUserConnectionsAllPartialUpdateExecute(r ApiS } localVarPath := localBasePath + "/sources/user_connections/all/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -6966,9 +7047,9 @@ func (a *SourcesApiService) SourcesUserConnectionsAllPartialUpdateExecute(r ApiS return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -6985,6 +7066,7 @@ func (a *SourcesApiService) SourcesUserConnectionsAllPartialUpdateExecute(r ApiS newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -6995,6 +7077,7 @@ func (a *SourcesApiService) SourcesUserConnectionsAllPartialUpdateExecute(r ApiS newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -7055,7 +7138,7 @@ func (a *SourcesApiService) SourcesUserConnectionsAllRetrieveExecute(r ApiSource } localVarPath := localBasePath + "/sources/user_connections/all/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -7102,9 +7185,9 @@ func (a *SourcesApiService) SourcesUserConnectionsAllRetrieveExecute(r ApiSource return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -7121,6 +7204,7 @@ func (a *SourcesApiService) SourcesUserConnectionsAllRetrieveExecute(r ApiSource newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -7131,6 +7215,7 @@ func (a *SourcesApiService) SourcesUserConnectionsAllRetrieveExecute(r ApiSource newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -7191,7 +7276,7 @@ func (a *SourcesApiService) SourcesUserConnectionsAllUpdateExecute(r ApiSourcesU } localVarPath := localBasePath + "/sources/user_connections/all/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -7238,9 +7323,9 @@ func (a *SourcesApiService) SourcesUserConnectionsAllUpdateExecute(r ApiSourcesU return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -7257,6 +7342,7 @@ func (a *SourcesApiService) SourcesUserConnectionsAllUpdateExecute(r ApiSourcesU newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -7267,6 +7353,7 @@ func (a *SourcesApiService) SourcesUserConnectionsAllUpdateExecute(r ApiSourcesU newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -7327,7 +7414,7 @@ func (a *SourcesApiService) SourcesUserConnectionsAllUsedByListExecute(r ApiSour } localVarPath := localBasePath + "/sources/user_connections/all/{id}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -7374,9 +7461,9 @@ func (a *SourcesApiService) SourcesUserConnectionsAllUsedByListExecute(r ApiSour return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -7393,6 +7480,7 @@ func (a *SourcesApiService) SourcesUserConnectionsAllUsedByListExecute(r ApiSour newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -7403,6 +7491,7 @@ func (a *SourcesApiService) SourcesUserConnectionsAllUsedByListExecute(r ApiSour newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -7517,9 +7606,9 @@ func (a *SourcesApiService) SourcesUserConnectionsOauthCreateExecute(r ApiSource return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -7536,6 +7625,7 @@ func (a *SourcesApiService) SourcesUserConnectionsOauthCreateExecute(r ApiSource newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -7546,6 +7636,7 @@ func (a *SourcesApiService) SourcesUserConnectionsOauthCreateExecute(r ApiSource newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -7604,7 +7695,7 @@ func (a *SourcesApiService) SourcesUserConnectionsOauthDestroyExecute(r ApiSourc } localVarPath := localBasePath + "/sources/user_connections/oauth/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -7651,9 +7742,9 @@ func (a *SourcesApiService) SourcesUserConnectionsOauthDestroyExecute(r ApiSourc return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -7670,6 +7761,7 @@ func (a *SourcesApiService) SourcesUserConnectionsOauthDestroyExecute(r ApiSourc newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -7680,6 +7772,7 @@ func (a *SourcesApiService) SourcesUserConnectionsOauthDestroyExecute(r ApiSourc newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -7768,19 +7861,19 @@ func (a *SourcesApiService) SourcesUserConnectionsOauthListExecute(r ApiSourcesU localVarFormParams := url.Values{} if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } if r.sourceSlug != nil { - localVarQueryParams.Add("source__slug", parameterToString(*r.sourceSlug, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "source__slug", r.sourceSlug, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -7823,9 +7916,9 @@ func (a *SourcesApiService) SourcesUserConnectionsOauthListExecute(r ApiSourcesU return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -7842,6 +7935,7 @@ func (a *SourcesApiService) SourcesUserConnectionsOauthListExecute(r ApiSourcesU newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -7852,6 +7946,7 @@ func (a *SourcesApiService) SourcesUserConnectionsOauthListExecute(r ApiSourcesU newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -7918,7 +8013,7 @@ func (a *SourcesApiService) SourcesUserConnectionsOauthPartialUpdateExecute(r Ap } localVarPath := localBasePath + "/sources/user_connections/oauth/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -7967,9 +8062,9 @@ func (a *SourcesApiService) SourcesUserConnectionsOauthPartialUpdateExecute(r Ap return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -7986,6 +8081,7 @@ func (a *SourcesApiService) SourcesUserConnectionsOauthPartialUpdateExecute(r Ap newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -7996,6 +8092,7 @@ func (a *SourcesApiService) SourcesUserConnectionsOauthPartialUpdateExecute(r Ap newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -8056,7 +8153,7 @@ func (a *SourcesApiService) SourcesUserConnectionsOauthRetrieveExecute(r ApiSour } localVarPath := localBasePath + "/sources/user_connections/oauth/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -8103,9 +8200,9 @@ func (a *SourcesApiService) SourcesUserConnectionsOauthRetrieveExecute(r ApiSour return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -8122,6 +8219,7 @@ func (a *SourcesApiService) SourcesUserConnectionsOauthRetrieveExecute(r ApiSour newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -8132,6 +8230,7 @@ func (a *SourcesApiService) SourcesUserConnectionsOauthRetrieveExecute(r ApiSour newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -8198,7 +8297,7 @@ func (a *SourcesApiService) SourcesUserConnectionsOauthUpdateExecute(r ApiSource } localVarPath := localBasePath + "/sources/user_connections/oauth/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -8250,9 +8349,9 @@ func (a *SourcesApiService) SourcesUserConnectionsOauthUpdateExecute(r ApiSource return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -8269,6 +8368,7 @@ func (a *SourcesApiService) SourcesUserConnectionsOauthUpdateExecute(r ApiSource newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -8279,6 +8379,7 @@ func (a *SourcesApiService) SourcesUserConnectionsOauthUpdateExecute(r ApiSource newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -8339,7 +8440,7 @@ func (a *SourcesApiService) SourcesUserConnectionsOauthUsedByListExecute(r ApiSo } localVarPath := localBasePath + "/sources/user_connections/oauth/{id}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -8386,9 +8487,9 @@ func (a *SourcesApiService) SourcesUserConnectionsOauthUsedByListExecute(r ApiSo return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -8405,6 +8506,7 @@ func (a *SourcesApiService) SourcesUserConnectionsOauthUsedByListExecute(r ApiSo newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -8415,6 +8517,7 @@ func (a *SourcesApiService) SourcesUserConnectionsOauthUsedByListExecute(r ApiSo newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -8529,9 +8632,9 @@ func (a *SourcesApiService) SourcesUserConnectionsPlexCreateExecute(r ApiSources return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -8548,6 +8651,7 @@ func (a *SourcesApiService) SourcesUserConnectionsPlexCreateExecute(r ApiSources newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -8558,6 +8662,7 @@ func (a *SourcesApiService) SourcesUserConnectionsPlexCreateExecute(r ApiSources newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -8616,7 +8721,7 @@ func (a *SourcesApiService) SourcesUserConnectionsPlexDestroyExecute(r ApiSource } localVarPath := localBasePath + "/sources/user_connections/plex/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -8663,9 +8768,9 @@ func (a *SourcesApiService) SourcesUserConnectionsPlexDestroyExecute(r ApiSource return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -8682,6 +8787,7 @@ func (a *SourcesApiService) SourcesUserConnectionsPlexDestroyExecute(r ApiSource newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -8692,6 +8798,7 @@ func (a *SourcesApiService) SourcesUserConnectionsPlexDestroyExecute(r ApiSource newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -8780,19 +8887,19 @@ func (a *SourcesApiService) SourcesUserConnectionsPlexListExecute(r ApiSourcesUs localVarFormParams := url.Values{} if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } if r.sourceSlug != nil { - localVarQueryParams.Add("source__slug", parameterToString(*r.sourceSlug, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "source__slug", r.sourceSlug, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -8835,9 +8942,9 @@ func (a *SourcesApiService) SourcesUserConnectionsPlexListExecute(r ApiSourcesUs return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -8854,6 +8961,7 @@ func (a *SourcesApiService) SourcesUserConnectionsPlexListExecute(r ApiSourcesUs newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -8864,6 +8972,7 @@ func (a *SourcesApiService) SourcesUserConnectionsPlexListExecute(r ApiSourcesUs newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -8930,7 +9039,7 @@ func (a *SourcesApiService) SourcesUserConnectionsPlexPartialUpdateExecute(r Api } localVarPath := localBasePath + "/sources/user_connections/plex/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -8979,9 +9088,9 @@ func (a *SourcesApiService) SourcesUserConnectionsPlexPartialUpdateExecute(r Api return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -8998,6 +9107,7 @@ func (a *SourcesApiService) SourcesUserConnectionsPlexPartialUpdateExecute(r Api newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -9008,6 +9118,7 @@ func (a *SourcesApiService) SourcesUserConnectionsPlexPartialUpdateExecute(r Api newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -9068,7 +9179,7 @@ func (a *SourcesApiService) SourcesUserConnectionsPlexRetrieveExecute(r ApiSourc } localVarPath := localBasePath + "/sources/user_connections/plex/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -9115,9 +9226,9 @@ func (a *SourcesApiService) SourcesUserConnectionsPlexRetrieveExecute(r ApiSourc return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -9134,6 +9245,7 @@ func (a *SourcesApiService) SourcesUserConnectionsPlexRetrieveExecute(r ApiSourc newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -9144,6 +9256,7 @@ func (a *SourcesApiService) SourcesUserConnectionsPlexRetrieveExecute(r ApiSourc newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -9210,7 +9323,7 @@ func (a *SourcesApiService) SourcesUserConnectionsPlexUpdateExecute(r ApiSources } localVarPath := localBasePath + "/sources/user_connections/plex/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -9262,9 +9375,9 @@ func (a *SourcesApiService) SourcesUserConnectionsPlexUpdateExecute(r ApiSources return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -9281,6 +9394,7 @@ func (a *SourcesApiService) SourcesUserConnectionsPlexUpdateExecute(r ApiSources newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -9291,6 +9405,7 @@ func (a *SourcesApiService) SourcesUserConnectionsPlexUpdateExecute(r ApiSources newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -9351,7 +9466,7 @@ func (a *SourcesApiService) SourcesUserConnectionsPlexUsedByListExecute(r ApiSou } localVarPath := localBasePath + "/sources/user_connections/plex/{id}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -9398,9 +9513,9 @@ func (a *SourcesApiService) SourcesUserConnectionsPlexUsedByListExecute(r ApiSou return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -9417,6 +9532,7 @@ func (a *SourcesApiService) SourcesUserConnectionsPlexUsedByListExecute(r ApiSou newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -9427,6 +9543,7 @@ func (a *SourcesApiService) SourcesUserConnectionsPlexUsedByListExecute(r ApiSou newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -9541,9 +9658,9 @@ func (a *SourcesApiService) SourcesUserConnectionsSamlCreateExecute(r ApiSources return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -9560,6 +9677,7 @@ func (a *SourcesApiService) SourcesUserConnectionsSamlCreateExecute(r ApiSources newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -9570,6 +9688,7 @@ func (a *SourcesApiService) SourcesUserConnectionsSamlCreateExecute(r ApiSources newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -9628,7 +9747,7 @@ func (a *SourcesApiService) SourcesUserConnectionsSamlDestroyExecute(r ApiSource } localVarPath := localBasePath + "/sources/user_connections/saml/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -9675,9 +9794,9 @@ func (a *SourcesApiService) SourcesUserConnectionsSamlDestroyExecute(r ApiSource return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -9694,6 +9813,7 @@ func (a *SourcesApiService) SourcesUserConnectionsSamlDestroyExecute(r ApiSource newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -9704,6 +9824,7 @@ func (a *SourcesApiService) SourcesUserConnectionsSamlDestroyExecute(r ApiSource newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -9792,19 +9913,19 @@ func (a *SourcesApiService) SourcesUserConnectionsSamlListExecute(r ApiSourcesUs localVarFormParams := url.Values{} if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } if r.sourceSlug != nil { - localVarQueryParams.Add("source__slug", parameterToString(*r.sourceSlug, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "source__slug", r.sourceSlug, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -9847,9 +9968,9 @@ func (a *SourcesApiService) SourcesUserConnectionsSamlListExecute(r ApiSourcesUs return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -9866,6 +9987,7 @@ func (a *SourcesApiService) SourcesUserConnectionsSamlListExecute(r ApiSourcesUs newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -9876,6 +9998,7 @@ func (a *SourcesApiService) SourcesUserConnectionsSamlListExecute(r ApiSourcesUs newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -9942,7 +10065,7 @@ func (a *SourcesApiService) SourcesUserConnectionsSamlPartialUpdateExecute(r Api } localVarPath := localBasePath + "/sources/user_connections/saml/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -9991,9 +10114,9 @@ func (a *SourcesApiService) SourcesUserConnectionsSamlPartialUpdateExecute(r Api return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -10010,6 +10133,7 @@ func (a *SourcesApiService) SourcesUserConnectionsSamlPartialUpdateExecute(r Api newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -10020,6 +10144,7 @@ func (a *SourcesApiService) SourcesUserConnectionsSamlPartialUpdateExecute(r Api newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -10080,7 +10205,7 @@ func (a *SourcesApiService) SourcesUserConnectionsSamlRetrieveExecute(r ApiSourc } localVarPath := localBasePath + "/sources/user_connections/saml/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -10127,9 +10252,9 @@ func (a *SourcesApiService) SourcesUserConnectionsSamlRetrieveExecute(r ApiSourc return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -10146,6 +10271,7 @@ func (a *SourcesApiService) SourcesUserConnectionsSamlRetrieveExecute(r ApiSourc newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -10156,6 +10282,7 @@ func (a *SourcesApiService) SourcesUserConnectionsSamlRetrieveExecute(r ApiSourc newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -10222,7 +10349,7 @@ func (a *SourcesApiService) SourcesUserConnectionsSamlUpdateExecute(r ApiSources } localVarPath := localBasePath + "/sources/user_connections/saml/{id}/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -10274,9 +10401,9 @@ func (a *SourcesApiService) SourcesUserConnectionsSamlUpdateExecute(r ApiSources return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -10293,6 +10420,7 @@ func (a *SourcesApiService) SourcesUserConnectionsSamlUpdateExecute(r ApiSources newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -10303,6 +10431,7 @@ func (a *SourcesApiService) SourcesUserConnectionsSamlUpdateExecute(r ApiSources newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -10363,7 +10492,7 @@ func (a *SourcesApiService) SourcesUserConnectionsSamlUsedByListExecute(r ApiSou } localVarPath := localBasePath + "/sources/user_connections/saml/{id}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -10410,9 +10539,9 @@ func (a *SourcesApiService) SourcesUserConnectionsSamlUsedByListExecute(r ApiSou return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -10429,6 +10558,7 @@ func (a *SourcesApiService) SourcesUserConnectionsSamlUsedByListExecute(r ApiSou newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -10439,6 +10569,7 @@ func (a *SourcesApiService) SourcesUserConnectionsSamlUsedByListExecute(r ApiSou newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr diff --git a/api_stages.go b/api_stages.go index ff8365625..ae9437a05 100644 --- a/api_stages.go +++ b/api_stages.go @@ -14,7 +14,7 @@ package api import ( "bytes" "context" - "io/ioutil" + "io" "net/http" "net/url" "reflect" @@ -66,7 +66,7 @@ func (a *StagesApiService) StagesAllDestroyExecute(r ApiStagesAllDestroyRequest) } localVarPath := localBasePath + "/stages/all/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -113,9 +113,9 @@ func (a *StagesApiService) StagesAllDestroyExecute(r ApiStagesAllDestroyRequest) return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -132,6 +132,7 @@ func (a *StagesApiService) StagesAllDestroyExecute(r ApiStagesAllDestroyRequest) newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -142,6 +143,7 @@ func (a *StagesApiService) StagesAllDestroyExecute(r ApiStagesAllDestroyRequest) newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -230,19 +232,19 @@ func (a *StagesApiService) StagesAllListExecute(r ApiStagesAllListRequest) (*Pag localVarFormParams := url.Values{} if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -285,9 +287,9 @@ func (a *StagesApiService) StagesAllListExecute(r ApiStagesAllListRequest) (*Pag return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -304,6 +306,7 @@ func (a *StagesApiService) StagesAllListExecute(r ApiStagesAllListRequest) (*Pag newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -314,6 +317,7 @@ func (a *StagesApiService) StagesAllListExecute(r ApiStagesAllListRequest) (*Pag newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -374,7 +378,7 @@ func (a *StagesApiService) StagesAllRetrieveExecute(r ApiStagesAllRetrieveReques } localVarPath := localBasePath + "/stages/all/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -421,9 +425,9 @@ func (a *StagesApiService) StagesAllRetrieveExecute(r ApiStagesAllRetrieveReques return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -440,6 +444,7 @@ func (a *StagesApiService) StagesAllRetrieveExecute(r ApiStagesAllRetrieveReques newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -450,6 +455,7 @@ func (a *StagesApiService) StagesAllRetrieveExecute(r ApiStagesAllRetrieveReques newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -553,9 +559,9 @@ func (a *StagesApiService) StagesAllTypesListExecute(r ApiStagesAllTypesListRequ return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -572,6 +578,7 @@ func (a *StagesApiService) StagesAllTypesListExecute(r ApiStagesAllTypesListRequ newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -582,6 +589,7 @@ func (a *StagesApiService) StagesAllTypesListExecute(r ApiStagesAllTypesListRequ newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -642,7 +650,7 @@ func (a *StagesApiService) StagesAllUsedByListExecute(r ApiStagesAllUsedByListRe } localVarPath := localBasePath + "/stages/all/{stage_uuid}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -689,9 +697,9 @@ func (a *StagesApiService) StagesAllUsedByListExecute(r ApiStagesAllUsedByListRe return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -708,6 +716,7 @@ func (a *StagesApiService) StagesAllUsedByListExecute(r ApiStagesAllUsedByListRe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -718,6 +727,7 @@ func (a *StagesApiService) StagesAllUsedByListExecute(r ApiStagesAllUsedByListRe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -821,9 +831,9 @@ func (a *StagesApiService) StagesAllUserSettingsListExecute(r ApiStagesAllUserSe return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -840,6 +850,7 @@ func (a *StagesApiService) StagesAllUserSettingsListExecute(r ApiStagesAllUserSe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -850,6 +861,7 @@ func (a *StagesApiService) StagesAllUserSettingsListExecute(r ApiStagesAllUserSe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -964,9 +976,9 @@ func (a *StagesApiService) StagesAuthenticatorDuoCreateExecute(r ApiStagesAuthen return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -983,6 +995,7 @@ func (a *StagesApiService) StagesAuthenticatorDuoCreateExecute(r ApiStagesAuthen newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -993,6 +1006,7 @@ func (a *StagesApiService) StagesAuthenticatorDuoCreateExecute(r ApiStagesAuthen newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1051,7 +1065,7 @@ func (a *StagesApiService) StagesAuthenticatorDuoDestroyExecute(r ApiStagesAuthe } localVarPath := localBasePath + "/stages/authenticator/duo/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1098,9 +1112,9 @@ func (a *StagesApiService) StagesAuthenticatorDuoDestroyExecute(r ApiStagesAuthe return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -1117,6 +1131,7 @@ func (a *StagesApiService) StagesAuthenticatorDuoDestroyExecute(r ApiStagesAuthe newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -1127,6 +1142,7 @@ func (a *StagesApiService) StagesAuthenticatorDuoDestroyExecute(r ApiStagesAuthe newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -1178,7 +1194,7 @@ func (a *StagesApiService) StagesAuthenticatorDuoEnrollmentStatusCreateExecute(r } localVarPath := localBasePath + "/stages/authenticator/duo/{stage_uuid}/enrollment_status/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1225,9 +1241,9 @@ func (a *StagesApiService) StagesAuthenticatorDuoEnrollmentStatusCreateExecute(r return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1244,6 +1260,7 @@ func (a *StagesApiService) StagesAuthenticatorDuoEnrollmentStatusCreateExecute(r newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1254,6 +1271,7 @@ func (a *StagesApiService) StagesAuthenticatorDuoEnrollmentStatusCreateExecute(r newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1318,7 +1336,7 @@ func (a *StagesApiService) StagesAuthenticatorDuoImportDeviceManualCreateExecute } localVarPath := localBasePath + "/stages/authenticator/duo/{stage_uuid}/import_device_manual/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1370,9 +1388,9 @@ func (a *StagesApiService) StagesAuthenticatorDuoImportDeviceManualCreateExecute return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -1389,6 +1407,7 @@ func (a *StagesApiService) StagesAuthenticatorDuoImportDeviceManualCreateExecute newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -1440,7 +1459,7 @@ func (a *StagesApiService) StagesAuthenticatorDuoImportDevicesAutomaticCreateExe } localVarPath := localBasePath + "/stages/authenticator/duo/{stage_uuid}/import_devices_automatic/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1487,9 +1506,9 @@ func (a *StagesApiService) StagesAuthenticatorDuoImportDevicesAutomaticCreateExe return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1506,6 +1525,7 @@ func (a *StagesApiService) StagesAuthenticatorDuoImportDevicesAutomaticCreateExe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1621,28 +1641,28 @@ func (a *StagesApiService) StagesAuthenticatorDuoListExecute(r ApiStagesAuthenti localVarFormParams := url.Values{} if r.apiHostname != nil { - localVarQueryParams.Add("api_hostname", parameterToString(*r.apiHostname, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "api_hostname", r.apiHostname, "") } if r.clientId != nil { - localVarQueryParams.Add("client_id", parameterToString(*r.clientId, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "client_id", r.clientId, "") } if r.configureFlow != nil { - localVarQueryParams.Add("configure_flow", parameterToString(*r.configureFlow, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "configure_flow", r.configureFlow, "") } if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1685,9 +1705,9 @@ func (a *StagesApiService) StagesAuthenticatorDuoListExecute(r ApiStagesAuthenti return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1704,6 +1724,7 @@ func (a *StagesApiService) StagesAuthenticatorDuoListExecute(r ApiStagesAuthenti newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1714,6 +1735,7 @@ func (a *StagesApiService) StagesAuthenticatorDuoListExecute(r ApiStagesAuthenti newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1780,7 +1802,7 @@ func (a *StagesApiService) StagesAuthenticatorDuoPartialUpdateExecute(r ApiStage } localVarPath := localBasePath + "/stages/authenticator/duo/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1829,9 +1851,9 @@ func (a *StagesApiService) StagesAuthenticatorDuoPartialUpdateExecute(r ApiStage return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1848,6 +1870,7 @@ func (a *StagesApiService) StagesAuthenticatorDuoPartialUpdateExecute(r ApiStage newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1858,6 +1881,7 @@ func (a *StagesApiService) StagesAuthenticatorDuoPartialUpdateExecute(r ApiStage newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -1918,7 +1942,7 @@ func (a *StagesApiService) StagesAuthenticatorDuoRetrieveExecute(r ApiStagesAuth } localVarPath := localBasePath + "/stages/authenticator/duo/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1965,9 +1989,9 @@ func (a *StagesApiService) StagesAuthenticatorDuoRetrieveExecute(r ApiStagesAuth return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -1984,6 +2008,7 @@ func (a *StagesApiService) StagesAuthenticatorDuoRetrieveExecute(r ApiStagesAuth newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1994,6 +2019,7 @@ func (a *StagesApiService) StagesAuthenticatorDuoRetrieveExecute(r ApiStagesAuth newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2060,7 +2086,7 @@ func (a *StagesApiService) StagesAuthenticatorDuoUpdateExecute(r ApiStagesAuthen } localVarPath := localBasePath + "/stages/authenticator/duo/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2112,9 +2138,9 @@ func (a *StagesApiService) StagesAuthenticatorDuoUpdateExecute(r ApiStagesAuthen return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2131,6 +2157,7 @@ func (a *StagesApiService) StagesAuthenticatorDuoUpdateExecute(r ApiStagesAuthen newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2141,6 +2168,7 @@ func (a *StagesApiService) StagesAuthenticatorDuoUpdateExecute(r ApiStagesAuthen newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2201,7 +2229,7 @@ func (a *StagesApiService) StagesAuthenticatorDuoUsedByListExecute(r ApiStagesAu } localVarPath := localBasePath + "/stages/authenticator/duo/{stage_uuid}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2248,9 +2276,9 @@ func (a *StagesApiService) StagesAuthenticatorDuoUsedByListExecute(r ApiStagesAu return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2267,6 +2295,7 @@ func (a *StagesApiService) StagesAuthenticatorDuoUsedByListExecute(r ApiStagesAu newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2277,6 +2306,7 @@ func (a *StagesApiService) StagesAuthenticatorDuoUsedByListExecute(r ApiStagesAu newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2391,9 +2421,9 @@ func (a *StagesApiService) StagesAuthenticatorSmsCreateExecute(r ApiStagesAuthen return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2410,6 +2440,7 @@ func (a *StagesApiService) StagesAuthenticatorSmsCreateExecute(r ApiStagesAuthen newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2420,6 +2451,7 @@ func (a *StagesApiService) StagesAuthenticatorSmsCreateExecute(r ApiStagesAuthen newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2478,7 +2510,7 @@ func (a *StagesApiService) StagesAuthenticatorSmsDestroyExecute(r ApiStagesAuthe } localVarPath := localBasePath + "/stages/authenticator/sms/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2525,9 +2557,9 @@ func (a *StagesApiService) StagesAuthenticatorSmsDestroyExecute(r ApiStagesAuthe return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -2544,6 +2576,7 @@ func (a *StagesApiService) StagesAuthenticatorSmsDestroyExecute(r ApiStagesAuthe newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -2554,6 +2587,7 @@ func (a *StagesApiService) StagesAuthenticatorSmsDestroyExecute(r ApiStagesAuthe newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -2704,49 +2738,49 @@ func (a *StagesApiService) StagesAuthenticatorSmsListExecute(r ApiStagesAuthenti localVarFormParams := url.Values{} if r.accountSid != nil { - localVarQueryParams.Add("account_sid", parameterToString(*r.accountSid, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "account_sid", r.accountSid, "") } if r.auth != nil { - localVarQueryParams.Add("auth", parameterToString(*r.auth, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "auth", r.auth, "") } if r.authPassword != nil { - localVarQueryParams.Add("auth_password", parameterToString(*r.authPassword, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "auth_password", r.authPassword, "") } if r.authType != nil { - localVarQueryParams.Add("auth_type", parameterToString(*r.authType, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "auth_type", r.authType, "") } if r.configureFlow != nil { - localVarQueryParams.Add("configure_flow", parameterToString(*r.configureFlow, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "configure_flow", r.configureFlow, "") } if r.fromNumber != nil { - localVarQueryParams.Add("from_number", parameterToString(*r.fromNumber, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "from_number", r.fromNumber, "") } if r.mapping != nil { - localVarQueryParams.Add("mapping", parameterToString(*r.mapping, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "mapping", r.mapping, "") } if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.provider != nil { - localVarQueryParams.Add("provider", parameterToString(*r.provider, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "provider", r.provider, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } if r.stageUuid != nil { - localVarQueryParams.Add("stage_uuid", parameterToString(*r.stageUuid, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "stage_uuid", r.stageUuid, "") } if r.verifyOnly != nil { - localVarQueryParams.Add("verify_only", parameterToString(*r.verifyOnly, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "verify_only", r.verifyOnly, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -2789,9 +2823,9 @@ func (a *StagesApiService) StagesAuthenticatorSmsListExecute(r ApiStagesAuthenti return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2808,6 +2842,7 @@ func (a *StagesApiService) StagesAuthenticatorSmsListExecute(r ApiStagesAuthenti newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2818,6 +2853,7 @@ func (a *StagesApiService) StagesAuthenticatorSmsListExecute(r ApiStagesAuthenti newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -2884,7 +2920,7 @@ func (a *StagesApiService) StagesAuthenticatorSmsPartialUpdateExecute(r ApiStage } localVarPath := localBasePath + "/stages/authenticator/sms/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2933,9 +2969,9 @@ func (a *StagesApiService) StagesAuthenticatorSmsPartialUpdateExecute(r ApiStage return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -2952,6 +2988,7 @@ func (a *StagesApiService) StagesAuthenticatorSmsPartialUpdateExecute(r ApiStage newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2962,6 +2999,7 @@ func (a *StagesApiService) StagesAuthenticatorSmsPartialUpdateExecute(r ApiStage newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3022,7 +3060,7 @@ func (a *StagesApiService) StagesAuthenticatorSmsRetrieveExecute(r ApiStagesAuth } localVarPath := localBasePath + "/stages/authenticator/sms/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -3069,9 +3107,9 @@ func (a *StagesApiService) StagesAuthenticatorSmsRetrieveExecute(r ApiStagesAuth return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -3088,6 +3126,7 @@ func (a *StagesApiService) StagesAuthenticatorSmsRetrieveExecute(r ApiStagesAuth newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -3098,6 +3137,7 @@ func (a *StagesApiService) StagesAuthenticatorSmsRetrieveExecute(r ApiStagesAuth newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3164,7 +3204,7 @@ func (a *StagesApiService) StagesAuthenticatorSmsUpdateExecute(r ApiStagesAuthen } localVarPath := localBasePath + "/stages/authenticator/sms/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -3216,9 +3256,9 @@ func (a *StagesApiService) StagesAuthenticatorSmsUpdateExecute(r ApiStagesAuthen return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -3235,6 +3275,7 @@ func (a *StagesApiService) StagesAuthenticatorSmsUpdateExecute(r ApiStagesAuthen newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -3245,6 +3286,7 @@ func (a *StagesApiService) StagesAuthenticatorSmsUpdateExecute(r ApiStagesAuthen newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3305,7 +3347,7 @@ func (a *StagesApiService) StagesAuthenticatorSmsUsedByListExecute(r ApiStagesAu } localVarPath := localBasePath + "/stages/authenticator/sms/{stage_uuid}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -3352,9 +3394,9 @@ func (a *StagesApiService) StagesAuthenticatorSmsUsedByListExecute(r ApiStagesAu return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -3371,6 +3413,7 @@ func (a *StagesApiService) StagesAuthenticatorSmsUsedByListExecute(r ApiStagesAu newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -3381,6 +3424,7 @@ func (a *StagesApiService) StagesAuthenticatorSmsUsedByListExecute(r ApiStagesAu newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3495,9 +3539,9 @@ func (a *StagesApiService) StagesAuthenticatorStaticCreateExecute(r ApiStagesAut return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -3514,6 +3558,7 @@ func (a *StagesApiService) StagesAuthenticatorStaticCreateExecute(r ApiStagesAut newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -3524,6 +3569,7 @@ func (a *StagesApiService) StagesAuthenticatorStaticCreateExecute(r ApiStagesAut newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3582,7 +3628,7 @@ func (a *StagesApiService) StagesAuthenticatorStaticDestroyExecute(r ApiStagesAu } localVarPath := localBasePath + "/stages/authenticator/static/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -3629,9 +3675,9 @@ func (a *StagesApiService) StagesAuthenticatorStaticDestroyExecute(r ApiStagesAu return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -3648,6 +3694,7 @@ func (a *StagesApiService) StagesAuthenticatorStaticDestroyExecute(r ApiStagesAu newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -3658,6 +3705,7 @@ func (a *StagesApiService) StagesAuthenticatorStaticDestroyExecute(r ApiStagesAu newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -3764,28 +3812,28 @@ func (a *StagesApiService) StagesAuthenticatorStaticListExecute(r ApiStagesAuthe localVarFormParams := url.Values{} if r.configureFlow != nil { - localVarQueryParams.Add("configure_flow", parameterToString(*r.configureFlow, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "configure_flow", r.configureFlow, "") } if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } if r.stageUuid != nil { - localVarQueryParams.Add("stage_uuid", parameterToString(*r.stageUuid, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "stage_uuid", r.stageUuid, "") } if r.tokenCount != nil { - localVarQueryParams.Add("token_count", parameterToString(*r.tokenCount, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "token_count", r.tokenCount, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -3828,9 +3876,9 @@ func (a *StagesApiService) StagesAuthenticatorStaticListExecute(r ApiStagesAuthe return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -3847,6 +3895,7 @@ func (a *StagesApiService) StagesAuthenticatorStaticListExecute(r ApiStagesAuthe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -3857,6 +3906,7 @@ func (a *StagesApiService) StagesAuthenticatorStaticListExecute(r ApiStagesAuthe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -3923,7 +3973,7 @@ func (a *StagesApiService) StagesAuthenticatorStaticPartialUpdateExecute(r ApiSt } localVarPath := localBasePath + "/stages/authenticator/static/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -3972,9 +4022,9 @@ func (a *StagesApiService) StagesAuthenticatorStaticPartialUpdateExecute(r ApiSt return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -3991,6 +4041,7 @@ func (a *StagesApiService) StagesAuthenticatorStaticPartialUpdateExecute(r ApiSt newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -4001,6 +4052,7 @@ func (a *StagesApiService) StagesAuthenticatorStaticPartialUpdateExecute(r ApiSt newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -4061,7 +4113,7 @@ func (a *StagesApiService) StagesAuthenticatorStaticRetrieveExecute(r ApiStagesA } localVarPath := localBasePath + "/stages/authenticator/static/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -4108,9 +4160,9 @@ func (a *StagesApiService) StagesAuthenticatorStaticRetrieveExecute(r ApiStagesA return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -4127,6 +4179,7 @@ func (a *StagesApiService) StagesAuthenticatorStaticRetrieveExecute(r ApiStagesA newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -4137,6 +4190,7 @@ func (a *StagesApiService) StagesAuthenticatorStaticRetrieveExecute(r ApiStagesA newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -4203,7 +4257,7 @@ func (a *StagesApiService) StagesAuthenticatorStaticUpdateExecute(r ApiStagesAut } localVarPath := localBasePath + "/stages/authenticator/static/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -4255,9 +4309,9 @@ func (a *StagesApiService) StagesAuthenticatorStaticUpdateExecute(r ApiStagesAut return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -4274,6 +4328,7 @@ func (a *StagesApiService) StagesAuthenticatorStaticUpdateExecute(r ApiStagesAut newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -4284,6 +4339,7 @@ func (a *StagesApiService) StagesAuthenticatorStaticUpdateExecute(r ApiStagesAut newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -4344,7 +4400,7 @@ func (a *StagesApiService) StagesAuthenticatorStaticUsedByListExecute(r ApiStage } localVarPath := localBasePath + "/stages/authenticator/static/{stage_uuid}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -4391,9 +4447,9 @@ func (a *StagesApiService) StagesAuthenticatorStaticUsedByListExecute(r ApiStage return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -4410,6 +4466,7 @@ func (a *StagesApiService) StagesAuthenticatorStaticUsedByListExecute(r ApiStage newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -4420,6 +4477,7 @@ func (a *StagesApiService) StagesAuthenticatorStaticUsedByListExecute(r ApiStage newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -4534,9 +4592,9 @@ func (a *StagesApiService) StagesAuthenticatorTotpCreateExecute(r ApiStagesAuthe return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -4553,6 +4611,7 @@ func (a *StagesApiService) StagesAuthenticatorTotpCreateExecute(r ApiStagesAuthe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -4563,6 +4622,7 @@ func (a *StagesApiService) StagesAuthenticatorTotpCreateExecute(r ApiStagesAuthe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -4621,7 +4681,7 @@ func (a *StagesApiService) StagesAuthenticatorTotpDestroyExecute(r ApiStagesAuth } localVarPath := localBasePath + "/stages/authenticator/totp/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -4668,9 +4728,9 @@ func (a *StagesApiService) StagesAuthenticatorTotpDestroyExecute(r ApiStagesAuth return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -4687,6 +4747,7 @@ func (a *StagesApiService) StagesAuthenticatorTotpDestroyExecute(r ApiStagesAuth newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -4697,6 +4758,7 @@ func (a *StagesApiService) StagesAuthenticatorTotpDestroyExecute(r ApiStagesAuth newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -4804,28 +4866,28 @@ func (a *StagesApiService) StagesAuthenticatorTotpListExecute(r ApiStagesAuthent localVarFormParams := url.Values{} if r.configureFlow != nil { - localVarQueryParams.Add("configure_flow", parameterToString(*r.configureFlow, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "configure_flow", r.configureFlow, "") } if r.digits != nil { - localVarQueryParams.Add("digits", parameterToString(*r.digits, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "digits", r.digits, "") } if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } if r.stageUuid != nil { - localVarQueryParams.Add("stage_uuid", parameterToString(*r.stageUuid, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "stage_uuid", r.stageUuid, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -4868,9 +4930,9 @@ func (a *StagesApiService) StagesAuthenticatorTotpListExecute(r ApiStagesAuthent return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -4887,6 +4949,7 @@ func (a *StagesApiService) StagesAuthenticatorTotpListExecute(r ApiStagesAuthent newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -4897,6 +4960,7 @@ func (a *StagesApiService) StagesAuthenticatorTotpListExecute(r ApiStagesAuthent newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -4963,7 +5027,7 @@ func (a *StagesApiService) StagesAuthenticatorTotpPartialUpdateExecute(r ApiStag } localVarPath := localBasePath + "/stages/authenticator/totp/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -5012,9 +5076,9 @@ func (a *StagesApiService) StagesAuthenticatorTotpPartialUpdateExecute(r ApiStag return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -5031,6 +5095,7 @@ func (a *StagesApiService) StagesAuthenticatorTotpPartialUpdateExecute(r ApiStag newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -5041,6 +5106,7 @@ func (a *StagesApiService) StagesAuthenticatorTotpPartialUpdateExecute(r ApiStag newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -5101,7 +5167,7 @@ func (a *StagesApiService) StagesAuthenticatorTotpRetrieveExecute(r ApiStagesAut } localVarPath := localBasePath + "/stages/authenticator/totp/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -5148,9 +5214,9 @@ func (a *StagesApiService) StagesAuthenticatorTotpRetrieveExecute(r ApiStagesAut return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -5167,6 +5233,7 @@ func (a *StagesApiService) StagesAuthenticatorTotpRetrieveExecute(r ApiStagesAut newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -5177,6 +5244,7 @@ func (a *StagesApiService) StagesAuthenticatorTotpRetrieveExecute(r ApiStagesAut newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -5243,7 +5311,7 @@ func (a *StagesApiService) StagesAuthenticatorTotpUpdateExecute(r ApiStagesAuthe } localVarPath := localBasePath + "/stages/authenticator/totp/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -5295,9 +5363,9 @@ func (a *StagesApiService) StagesAuthenticatorTotpUpdateExecute(r ApiStagesAuthe return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -5314,6 +5382,7 @@ func (a *StagesApiService) StagesAuthenticatorTotpUpdateExecute(r ApiStagesAuthe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -5324,6 +5393,7 @@ func (a *StagesApiService) StagesAuthenticatorTotpUpdateExecute(r ApiStagesAuthe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -5384,7 +5454,7 @@ func (a *StagesApiService) StagesAuthenticatorTotpUsedByListExecute(r ApiStagesA } localVarPath := localBasePath + "/stages/authenticator/totp/{stage_uuid}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -5431,9 +5501,9 @@ func (a *StagesApiService) StagesAuthenticatorTotpUsedByListExecute(r ApiStagesA return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -5450,6 +5520,7 @@ func (a *StagesApiService) StagesAuthenticatorTotpUsedByListExecute(r ApiStagesA newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -5460,6 +5531,7 @@ func (a *StagesApiService) StagesAuthenticatorTotpUsedByListExecute(r ApiStagesA newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -5574,9 +5646,9 @@ func (a *StagesApiService) StagesAuthenticatorValidateCreateExecute(r ApiStagesA return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -5593,6 +5665,7 @@ func (a *StagesApiService) StagesAuthenticatorValidateCreateExecute(r ApiStagesA newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -5603,6 +5676,7 @@ func (a *StagesApiService) StagesAuthenticatorValidateCreateExecute(r ApiStagesA newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -5661,7 +5735,7 @@ func (a *StagesApiService) StagesAuthenticatorValidateDestroyExecute(r ApiStages } localVarPath := localBasePath + "/stages/authenticator/validate/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -5708,9 +5782,9 @@ func (a *StagesApiService) StagesAuthenticatorValidateDestroyExecute(r ApiStages return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -5727,6 +5801,7 @@ func (a *StagesApiService) StagesAuthenticatorValidateDestroyExecute(r ApiStages newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -5737,6 +5812,7 @@ func (a *StagesApiService) StagesAuthenticatorValidateDestroyExecute(r ApiStages newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -5842,29 +5918,29 @@ func (a *StagesApiService) StagesAuthenticatorValidateListExecute(r ApiStagesAut if reflect.TypeOf(t).Kind() == reflect.Slice { s := reflect.ValueOf(t) for i := 0; i < s.Len(); i++ { - localVarQueryParams.Add("configuration_stages", parameterToString(s.Index(i), "multi")) + parameterAddToHeaderOrQuery(localVarQueryParams, "configuration_stages", s.Index(i), "multi") } } else { - localVarQueryParams.Add("configuration_stages", parameterToString(t, "multi")) + parameterAddToHeaderOrQuery(localVarQueryParams, "configuration_stages", t, "multi") } } if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.notConfiguredAction != nil { - localVarQueryParams.Add("not_configured_action", parameterToString(*r.notConfiguredAction, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "not_configured_action", r.notConfiguredAction, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -5907,9 +5983,9 @@ func (a *StagesApiService) StagesAuthenticatorValidateListExecute(r ApiStagesAut return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -5926,6 +6002,7 @@ func (a *StagesApiService) StagesAuthenticatorValidateListExecute(r ApiStagesAut newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -5936,6 +6013,7 @@ func (a *StagesApiService) StagesAuthenticatorValidateListExecute(r ApiStagesAut newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -6002,7 +6080,7 @@ func (a *StagesApiService) StagesAuthenticatorValidatePartialUpdateExecute(r Api } localVarPath := localBasePath + "/stages/authenticator/validate/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -6051,9 +6129,9 @@ func (a *StagesApiService) StagesAuthenticatorValidatePartialUpdateExecute(r Api return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -6070,6 +6148,7 @@ func (a *StagesApiService) StagesAuthenticatorValidatePartialUpdateExecute(r Api newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -6080,6 +6159,7 @@ func (a *StagesApiService) StagesAuthenticatorValidatePartialUpdateExecute(r Api newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -6140,7 +6220,7 @@ func (a *StagesApiService) StagesAuthenticatorValidateRetrieveExecute(r ApiStage } localVarPath := localBasePath + "/stages/authenticator/validate/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -6187,9 +6267,9 @@ func (a *StagesApiService) StagesAuthenticatorValidateRetrieveExecute(r ApiStage return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -6206,6 +6286,7 @@ func (a *StagesApiService) StagesAuthenticatorValidateRetrieveExecute(r ApiStage newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -6216,6 +6297,7 @@ func (a *StagesApiService) StagesAuthenticatorValidateRetrieveExecute(r ApiStage newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -6282,7 +6364,7 @@ func (a *StagesApiService) StagesAuthenticatorValidateUpdateExecute(r ApiStagesA } localVarPath := localBasePath + "/stages/authenticator/validate/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -6334,9 +6416,9 @@ func (a *StagesApiService) StagesAuthenticatorValidateUpdateExecute(r ApiStagesA return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -6353,6 +6435,7 @@ func (a *StagesApiService) StagesAuthenticatorValidateUpdateExecute(r ApiStagesA newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -6363,6 +6446,7 @@ func (a *StagesApiService) StagesAuthenticatorValidateUpdateExecute(r ApiStagesA newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -6423,7 +6507,7 @@ func (a *StagesApiService) StagesAuthenticatorValidateUsedByListExecute(r ApiSta } localVarPath := localBasePath + "/stages/authenticator/validate/{stage_uuid}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -6470,9 +6554,9 @@ func (a *StagesApiService) StagesAuthenticatorValidateUsedByListExecute(r ApiSta return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -6489,6 +6573,7 @@ func (a *StagesApiService) StagesAuthenticatorValidateUsedByListExecute(r ApiSta newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -6499,6 +6584,7 @@ func (a *StagesApiService) StagesAuthenticatorValidateUsedByListExecute(r ApiSta newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -6613,9 +6699,9 @@ func (a *StagesApiService) StagesAuthenticatorWebauthnCreateExecute(r ApiStagesA return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -6632,6 +6718,7 @@ func (a *StagesApiService) StagesAuthenticatorWebauthnCreateExecute(r ApiStagesA newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -6642,6 +6729,7 @@ func (a *StagesApiService) StagesAuthenticatorWebauthnCreateExecute(r ApiStagesA newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -6700,7 +6788,7 @@ func (a *StagesApiService) StagesAuthenticatorWebauthnDestroyExecute(r ApiStages } localVarPath := localBasePath + "/stages/authenticator/webauthn/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -6747,9 +6835,9 @@ func (a *StagesApiService) StagesAuthenticatorWebauthnDestroyExecute(r ApiStages return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -6766,6 +6854,7 @@ func (a *StagesApiService) StagesAuthenticatorWebauthnDestroyExecute(r ApiStages newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -6776,6 +6865,7 @@ func (a *StagesApiService) StagesAuthenticatorWebauthnDestroyExecute(r ApiStages newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -6897,34 +6987,34 @@ func (a *StagesApiService) StagesAuthenticatorWebauthnListExecute(r ApiStagesAut localVarFormParams := url.Values{} if r.authenticatorAttachment != nil { - localVarQueryParams.Add("authenticator_attachment", parameterToString(*r.authenticatorAttachment, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "authenticator_attachment", r.authenticatorAttachment, "") } if r.configureFlow != nil { - localVarQueryParams.Add("configure_flow", parameterToString(*r.configureFlow, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "configure_flow", r.configureFlow, "") } if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.residentKeyRequirement != nil { - localVarQueryParams.Add("resident_key_requirement", parameterToString(*r.residentKeyRequirement, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "resident_key_requirement", r.residentKeyRequirement, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } if r.stageUuid != nil { - localVarQueryParams.Add("stage_uuid", parameterToString(*r.stageUuid, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "stage_uuid", r.stageUuid, "") } if r.userVerification != nil { - localVarQueryParams.Add("user_verification", parameterToString(*r.userVerification, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "user_verification", r.userVerification, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -6967,9 +7057,9 @@ func (a *StagesApiService) StagesAuthenticatorWebauthnListExecute(r ApiStagesAut return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -6986,6 +7076,7 @@ func (a *StagesApiService) StagesAuthenticatorWebauthnListExecute(r ApiStagesAut newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -6996,6 +7087,7 @@ func (a *StagesApiService) StagesAuthenticatorWebauthnListExecute(r ApiStagesAut newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -7062,7 +7154,7 @@ func (a *StagesApiService) StagesAuthenticatorWebauthnPartialUpdateExecute(r Api } localVarPath := localBasePath + "/stages/authenticator/webauthn/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -7111,9 +7203,9 @@ func (a *StagesApiService) StagesAuthenticatorWebauthnPartialUpdateExecute(r Api return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -7130,6 +7222,7 @@ func (a *StagesApiService) StagesAuthenticatorWebauthnPartialUpdateExecute(r Api newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -7140,6 +7233,7 @@ func (a *StagesApiService) StagesAuthenticatorWebauthnPartialUpdateExecute(r Api newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -7200,7 +7294,7 @@ func (a *StagesApiService) StagesAuthenticatorWebauthnRetrieveExecute(r ApiStage } localVarPath := localBasePath + "/stages/authenticator/webauthn/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -7247,9 +7341,9 @@ func (a *StagesApiService) StagesAuthenticatorWebauthnRetrieveExecute(r ApiStage return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -7266,6 +7360,7 @@ func (a *StagesApiService) StagesAuthenticatorWebauthnRetrieveExecute(r ApiStage newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -7276,6 +7371,7 @@ func (a *StagesApiService) StagesAuthenticatorWebauthnRetrieveExecute(r ApiStage newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -7342,7 +7438,7 @@ func (a *StagesApiService) StagesAuthenticatorWebauthnUpdateExecute(r ApiStagesA } localVarPath := localBasePath + "/stages/authenticator/webauthn/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -7394,9 +7490,9 @@ func (a *StagesApiService) StagesAuthenticatorWebauthnUpdateExecute(r ApiStagesA return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -7413,6 +7509,7 @@ func (a *StagesApiService) StagesAuthenticatorWebauthnUpdateExecute(r ApiStagesA newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -7423,6 +7520,7 @@ func (a *StagesApiService) StagesAuthenticatorWebauthnUpdateExecute(r ApiStagesA newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -7483,7 +7581,7 @@ func (a *StagesApiService) StagesAuthenticatorWebauthnUsedByListExecute(r ApiSta } localVarPath := localBasePath + "/stages/authenticator/webauthn/{stage_uuid}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -7530,9 +7628,9 @@ func (a *StagesApiService) StagesAuthenticatorWebauthnUsedByListExecute(r ApiSta return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -7549,6 +7647,7 @@ func (a *StagesApiService) StagesAuthenticatorWebauthnUsedByListExecute(r ApiSta newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -7559,6 +7658,7 @@ func (a *StagesApiService) StagesAuthenticatorWebauthnUsedByListExecute(r ApiSta newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -7673,9 +7773,9 @@ func (a *StagesApiService) StagesCaptchaCreateExecute(r ApiStagesCaptchaCreateRe return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -7692,6 +7792,7 @@ func (a *StagesApiService) StagesCaptchaCreateExecute(r ApiStagesCaptchaCreateRe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -7702,6 +7803,7 @@ func (a *StagesApiService) StagesCaptchaCreateExecute(r ApiStagesCaptchaCreateRe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -7760,7 +7862,7 @@ func (a *StagesApiService) StagesCaptchaDestroyExecute(r ApiStagesCaptchaDestroy } localVarPath := localBasePath + "/stages/captcha/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -7807,9 +7909,9 @@ func (a *StagesApiService) StagesCaptchaDestroyExecute(r ApiStagesCaptchaDestroy return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -7826,6 +7928,7 @@ func (a *StagesApiService) StagesCaptchaDestroyExecute(r ApiStagesCaptchaDestroy newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -7836,6 +7939,7 @@ func (a *StagesApiService) StagesCaptchaDestroyExecute(r ApiStagesCaptchaDestroy newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -7930,22 +8034,22 @@ func (a *StagesApiService) StagesCaptchaListExecute(r ApiStagesCaptchaListReques localVarFormParams := url.Values{} if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.publicKey != nil { - localVarQueryParams.Add("public_key", parameterToString(*r.publicKey, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "public_key", r.publicKey, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -7988,9 +8092,9 @@ func (a *StagesApiService) StagesCaptchaListExecute(r ApiStagesCaptchaListReques return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -8007,6 +8111,7 @@ func (a *StagesApiService) StagesCaptchaListExecute(r ApiStagesCaptchaListReques newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -8017,6 +8122,7 @@ func (a *StagesApiService) StagesCaptchaListExecute(r ApiStagesCaptchaListReques newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -8083,7 +8189,7 @@ func (a *StagesApiService) StagesCaptchaPartialUpdateExecute(r ApiStagesCaptchaP } localVarPath := localBasePath + "/stages/captcha/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -8132,9 +8238,9 @@ func (a *StagesApiService) StagesCaptchaPartialUpdateExecute(r ApiStagesCaptchaP return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -8151,6 +8257,7 @@ func (a *StagesApiService) StagesCaptchaPartialUpdateExecute(r ApiStagesCaptchaP newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -8161,6 +8268,7 @@ func (a *StagesApiService) StagesCaptchaPartialUpdateExecute(r ApiStagesCaptchaP newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -8221,7 +8329,7 @@ func (a *StagesApiService) StagesCaptchaRetrieveExecute(r ApiStagesCaptchaRetrie } localVarPath := localBasePath + "/stages/captcha/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -8268,9 +8376,9 @@ func (a *StagesApiService) StagesCaptchaRetrieveExecute(r ApiStagesCaptchaRetrie return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -8287,6 +8395,7 @@ func (a *StagesApiService) StagesCaptchaRetrieveExecute(r ApiStagesCaptchaRetrie newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -8297,6 +8406,7 @@ func (a *StagesApiService) StagesCaptchaRetrieveExecute(r ApiStagesCaptchaRetrie newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -8363,7 +8473,7 @@ func (a *StagesApiService) StagesCaptchaUpdateExecute(r ApiStagesCaptchaUpdateRe } localVarPath := localBasePath + "/stages/captcha/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -8415,9 +8525,9 @@ func (a *StagesApiService) StagesCaptchaUpdateExecute(r ApiStagesCaptchaUpdateRe return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -8434,6 +8544,7 @@ func (a *StagesApiService) StagesCaptchaUpdateExecute(r ApiStagesCaptchaUpdateRe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -8444,6 +8555,7 @@ func (a *StagesApiService) StagesCaptchaUpdateExecute(r ApiStagesCaptchaUpdateRe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -8504,7 +8616,7 @@ func (a *StagesApiService) StagesCaptchaUsedByListExecute(r ApiStagesCaptchaUsed } localVarPath := localBasePath + "/stages/captcha/{stage_uuid}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -8551,9 +8663,9 @@ func (a *StagesApiService) StagesCaptchaUsedByListExecute(r ApiStagesCaptchaUsed return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -8570,6 +8682,7 @@ func (a *StagesApiService) StagesCaptchaUsedByListExecute(r ApiStagesCaptchaUsed newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -8580,6 +8693,7 @@ func (a *StagesApiService) StagesCaptchaUsedByListExecute(r ApiStagesCaptchaUsed newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -8694,9 +8808,9 @@ func (a *StagesApiService) StagesConsentCreateExecute(r ApiStagesConsentCreateRe return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -8713,6 +8827,7 @@ func (a *StagesApiService) StagesConsentCreateExecute(r ApiStagesConsentCreateRe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -8723,6 +8838,7 @@ func (a *StagesApiService) StagesConsentCreateExecute(r ApiStagesConsentCreateRe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -8781,7 +8897,7 @@ func (a *StagesApiService) StagesConsentDestroyExecute(r ApiStagesConsentDestroy } localVarPath := localBasePath + "/stages/consent/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -8828,9 +8944,9 @@ func (a *StagesApiService) StagesConsentDestroyExecute(r ApiStagesConsentDestroy return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -8847,6 +8963,7 @@ func (a *StagesApiService) StagesConsentDestroyExecute(r ApiStagesConsentDestroy newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -8857,6 +8974,7 @@ func (a *StagesApiService) StagesConsentDestroyExecute(r ApiStagesConsentDestroy newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -8964,28 +9082,28 @@ func (a *StagesApiService) StagesConsentListExecute(r ApiStagesConsentListReques localVarFormParams := url.Values{} if r.consentExpireIn != nil { - localVarQueryParams.Add("consent_expire_in", parameterToString(*r.consentExpireIn, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "consent_expire_in", r.consentExpireIn, "") } if r.mode != nil { - localVarQueryParams.Add("mode", parameterToString(*r.mode, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "mode", r.mode, "") } if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } if r.stageUuid != nil { - localVarQueryParams.Add("stage_uuid", parameterToString(*r.stageUuid, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "stage_uuid", r.stageUuid, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -9028,9 +9146,9 @@ func (a *StagesApiService) StagesConsentListExecute(r ApiStagesConsentListReques return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -9047,6 +9165,7 @@ func (a *StagesApiService) StagesConsentListExecute(r ApiStagesConsentListReques newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -9057,6 +9176,7 @@ func (a *StagesApiService) StagesConsentListExecute(r ApiStagesConsentListReques newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -9123,7 +9243,7 @@ func (a *StagesApiService) StagesConsentPartialUpdateExecute(r ApiStagesConsentP } localVarPath := localBasePath + "/stages/consent/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -9172,9 +9292,9 @@ func (a *StagesApiService) StagesConsentPartialUpdateExecute(r ApiStagesConsentP return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -9191,6 +9311,7 @@ func (a *StagesApiService) StagesConsentPartialUpdateExecute(r ApiStagesConsentP newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -9201,6 +9322,7 @@ func (a *StagesApiService) StagesConsentPartialUpdateExecute(r ApiStagesConsentP newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -9261,7 +9383,7 @@ func (a *StagesApiService) StagesConsentRetrieveExecute(r ApiStagesConsentRetrie } localVarPath := localBasePath + "/stages/consent/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -9308,9 +9430,9 @@ func (a *StagesApiService) StagesConsentRetrieveExecute(r ApiStagesConsentRetrie return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -9327,6 +9449,7 @@ func (a *StagesApiService) StagesConsentRetrieveExecute(r ApiStagesConsentRetrie newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -9337,6 +9460,7 @@ func (a *StagesApiService) StagesConsentRetrieveExecute(r ApiStagesConsentRetrie newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -9403,7 +9527,7 @@ func (a *StagesApiService) StagesConsentUpdateExecute(r ApiStagesConsentUpdateRe } localVarPath := localBasePath + "/stages/consent/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -9455,9 +9579,9 @@ func (a *StagesApiService) StagesConsentUpdateExecute(r ApiStagesConsentUpdateRe return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -9474,6 +9598,7 @@ func (a *StagesApiService) StagesConsentUpdateExecute(r ApiStagesConsentUpdateRe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -9484,6 +9609,7 @@ func (a *StagesApiService) StagesConsentUpdateExecute(r ApiStagesConsentUpdateRe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -9544,7 +9670,7 @@ func (a *StagesApiService) StagesConsentUsedByListExecute(r ApiStagesConsentUsed } localVarPath := localBasePath + "/stages/consent/{stage_uuid}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -9591,9 +9717,9 @@ func (a *StagesApiService) StagesConsentUsedByListExecute(r ApiStagesConsentUsed return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -9610,6 +9736,7 @@ func (a *StagesApiService) StagesConsentUsedByListExecute(r ApiStagesConsentUsed newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -9620,6 +9747,7 @@ func (a *StagesApiService) StagesConsentUsedByListExecute(r ApiStagesConsentUsed newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -9734,9 +9862,9 @@ func (a *StagesApiService) StagesDenyCreateExecute(r ApiStagesDenyCreateRequest) return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -9753,6 +9881,7 @@ func (a *StagesApiService) StagesDenyCreateExecute(r ApiStagesDenyCreateRequest) newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -9763,6 +9892,7 @@ func (a *StagesApiService) StagesDenyCreateExecute(r ApiStagesDenyCreateRequest) newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -9821,7 +9951,7 @@ func (a *StagesApiService) StagesDenyDestroyExecute(r ApiStagesDenyDestroyReques } localVarPath := localBasePath + "/stages/deny/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -9868,9 +9998,9 @@ func (a *StagesApiService) StagesDenyDestroyExecute(r ApiStagesDenyDestroyReques return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -9887,6 +10017,7 @@ func (a *StagesApiService) StagesDenyDestroyExecute(r ApiStagesDenyDestroyReques newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -9897,6 +10028,7 @@ func (a *StagesApiService) StagesDenyDestroyExecute(r ApiStagesDenyDestroyReques newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -9991,22 +10123,22 @@ func (a *StagesApiService) StagesDenyListExecute(r ApiStagesDenyListRequest) (*P localVarFormParams := url.Values{} if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } if r.stageUuid != nil { - localVarQueryParams.Add("stage_uuid", parameterToString(*r.stageUuid, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "stage_uuid", r.stageUuid, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -10049,9 +10181,9 @@ func (a *StagesApiService) StagesDenyListExecute(r ApiStagesDenyListRequest) (*P return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -10068,6 +10200,7 @@ func (a *StagesApiService) StagesDenyListExecute(r ApiStagesDenyListRequest) (*P newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -10078,6 +10211,7 @@ func (a *StagesApiService) StagesDenyListExecute(r ApiStagesDenyListRequest) (*P newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -10144,7 +10278,7 @@ func (a *StagesApiService) StagesDenyPartialUpdateExecute(r ApiStagesDenyPartial } localVarPath := localBasePath + "/stages/deny/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -10193,9 +10327,9 @@ func (a *StagesApiService) StagesDenyPartialUpdateExecute(r ApiStagesDenyPartial return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -10212,6 +10346,7 @@ func (a *StagesApiService) StagesDenyPartialUpdateExecute(r ApiStagesDenyPartial newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -10222,6 +10357,7 @@ func (a *StagesApiService) StagesDenyPartialUpdateExecute(r ApiStagesDenyPartial newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -10282,7 +10418,7 @@ func (a *StagesApiService) StagesDenyRetrieveExecute(r ApiStagesDenyRetrieveRequ } localVarPath := localBasePath + "/stages/deny/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -10329,9 +10465,9 @@ func (a *StagesApiService) StagesDenyRetrieveExecute(r ApiStagesDenyRetrieveRequ return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -10348,6 +10484,7 @@ func (a *StagesApiService) StagesDenyRetrieveExecute(r ApiStagesDenyRetrieveRequ newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -10358,6 +10495,7 @@ func (a *StagesApiService) StagesDenyRetrieveExecute(r ApiStagesDenyRetrieveRequ newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -10424,7 +10562,7 @@ func (a *StagesApiService) StagesDenyUpdateExecute(r ApiStagesDenyUpdateRequest) } localVarPath := localBasePath + "/stages/deny/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -10476,9 +10614,9 @@ func (a *StagesApiService) StagesDenyUpdateExecute(r ApiStagesDenyUpdateRequest) return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -10495,6 +10633,7 @@ func (a *StagesApiService) StagesDenyUpdateExecute(r ApiStagesDenyUpdateRequest) newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -10505,6 +10644,7 @@ func (a *StagesApiService) StagesDenyUpdateExecute(r ApiStagesDenyUpdateRequest) newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -10565,7 +10705,7 @@ func (a *StagesApiService) StagesDenyUsedByListExecute(r ApiStagesDenyUsedByList } localVarPath := localBasePath + "/stages/deny/{stage_uuid}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -10612,9 +10752,9 @@ func (a *StagesApiService) StagesDenyUsedByListExecute(r ApiStagesDenyUsedByList return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -10631,6 +10771,7 @@ func (a *StagesApiService) StagesDenyUsedByListExecute(r ApiStagesDenyUsedByList newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -10641,6 +10782,7 @@ func (a *StagesApiService) StagesDenyUsedByListExecute(r ApiStagesDenyUsedByList newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -10755,9 +10897,9 @@ func (a *StagesApiService) StagesDummyCreateExecute(r ApiStagesDummyCreateReques return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -10774,6 +10916,7 @@ func (a *StagesApiService) StagesDummyCreateExecute(r ApiStagesDummyCreateReques newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -10784,6 +10927,7 @@ func (a *StagesApiService) StagesDummyCreateExecute(r ApiStagesDummyCreateReques newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -10842,7 +10986,7 @@ func (a *StagesApiService) StagesDummyDestroyExecute(r ApiStagesDummyDestroyRequ } localVarPath := localBasePath + "/stages/dummy/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -10889,9 +11033,9 @@ func (a *StagesApiService) StagesDummyDestroyExecute(r ApiStagesDummyDestroyRequ return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -10908,6 +11052,7 @@ func (a *StagesApiService) StagesDummyDestroyExecute(r ApiStagesDummyDestroyRequ newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -10918,6 +11063,7 @@ func (a *StagesApiService) StagesDummyDestroyExecute(r ApiStagesDummyDestroyRequ newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -11018,25 +11164,25 @@ func (a *StagesApiService) StagesDummyListExecute(r ApiStagesDummyListRequest) ( localVarFormParams := url.Values{} if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } if r.stageUuid != nil { - localVarQueryParams.Add("stage_uuid", parameterToString(*r.stageUuid, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "stage_uuid", r.stageUuid, "") } if r.throwError != nil { - localVarQueryParams.Add("throw_error", parameterToString(*r.throwError, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "throw_error", r.throwError, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -11079,9 +11225,9 @@ func (a *StagesApiService) StagesDummyListExecute(r ApiStagesDummyListRequest) ( return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -11098,6 +11244,7 @@ func (a *StagesApiService) StagesDummyListExecute(r ApiStagesDummyListRequest) ( newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -11108,6 +11255,7 @@ func (a *StagesApiService) StagesDummyListExecute(r ApiStagesDummyListRequest) ( newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -11174,7 +11322,7 @@ func (a *StagesApiService) StagesDummyPartialUpdateExecute(r ApiStagesDummyParti } localVarPath := localBasePath + "/stages/dummy/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -11223,9 +11371,9 @@ func (a *StagesApiService) StagesDummyPartialUpdateExecute(r ApiStagesDummyParti return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -11242,6 +11390,7 @@ func (a *StagesApiService) StagesDummyPartialUpdateExecute(r ApiStagesDummyParti newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -11252,6 +11401,7 @@ func (a *StagesApiService) StagesDummyPartialUpdateExecute(r ApiStagesDummyParti newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -11312,7 +11462,7 @@ func (a *StagesApiService) StagesDummyRetrieveExecute(r ApiStagesDummyRetrieveRe } localVarPath := localBasePath + "/stages/dummy/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -11359,9 +11509,9 @@ func (a *StagesApiService) StagesDummyRetrieveExecute(r ApiStagesDummyRetrieveRe return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -11378,6 +11528,7 @@ func (a *StagesApiService) StagesDummyRetrieveExecute(r ApiStagesDummyRetrieveRe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -11388,6 +11539,7 @@ func (a *StagesApiService) StagesDummyRetrieveExecute(r ApiStagesDummyRetrieveRe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -11454,7 +11606,7 @@ func (a *StagesApiService) StagesDummyUpdateExecute(r ApiStagesDummyUpdateReques } localVarPath := localBasePath + "/stages/dummy/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -11506,9 +11658,9 @@ func (a *StagesApiService) StagesDummyUpdateExecute(r ApiStagesDummyUpdateReques return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -11525,6 +11677,7 @@ func (a *StagesApiService) StagesDummyUpdateExecute(r ApiStagesDummyUpdateReques newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -11535,6 +11688,7 @@ func (a *StagesApiService) StagesDummyUpdateExecute(r ApiStagesDummyUpdateReques newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -11595,7 +11749,7 @@ func (a *StagesApiService) StagesDummyUsedByListExecute(r ApiStagesDummyUsedByLi } localVarPath := localBasePath + "/stages/dummy/{stage_uuid}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -11642,9 +11796,9 @@ func (a *StagesApiService) StagesDummyUsedByListExecute(r ApiStagesDummyUsedByLi return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -11661,6 +11815,7 @@ func (a *StagesApiService) StagesDummyUsedByListExecute(r ApiStagesDummyUsedByLi newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -11671,6 +11826,7 @@ func (a *StagesApiService) StagesDummyUsedByListExecute(r ApiStagesDummyUsedByLi newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -11785,9 +11941,9 @@ func (a *StagesApiService) StagesEmailCreateExecute(r ApiStagesEmailCreateReques return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -11804,6 +11960,7 @@ func (a *StagesApiService) StagesEmailCreateExecute(r ApiStagesEmailCreateReques newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -11814,6 +11971,7 @@ func (a *StagesApiService) StagesEmailCreateExecute(r ApiStagesEmailCreateReques newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -11872,7 +12030,7 @@ func (a *StagesApiService) StagesEmailDestroyExecute(r ApiStagesEmailDestroyRequ } localVarPath := localBasePath + "/stages/email/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -11919,9 +12077,9 @@ func (a *StagesApiService) StagesEmailDestroyExecute(r ApiStagesEmailDestroyRequ return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -11938,6 +12096,7 @@ func (a *StagesApiService) StagesEmailDestroyExecute(r ApiStagesEmailDestroyRequ newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -11948,6 +12107,7 @@ func (a *StagesApiService) StagesEmailDestroyExecute(r ApiStagesEmailDestroyRequ newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -12108,55 +12268,55 @@ func (a *StagesApiService) StagesEmailListExecute(r ApiStagesEmailListRequest) ( localVarFormParams := url.Values{} if r.activateUserOnSuccess != nil { - localVarQueryParams.Add("activate_user_on_success", parameterToString(*r.activateUserOnSuccess, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "activate_user_on_success", r.activateUserOnSuccess, "") } if r.fromAddress != nil { - localVarQueryParams.Add("from_address", parameterToString(*r.fromAddress, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "from_address", r.fromAddress, "") } if r.host != nil { - localVarQueryParams.Add("host", parameterToString(*r.host, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "host", r.host, "") } if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.port != nil { - localVarQueryParams.Add("port", parameterToString(*r.port, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "port", r.port, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } if r.subject != nil { - localVarQueryParams.Add("subject", parameterToString(*r.subject, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "subject", r.subject, "") } if r.template != nil { - localVarQueryParams.Add("template", parameterToString(*r.template, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "template", r.template, "") } if r.timeout != nil { - localVarQueryParams.Add("timeout", parameterToString(*r.timeout, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "timeout", r.timeout, "") } if r.tokenExpiry != nil { - localVarQueryParams.Add("token_expiry", parameterToString(*r.tokenExpiry, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "token_expiry", r.tokenExpiry, "") } if r.useGlobalSettings != nil { - localVarQueryParams.Add("use_global_settings", parameterToString(*r.useGlobalSettings, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "use_global_settings", r.useGlobalSettings, "") } if r.useSsl != nil { - localVarQueryParams.Add("use_ssl", parameterToString(*r.useSsl, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "use_ssl", r.useSsl, "") } if r.useTls != nil { - localVarQueryParams.Add("use_tls", parameterToString(*r.useTls, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "use_tls", r.useTls, "") } if r.username != nil { - localVarQueryParams.Add("username", parameterToString(*r.username, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "username", r.username, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -12199,9 +12359,9 @@ func (a *StagesApiService) StagesEmailListExecute(r ApiStagesEmailListRequest) ( return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -12218,6 +12378,7 @@ func (a *StagesApiService) StagesEmailListExecute(r ApiStagesEmailListRequest) ( newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -12228,6 +12389,7 @@ func (a *StagesApiService) StagesEmailListExecute(r ApiStagesEmailListRequest) ( newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -12294,7 +12456,7 @@ func (a *StagesApiService) StagesEmailPartialUpdateExecute(r ApiStagesEmailParti } localVarPath := localBasePath + "/stages/email/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -12343,9 +12505,9 @@ func (a *StagesApiService) StagesEmailPartialUpdateExecute(r ApiStagesEmailParti return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -12362,6 +12524,7 @@ func (a *StagesApiService) StagesEmailPartialUpdateExecute(r ApiStagesEmailParti newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -12372,6 +12535,7 @@ func (a *StagesApiService) StagesEmailPartialUpdateExecute(r ApiStagesEmailParti newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -12432,7 +12596,7 @@ func (a *StagesApiService) StagesEmailRetrieveExecute(r ApiStagesEmailRetrieveRe } localVarPath := localBasePath + "/stages/email/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -12479,9 +12643,9 @@ func (a *StagesApiService) StagesEmailRetrieveExecute(r ApiStagesEmailRetrieveRe return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -12498,6 +12662,7 @@ func (a *StagesApiService) StagesEmailRetrieveExecute(r ApiStagesEmailRetrieveRe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -12508,6 +12673,7 @@ func (a *StagesApiService) StagesEmailRetrieveExecute(r ApiStagesEmailRetrieveRe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -12611,9 +12777,9 @@ func (a *StagesApiService) StagesEmailTemplatesListExecute(r ApiStagesEmailTempl return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -12630,6 +12796,7 @@ func (a *StagesApiService) StagesEmailTemplatesListExecute(r ApiStagesEmailTempl newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -12640,6 +12807,7 @@ func (a *StagesApiService) StagesEmailTemplatesListExecute(r ApiStagesEmailTempl newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -12706,7 +12874,7 @@ func (a *StagesApiService) StagesEmailUpdateExecute(r ApiStagesEmailUpdateReques } localVarPath := localBasePath + "/stages/email/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -12758,9 +12926,9 @@ func (a *StagesApiService) StagesEmailUpdateExecute(r ApiStagesEmailUpdateReques return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -12777,6 +12945,7 @@ func (a *StagesApiService) StagesEmailUpdateExecute(r ApiStagesEmailUpdateReques newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -12787,6 +12956,7 @@ func (a *StagesApiService) StagesEmailUpdateExecute(r ApiStagesEmailUpdateReques newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -12847,7 +13017,7 @@ func (a *StagesApiService) StagesEmailUsedByListExecute(r ApiStagesEmailUsedByLi } localVarPath := localBasePath + "/stages/email/{stage_uuid}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -12894,9 +13064,9 @@ func (a *StagesApiService) StagesEmailUsedByListExecute(r ApiStagesEmailUsedByLi return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -12913,6 +13083,7 @@ func (a *StagesApiService) StagesEmailUsedByListExecute(r ApiStagesEmailUsedByLi newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -12923,6 +13094,7 @@ func (a *StagesApiService) StagesEmailUsedByListExecute(r ApiStagesEmailUsedByLi newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -13037,9 +13209,9 @@ func (a *StagesApiService) StagesIdentificationCreateExecute(r ApiStagesIdentifi return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -13056,6 +13228,7 @@ func (a *StagesApiService) StagesIdentificationCreateExecute(r ApiStagesIdentifi newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -13066,6 +13239,7 @@ func (a *StagesApiService) StagesIdentificationCreateExecute(r ApiStagesIdentifi newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -13124,7 +13298,7 @@ func (a *StagesApiService) StagesIdentificationDestroyExecute(r ApiStagesIdentif } localVarPath := localBasePath + "/stages/identification/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -13171,9 +13345,9 @@ func (a *StagesApiService) StagesIdentificationDestroyExecute(r ApiStagesIdentif return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -13190,6 +13364,7 @@ func (a *StagesApiService) StagesIdentificationDestroyExecute(r ApiStagesIdentif newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -13200,6 +13375,7 @@ func (a *StagesApiService) StagesIdentificationDestroyExecute(r ApiStagesIdentif newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -13330,40 +13506,40 @@ func (a *StagesApiService) StagesIdentificationListExecute(r ApiStagesIdentifica localVarFormParams := url.Values{} if r.caseInsensitiveMatching != nil { - localVarQueryParams.Add("case_insensitive_matching", parameterToString(*r.caseInsensitiveMatching, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "case_insensitive_matching", r.caseInsensitiveMatching, "") } if r.enrollmentFlow != nil { - localVarQueryParams.Add("enrollment_flow", parameterToString(*r.enrollmentFlow, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "enrollment_flow", r.enrollmentFlow, "") } if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.passwordStage != nil { - localVarQueryParams.Add("password_stage", parameterToString(*r.passwordStage, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "password_stage", r.passwordStage, "") } if r.passwordlessFlow != nil { - localVarQueryParams.Add("passwordless_flow", parameterToString(*r.passwordlessFlow, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "passwordless_flow", r.passwordlessFlow, "") } if r.recoveryFlow != nil { - localVarQueryParams.Add("recovery_flow", parameterToString(*r.recoveryFlow, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "recovery_flow", r.recoveryFlow, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } if r.showMatchedUser != nil { - localVarQueryParams.Add("show_matched_user", parameterToString(*r.showMatchedUser, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "show_matched_user", r.showMatchedUser, "") } if r.showSourceLabels != nil { - localVarQueryParams.Add("show_source_labels", parameterToString(*r.showSourceLabels, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "show_source_labels", r.showSourceLabels, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -13406,9 +13582,9 @@ func (a *StagesApiService) StagesIdentificationListExecute(r ApiStagesIdentifica return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -13425,6 +13601,7 @@ func (a *StagesApiService) StagesIdentificationListExecute(r ApiStagesIdentifica newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -13435,6 +13612,7 @@ func (a *StagesApiService) StagesIdentificationListExecute(r ApiStagesIdentifica newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -13501,7 +13679,7 @@ func (a *StagesApiService) StagesIdentificationPartialUpdateExecute(r ApiStagesI } localVarPath := localBasePath + "/stages/identification/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -13550,9 +13728,9 @@ func (a *StagesApiService) StagesIdentificationPartialUpdateExecute(r ApiStagesI return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -13569,6 +13747,7 @@ func (a *StagesApiService) StagesIdentificationPartialUpdateExecute(r ApiStagesI newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -13579,6 +13758,7 @@ func (a *StagesApiService) StagesIdentificationPartialUpdateExecute(r ApiStagesI newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -13639,7 +13819,7 @@ func (a *StagesApiService) StagesIdentificationRetrieveExecute(r ApiStagesIdenti } localVarPath := localBasePath + "/stages/identification/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -13686,9 +13866,9 @@ func (a *StagesApiService) StagesIdentificationRetrieveExecute(r ApiStagesIdenti return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -13705,6 +13885,7 @@ func (a *StagesApiService) StagesIdentificationRetrieveExecute(r ApiStagesIdenti newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -13715,6 +13896,7 @@ func (a *StagesApiService) StagesIdentificationRetrieveExecute(r ApiStagesIdenti newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -13781,7 +13963,7 @@ func (a *StagesApiService) StagesIdentificationUpdateExecute(r ApiStagesIdentifi } localVarPath := localBasePath + "/stages/identification/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -13833,9 +14015,9 @@ func (a *StagesApiService) StagesIdentificationUpdateExecute(r ApiStagesIdentifi return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -13852,6 +14034,7 @@ func (a *StagesApiService) StagesIdentificationUpdateExecute(r ApiStagesIdentifi newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -13862,6 +14045,7 @@ func (a *StagesApiService) StagesIdentificationUpdateExecute(r ApiStagesIdentifi newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -13922,7 +14106,7 @@ func (a *StagesApiService) StagesIdentificationUsedByListExecute(r ApiStagesIden } localVarPath := localBasePath + "/stages/identification/{stage_uuid}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -13969,9 +14153,9 @@ func (a *StagesApiService) StagesIdentificationUsedByListExecute(r ApiStagesIden return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -13988,6 +14172,7 @@ func (a *StagesApiService) StagesIdentificationUsedByListExecute(r ApiStagesIden newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -13998,6 +14183,7 @@ func (a *StagesApiService) StagesIdentificationUsedByListExecute(r ApiStagesIden newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -14112,9 +14298,9 @@ func (a *StagesApiService) StagesInvitationInvitationsCreateExecute(r ApiStagesI return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -14131,6 +14317,7 @@ func (a *StagesApiService) StagesInvitationInvitationsCreateExecute(r ApiStagesI newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -14141,6 +14328,7 @@ func (a *StagesApiService) StagesInvitationInvitationsCreateExecute(r ApiStagesI newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -14199,7 +14387,7 @@ func (a *StagesApiService) StagesInvitationInvitationsDestroyExecute(r ApiStages } localVarPath := localBasePath + "/stages/invitation/invitations/{invite_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"invite_uuid"+"}", url.PathEscape(parameterToString(r.inviteUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"invite_uuid"+"}", url.PathEscape(parameterValueToString(r.inviteUuid, "inviteUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -14246,9 +14434,9 @@ func (a *StagesApiService) StagesInvitationInvitationsDestroyExecute(r ApiStages return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -14265,6 +14453,7 @@ func (a *StagesApiService) StagesInvitationInvitationsDestroyExecute(r ApiStages newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -14275,6 +14464,7 @@ func (a *StagesApiService) StagesInvitationInvitationsDestroyExecute(r ApiStages newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -14381,28 +14571,28 @@ func (a *StagesApiService) StagesInvitationInvitationsListExecute(r ApiStagesInv localVarFormParams := url.Values{} if r.createdByUsername != nil { - localVarQueryParams.Add("created_by__username", parameterToString(*r.createdByUsername, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "created_by__username", r.createdByUsername, "") } if r.expires != nil { - localVarQueryParams.Add("expires", parameterToString(*r.expires, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "expires", r.expires, "") } if r.flowSlug != nil { - localVarQueryParams.Add("flow__slug", parameterToString(*r.flowSlug, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "flow__slug", r.flowSlug, "") } if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -14445,9 +14635,9 @@ func (a *StagesApiService) StagesInvitationInvitationsListExecute(r ApiStagesInv return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -14464,6 +14654,7 @@ func (a *StagesApiService) StagesInvitationInvitationsListExecute(r ApiStagesInv newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -14474,6 +14665,7 @@ func (a *StagesApiService) StagesInvitationInvitationsListExecute(r ApiStagesInv newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -14540,7 +14732,7 @@ func (a *StagesApiService) StagesInvitationInvitationsPartialUpdateExecute(r Api } localVarPath := localBasePath + "/stages/invitation/invitations/{invite_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"invite_uuid"+"}", url.PathEscape(parameterToString(r.inviteUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"invite_uuid"+"}", url.PathEscape(parameterValueToString(r.inviteUuid, "inviteUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -14589,9 +14781,9 @@ func (a *StagesApiService) StagesInvitationInvitationsPartialUpdateExecute(r Api return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -14608,6 +14800,7 @@ func (a *StagesApiService) StagesInvitationInvitationsPartialUpdateExecute(r Api newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -14618,6 +14811,7 @@ func (a *StagesApiService) StagesInvitationInvitationsPartialUpdateExecute(r Api newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -14678,7 +14872,7 @@ func (a *StagesApiService) StagesInvitationInvitationsRetrieveExecute(r ApiStage } localVarPath := localBasePath + "/stages/invitation/invitations/{invite_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"invite_uuid"+"}", url.PathEscape(parameterToString(r.inviteUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"invite_uuid"+"}", url.PathEscape(parameterValueToString(r.inviteUuid, "inviteUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -14725,9 +14919,9 @@ func (a *StagesApiService) StagesInvitationInvitationsRetrieveExecute(r ApiStage return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -14744,6 +14938,7 @@ func (a *StagesApiService) StagesInvitationInvitationsRetrieveExecute(r ApiStage newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -14754,6 +14949,7 @@ func (a *StagesApiService) StagesInvitationInvitationsRetrieveExecute(r ApiStage newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -14820,7 +15016,7 @@ func (a *StagesApiService) StagesInvitationInvitationsUpdateExecute(r ApiStagesI } localVarPath := localBasePath + "/stages/invitation/invitations/{invite_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"invite_uuid"+"}", url.PathEscape(parameterToString(r.inviteUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"invite_uuid"+"}", url.PathEscape(parameterValueToString(r.inviteUuid, "inviteUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -14872,9 +15068,9 @@ func (a *StagesApiService) StagesInvitationInvitationsUpdateExecute(r ApiStagesI return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -14891,6 +15087,7 @@ func (a *StagesApiService) StagesInvitationInvitationsUpdateExecute(r ApiStagesI newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -14901,6 +15098,7 @@ func (a *StagesApiService) StagesInvitationInvitationsUpdateExecute(r ApiStagesI newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -14961,7 +15159,7 @@ func (a *StagesApiService) StagesInvitationInvitationsUsedByListExecute(r ApiSta } localVarPath := localBasePath + "/stages/invitation/invitations/{invite_uuid}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"invite_uuid"+"}", url.PathEscape(parameterToString(r.inviteUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"invite_uuid"+"}", url.PathEscape(parameterValueToString(r.inviteUuid, "inviteUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -15008,9 +15206,9 @@ func (a *StagesApiService) StagesInvitationInvitationsUsedByListExecute(r ApiSta return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -15027,6 +15225,7 @@ func (a *StagesApiService) StagesInvitationInvitationsUsedByListExecute(r ApiSta newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -15037,6 +15236,7 @@ func (a *StagesApiService) StagesInvitationInvitationsUsedByListExecute(r ApiSta newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -15151,9 +15351,9 @@ func (a *StagesApiService) StagesInvitationStagesCreateExecute(r ApiStagesInvita return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -15170,6 +15370,7 @@ func (a *StagesApiService) StagesInvitationStagesCreateExecute(r ApiStagesInvita newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -15180,6 +15381,7 @@ func (a *StagesApiService) StagesInvitationStagesCreateExecute(r ApiStagesInvita newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -15238,7 +15440,7 @@ func (a *StagesApiService) StagesInvitationStagesDestroyExecute(r ApiStagesInvit } localVarPath := localBasePath + "/stages/invitation/stages/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -15285,9 +15487,9 @@ func (a *StagesApiService) StagesInvitationStagesDestroyExecute(r ApiStagesInvit return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -15304,6 +15506,7 @@ func (a *StagesApiService) StagesInvitationStagesDestroyExecute(r ApiStagesInvit newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -15314,6 +15517,7 @@ func (a *StagesApiService) StagesInvitationStagesDestroyExecute(r ApiStagesInvit newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -15420,28 +15624,28 @@ func (a *StagesApiService) StagesInvitationStagesListExecute(r ApiStagesInvitati localVarFormParams := url.Values{} if r.continueFlowWithoutInvitation != nil { - localVarQueryParams.Add("continue_flow_without_invitation", parameterToString(*r.continueFlowWithoutInvitation, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "continue_flow_without_invitation", r.continueFlowWithoutInvitation, "") } if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.noFlows != nil { - localVarQueryParams.Add("no_flows", parameterToString(*r.noFlows, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "no_flows", r.noFlows, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } if r.stageUuid != nil { - localVarQueryParams.Add("stage_uuid", parameterToString(*r.stageUuid, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "stage_uuid", r.stageUuid, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -15484,9 +15688,9 @@ func (a *StagesApiService) StagesInvitationStagesListExecute(r ApiStagesInvitati return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -15503,6 +15707,7 @@ func (a *StagesApiService) StagesInvitationStagesListExecute(r ApiStagesInvitati newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -15513,6 +15718,7 @@ func (a *StagesApiService) StagesInvitationStagesListExecute(r ApiStagesInvitati newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -15579,7 +15785,7 @@ func (a *StagesApiService) StagesInvitationStagesPartialUpdateExecute(r ApiStage } localVarPath := localBasePath + "/stages/invitation/stages/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -15628,9 +15834,9 @@ func (a *StagesApiService) StagesInvitationStagesPartialUpdateExecute(r ApiStage return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -15647,6 +15853,7 @@ func (a *StagesApiService) StagesInvitationStagesPartialUpdateExecute(r ApiStage newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -15657,6 +15864,7 @@ func (a *StagesApiService) StagesInvitationStagesPartialUpdateExecute(r ApiStage newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -15717,7 +15925,7 @@ func (a *StagesApiService) StagesInvitationStagesRetrieveExecute(r ApiStagesInvi } localVarPath := localBasePath + "/stages/invitation/stages/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -15764,9 +15972,9 @@ func (a *StagesApiService) StagesInvitationStagesRetrieveExecute(r ApiStagesInvi return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -15783,6 +15991,7 @@ func (a *StagesApiService) StagesInvitationStagesRetrieveExecute(r ApiStagesInvi newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -15793,6 +16002,7 @@ func (a *StagesApiService) StagesInvitationStagesRetrieveExecute(r ApiStagesInvi newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -15859,7 +16069,7 @@ func (a *StagesApiService) StagesInvitationStagesUpdateExecute(r ApiStagesInvita } localVarPath := localBasePath + "/stages/invitation/stages/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -15911,9 +16121,9 @@ func (a *StagesApiService) StagesInvitationStagesUpdateExecute(r ApiStagesInvita return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -15930,6 +16140,7 @@ func (a *StagesApiService) StagesInvitationStagesUpdateExecute(r ApiStagesInvita newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -15940,6 +16151,7 @@ func (a *StagesApiService) StagesInvitationStagesUpdateExecute(r ApiStagesInvita newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -16000,7 +16212,7 @@ func (a *StagesApiService) StagesInvitationStagesUsedByListExecute(r ApiStagesIn } localVarPath := localBasePath + "/stages/invitation/stages/{stage_uuid}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -16047,9 +16259,9 @@ func (a *StagesApiService) StagesInvitationStagesUsedByListExecute(r ApiStagesIn return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -16066,6 +16278,7 @@ func (a *StagesApiService) StagesInvitationStagesUsedByListExecute(r ApiStagesIn newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -16076,6 +16289,7 @@ func (a *StagesApiService) StagesInvitationStagesUsedByListExecute(r ApiStagesIn newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -16190,9 +16404,9 @@ func (a *StagesApiService) StagesPasswordCreateExecute(r ApiStagesPasswordCreate return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -16209,6 +16423,7 @@ func (a *StagesApiService) StagesPasswordCreateExecute(r ApiStagesPasswordCreate newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -16219,6 +16434,7 @@ func (a *StagesApiService) StagesPasswordCreateExecute(r ApiStagesPasswordCreate newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -16277,7 +16493,7 @@ func (a *StagesApiService) StagesPasswordDestroyExecute(r ApiStagesPasswordDestr } localVarPath := localBasePath + "/stages/password/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -16324,9 +16540,9 @@ func (a *StagesApiService) StagesPasswordDestroyExecute(r ApiStagesPasswordDestr return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -16343,6 +16559,7 @@ func (a *StagesApiService) StagesPasswordDestroyExecute(r ApiStagesPasswordDestr newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -16353,6 +16570,7 @@ func (a *StagesApiService) StagesPasswordDestroyExecute(r ApiStagesPasswordDestr newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -16453,25 +16671,25 @@ func (a *StagesApiService) StagesPasswordListExecute(r ApiStagesPasswordListRequ localVarFormParams := url.Values{} if r.configureFlow != nil { - localVarQueryParams.Add("configure_flow", parameterToString(*r.configureFlow, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "configure_flow", r.configureFlow, "") } if r.failedAttemptsBeforeCancel != nil { - localVarQueryParams.Add("failed_attempts_before_cancel", parameterToString(*r.failedAttemptsBeforeCancel, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "failed_attempts_before_cancel", r.failedAttemptsBeforeCancel, "") } if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -16514,9 +16732,9 @@ func (a *StagesApiService) StagesPasswordListExecute(r ApiStagesPasswordListRequ return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -16533,6 +16751,7 @@ func (a *StagesApiService) StagesPasswordListExecute(r ApiStagesPasswordListRequ newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -16543,6 +16762,7 @@ func (a *StagesApiService) StagesPasswordListExecute(r ApiStagesPasswordListRequ newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -16609,7 +16829,7 @@ func (a *StagesApiService) StagesPasswordPartialUpdateExecute(r ApiStagesPasswor } localVarPath := localBasePath + "/stages/password/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -16658,9 +16878,9 @@ func (a *StagesApiService) StagesPasswordPartialUpdateExecute(r ApiStagesPasswor return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -16677,6 +16897,7 @@ func (a *StagesApiService) StagesPasswordPartialUpdateExecute(r ApiStagesPasswor newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -16687,6 +16908,7 @@ func (a *StagesApiService) StagesPasswordPartialUpdateExecute(r ApiStagesPasswor newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -16747,7 +16969,7 @@ func (a *StagesApiService) StagesPasswordRetrieveExecute(r ApiStagesPasswordRetr } localVarPath := localBasePath + "/stages/password/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -16794,9 +17016,9 @@ func (a *StagesApiService) StagesPasswordRetrieveExecute(r ApiStagesPasswordRetr return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -16813,6 +17035,7 @@ func (a *StagesApiService) StagesPasswordRetrieveExecute(r ApiStagesPasswordRetr newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -16823,6 +17046,7 @@ func (a *StagesApiService) StagesPasswordRetrieveExecute(r ApiStagesPasswordRetr newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -16889,7 +17113,7 @@ func (a *StagesApiService) StagesPasswordUpdateExecute(r ApiStagesPasswordUpdate } localVarPath := localBasePath + "/stages/password/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -16941,9 +17165,9 @@ func (a *StagesApiService) StagesPasswordUpdateExecute(r ApiStagesPasswordUpdate return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -16960,6 +17184,7 @@ func (a *StagesApiService) StagesPasswordUpdateExecute(r ApiStagesPasswordUpdate newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -16970,6 +17195,7 @@ func (a *StagesApiService) StagesPasswordUpdateExecute(r ApiStagesPasswordUpdate newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -17030,7 +17256,7 @@ func (a *StagesApiService) StagesPasswordUsedByListExecute(r ApiStagesPasswordUs } localVarPath := localBasePath + "/stages/password/{stage_uuid}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -17077,9 +17303,9 @@ func (a *StagesApiService) StagesPasswordUsedByListExecute(r ApiStagesPasswordUs return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -17096,6 +17322,7 @@ func (a *StagesApiService) StagesPasswordUsedByListExecute(r ApiStagesPasswordUs newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -17106,6 +17333,7 @@ func (a *StagesApiService) StagesPasswordUsedByListExecute(r ApiStagesPasswordUs newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -17220,9 +17448,9 @@ func (a *StagesApiService) StagesPromptPromptsCreateExecute(r ApiStagesPromptPro return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -17239,6 +17467,7 @@ func (a *StagesApiService) StagesPromptPromptsCreateExecute(r ApiStagesPromptPro newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -17249,6 +17478,7 @@ func (a *StagesApiService) StagesPromptPromptsCreateExecute(r ApiStagesPromptPro newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -17307,7 +17537,7 @@ func (a *StagesApiService) StagesPromptPromptsDestroyExecute(r ApiStagesPromptPr } localVarPath := localBasePath + "/stages/prompt/prompts/{prompt_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"prompt_uuid"+"}", url.PathEscape(parameterToString(r.promptUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"prompt_uuid"+"}", url.PathEscape(parameterValueToString(r.promptUuid, "promptUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -17354,9 +17584,9 @@ func (a *StagesApiService) StagesPromptPromptsDestroyExecute(r ApiStagesPromptPr return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -17373,6 +17603,7 @@ func (a *StagesApiService) StagesPromptPromptsDestroyExecute(r ApiStagesPromptPr newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -17383,6 +17614,7 @@ func (a *StagesApiService) StagesPromptPromptsDestroyExecute(r ApiStagesPromptPr newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -17496,31 +17728,31 @@ func (a *StagesApiService) StagesPromptPromptsListExecute(r ApiStagesPromptPromp localVarFormParams := url.Values{} if r.fieldKey != nil { - localVarQueryParams.Add("field_key", parameterToString(*r.fieldKey, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "field_key", r.fieldKey, "") } if r.label != nil { - localVarQueryParams.Add("label", parameterToString(*r.label, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "label", r.label, "") } if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.placeholder != nil { - localVarQueryParams.Add("placeholder", parameterToString(*r.placeholder, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "placeholder", r.placeholder, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } if r.type_ != nil { - localVarQueryParams.Add("type", parameterToString(*r.type_, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "type", r.type_, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -17563,9 +17795,9 @@ func (a *StagesApiService) StagesPromptPromptsListExecute(r ApiStagesPromptPromp return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -17582,6 +17814,7 @@ func (a *StagesApiService) StagesPromptPromptsListExecute(r ApiStagesPromptPromp newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -17592,6 +17825,7 @@ func (a *StagesApiService) StagesPromptPromptsListExecute(r ApiStagesPromptPromp newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -17658,7 +17892,7 @@ func (a *StagesApiService) StagesPromptPromptsPartialUpdateExecute(r ApiStagesPr } localVarPath := localBasePath + "/stages/prompt/prompts/{prompt_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"prompt_uuid"+"}", url.PathEscape(parameterToString(r.promptUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"prompt_uuid"+"}", url.PathEscape(parameterValueToString(r.promptUuid, "promptUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -17707,9 +17941,9 @@ func (a *StagesApiService) StagesPromptPromptsPartialUpdateExecute(r ApiStagesPr return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -17726,6 +17960,7 @@ func (a *StagesApiService) StagesPromptPromptsPartialUpdateExecute(r ApiStagesPr newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -17736,6 +17971,7 @@ func (a *StagesApiService) StagesPromptPromptsPartialUpdateExecute(r ApiStagesPr newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -17850,9 +18086,9 @@ func (a *StagesApiService) StagesPromptPromptsPreviewCreateExecute(r ApiStagesPr return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -17869,6 +18105,7 @@ func (a *StagesApiService) StagesPromptPromptsPreviewCreateExecute(r ApiStagesPr newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -17879,6 +18116,7 @@ func (a *StagesApiService) StagesPromptPromptsPreviewCreateExecute(r ApiStagesPr newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -17939,7 +18177,7 @@ func (a *StagesApiService) StagesPromptPromptsRetrieveExecute(r ApiStagesPromptP } localVarPath := localBasePath + "/stages/prompt/prompts/{prompt_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"prompt_uuid"+"}", url.PathEscape(parameterToString(r.promptUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"prompt_uuid"+"}", url.PathEscape(parameterValueToString(r.promptUuid, "promptUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -17986,9 +18224,9 @@ func (a *StagesApiService) StagesPromptPromptsRetrieveExecute(r ApiStagesPromptP return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -18005,6 +18243,7 @@ func (a *StagesApiService) StagesPromptPromptsRetrieveExecute(r ApiStagesPromptP newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -18015,6 +18254,7 @@ func (a *StagesApiService) StagesPromptPromptsRetrieveExecute(r ApiStagesPromptP newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -18081,7 +18321,7 @@ func (a *StagesApiService) StagesPromptPromptsUpdateExecute(r ApiStagesPromptPro } localVarPath := localBasePath + "/stages/prompt/prompts/{prompt_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"prompt_uuid"+"}", url.PathEscape(parameterToString(r.promptUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"prompt_uuid"+"}", url.PathEscape(parameterValueToString(r.promptUuid, "promptUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -18133,9 +18373,9 @@ func (a *StagesApiService) StagesPromptPromptsUpdateExecute(r ApiStagesPromptPro return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -18152,6 +18392,7 @@ func (a *StagesApiService) StagesPromptPromptsUpdateExecute(r ApiStagesPromptPro newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -18162,6 +18403,7 @@ func (a *StagesApiService) StagesPromptPromptsUpdateExecute(r ApiStagesPromptPro newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -18222,7 +18464,7 @@ func (a *StagesApiService) StagesPromptPromptsUsedByListExecute(r ApiStagesPromp } localVarPath := localBasePath + "/stages/prompt/prompts/{prompt_uuid}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"prompt_uuid"+"}", url.PathEscape(parameterToString(r.promptUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"prompt_uuid"+"}", url.PathEscape(parameterValueToString(r.promptUuid, "promptUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -18269,9 +18511,9 @@ func (a *StagesApiService) StagesPromptPromptsUsedByListExecute(r ApiStagesPromp return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -18288,6 +18530,7 @@ func (a *StagesApiService) StagesPromptPromptsUsedByListExecute(r ApiStagesPromp newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -18298,6 +18541,7 @@ func (a *StagesApiService) StagesPromptPromptsUsedByListExecute(r ApiStagesPromp newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -18412,9 +18656,9 @@ func (a *StagesApiService) StagesPromptStagesCreateExecute(r ApiStagesPromptStag return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -18431,6 +18675,7 @@ func (a *StagesApiService) StagesPromptStagesCreateExecute(r ApiStagesPromptStag newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -18441,6 +18686,7 @@ func (a *StagesApiService) StagesPromptStagesCreateExecute(r ApiStagesPromptStag newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -18499,7 +18745,7 @@ func (a *StagesApiService) StagesPromptStagesDestroyExecute(r ApiStagesPromptSta } localVarPath := localBasePath + "/stages/prompt/stages/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -18546,9 +18792,9 @@ func (a *StagesApiService) StagesPromptStagesDestroyExecute(r ApiStagesPromptSta return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -18565,6 +18811,7 @@ func (a *StagesApiService) StagesPromptStagesDestroyExecute(r ApiStagesPromptSta newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -18575,6 +18822,7 @@ func (a *StagesApiService) StagesPromptStagesDestroyExecute(r ApiStagesPromptSta newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -18685,39 +18933,39 @@ func (a *StagesApiService) StagesPromptStagesListExecute(r ApiStagesPromptStages if reflect.TypeOf(t).Kind() == reflect.Slice { s := reflect.ValueOf(t) for i := 0; i < s.Len(); i++ { - localVarQueryParams.Add("fields", parameterToString(s.Index(i), "multi")) + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") } } else { - localVarQueryParams.Add("fields", parameterToString(t, "multi")) + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") } } if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } if r.stageUuid != nil { - localVarQueryParams.Add("stage_uuid", parameterToString(*r.stageUuid, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "stage_uuid", r.stageUuid, "") } if r.validationPolicies != nil { t := *r.validationPolicies if reflect.TypeOf(t).Kind() == reflect.Slice { s := reflect.ValueOf(t) for i := 0; i < s.Len(); i++ { - localVarQueryParams.Add("validation_policies", parameterToString(s.Index(i), "multi")) + parameterAddToHeaderOrQuery(localVarQueryParams, "validation_policies", s.Index(i), "multi") } } else { - localVarQueryParams.Add("validation_policies", parameterToString(t, "multi")) + parameterAddToHeaderOrQuery(localVarQueryParams, "validation_policies", t, "multi") } } // to determine the Content-Type header @@ -18761,9 +19009,9 @@ func (a *StagesApiService) StagesPromptStagesListExecute(r ApiStagesPromptStages return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -18780,6 +19028,7 @@ func (a *StagesApiService) StagesPromptStagesListExecute(r ApiStagesPromptStages newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -18790,6 +19039,7 @@ func (a *StagesApiService) StagesPromptStagesListExecute(r ApiStagesPromptStages newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -18856,7 +19106,7 @@ func (a *StagesApiService) StagesPromptStagesPartialUpdateExecute(r ApiStagesPro } localVarPath := localBasePath + "/stages/prompt/stages/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -18905,9 +19155,9 @@ func (a *StagesApiService) StagesPromptStagesPartialUpdateExecute(r ApiStagesPro return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -18924,6 +19174,7 @@ func (a *StagesApiService) StagesPromptStagesPartialUpdateExecute(r ApiStagesPro newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -18934,6 +19185,7 @@ func (a *StagesApiService) StagesPromptStagesPartialUpdateExecute(r ApiStagesPro newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -18994,7 +19246,7 @@ func (a *StagesApiService) StagesPromptStagesRetrieveExecute(r ApiStagesPromptSt } localVarPath := localBasePath + "/stages/prompt/stages/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -19041,9 +19293,9 @@ func (a *StagesApiService) StagesPromptStagesRetrieveExecute(r ApiStagesPromptSt return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -19060,6 +19312,7 @@ func (a *StagesApiService) StagesPromptStagesRetrieveExecute(r ApiStagesPromptSt newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -19070,6 +19323,7 @@ func (a *StagesApiService) StagesPromptStagesRetrieveExecute(r ApiStagesPromptSt newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -19136,7 +19390,7 @@ func (a *StagesApiService) StagesPromptStagesUpdateExecute(r ApiStagesPromptStag } localVarPath := localBasePath + "/stages/prompt/stages/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -19188,9 +19442,9 @@ func (a *StagesApiService) StagesPromptStagesUpdateExecute(r ApiStagesPromptStag return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -19207,6 +19461,7 @@ func (a *StagesApiService) StagesPromptStagesUpdateExecute(r ApiStagesPromptStag newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -19217,6 +19472,7 @@ func (a *StagesApiService) StagesPromptStagesUpdateExecute(r ApiStagesPromptStag newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -19277,7 +19533,7 @@ func (a *StagesApiService) StagesPromptStagesUsedByListExecute(r ApiStagesPrompt } localVarPath := localBasePath + "/stages/prompt/stages/{stage_uuid}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -19324,9 +19580,9 @@ func (a *StagesApiService) StagesPromptStagesUsedByListExecute(r ApiStagesPrompt return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -19343,6 +19599,7 @@ func (a *StagesApiService) StagesPromptStagesUsedByListExecute(r ApiStagesPrompt newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -19353,6 +19610,7 @@ func (a *StagesApiService) StagesPromptStagesUsedByListExecute(r ApiStagesPrompt newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -19467,9 +19725,9 @@ func (a *StagesApiService) StagesUserDeleteCreateExecute(r ApiStagesUserDeleteCr return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -19486,6 +19744,7 @@ func (a *StagesApiService) StagesUserDeleteCreateExecute(r ApiStagesUserDeleteCr newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -19496,6 +19755,7 @@ func (a *StagesApiService) StagesUserDeleteCreateExecute(r ApiStagesUserDeleteCr newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -19554,7 +19814,7 @@ func (a *StagesApiService) StagesUserDeleteDestroyExecute(r ApiStagesUserDeleteD } localVarPath := localBasePath + "/stages/user_delete/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -19601,9 +19861,9 @@ func (a *StagesApiService) StagesUserDeleteDestroyExecute(r ApiStagesUserDeleteD return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -19620,6 +19880,7 @@ func (a *StagesApiService) StagesUserDeleteDestroyExecute(r ApiStagesUserDeleteD newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -19630,6 +19891,7 @@ func (a *StagesApiService) StagesUserDeleteDestroyExecute(r ApiStagesUserDeleteD newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -19724,22 +19986,22 @@ func (a *StagesApiService) StagesUserDeleteListExecute(r ApiStagesUserDeleteList localVarFormParams := url.Values{} if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } if r.stageUuid != nil { - localVarQueryParams.Add("stage_uuid", parameterToString(*r.stageUuid, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "stage_uuid", r.stageUuid, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -19782,9 +20044,9 @@ func (a *StagesApiService) StagesUserDeleteListExecute(r ApiStagesUserDeleteList return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -19801,6 +20063,7 @@ func (a *StagesApiService) StagesUserDeleteListExecute(r ApiStagesUserDeleteList newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -19811,6 +20074,7 @@ func (a *StagesApiService) StagesUserDeleteListExecute(r ApiStagesUserDeleteList newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -19877,7 +20141,7 @@ func (a *StagesApiService) StagesUserDeletePartialUpdateExecute(r ApiStagesUserD } localVarPath := localBasePath + "/stages/user_delete/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -19926,9 +20190,9 @@ func (a *StagesApiService) StagesUserDeletePartialUpdateExecute(r ApiStagesUserD return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -19945,6 +20209,7 @@ func (a *StagesApiService) StagesUserDeletePartialUpdateExecute(r ApiStagesUserD newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -19955,6 +20220,7 @@ func (a *StagesApiService) StagesUserDeletePartialUpdateExecute(r ApiStagesUserD newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -20015,7 +20281,7 @@ func (a *StagesApiService) StagesUserDeleteRetrieveExecute(r ApiStagesUserDelete } localVarPath := localBasePath + "/stages/user_delete/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -20062,9 +20328,9 @@ func (a *StagesApiService) StagesUserDeleteRetrieveExecute(r ApiStagesUserDelete return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -20081,6 +20347,7 @@ func (a *StagesApiService) StagesUserDeleteRetrieveExecute(r ApiStagesUserDelete newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -20091,6 +20358,7 @@ func (a *StagesApiService) StagesUserDeleteRetrieveExecute(r ApiStagesUserDelete newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -20157,7 +20425,7 @@ func (a *StagesApiService) StagesUserDeleteUpdateExecute(r ApiStagesUserDeleteUp } localVarPath := localBasePath + "/stages/user_delete/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -20209,9 +20477,9 @@ func (a *StagesApiService) StagesUserDeleteUpdateExecute(r ApiStagesUserDeleteUp return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -20228,6 +20496,7 @@ func (a *StagesApiService) StagesUserDeleteUpdateExecute(r ApiStagesUserDeleteUp newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -20238,6 +20507,7 @@ func (a *StagesApiService) StagesUserDeleteUpdateExecute(r ApiStagesUserDeleteUp newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -20298,7 +20568,7 @@ func (a *StagesApiService) StagesUserDeleteUsedByListExecute(r ApiStagesUserDele } localVarPath := localBasePath + "/stages/user_delete/{stage_uuid}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -20345,9 +20615,9 @@ func (a *StagesApiService) StagesUserDeleteUsedByListExecute(r ApiStagesUserDele return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -20364,6 +20634,7 @@ func (a *StagesApiService) StagesUserDeleteUsedByListExecute(r ApiStagesUserDele newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -20374,6 +20645,7 @@ func (a *StagesApiService) StagesUserDeleteUsedByListExecute(r ApiStagesUserDele newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -20488,9 +20760,9 @@ func (a *StagesApiService) StagesUserLoginCreateExecute(r ApiStagesUserLoginCrea return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -20507,6 +20779,7 @@ func (a *StagesApiService) StagesUserLoginCreateExecute(r ApiStagesUserLoginCrea newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -20517,6 +20790,7 @@ func (a *StagesApiService) StagesUserLoginCreateExecute(r ApiStagesUserLoginCrea newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -20575,7 +20849,7 @@ func (a *StagesApiService) StagesUserLoginDestroyExecute(r ApiStagesUserLoginDes } localVarPath := localBasePath + "/stages/user_login/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -20622,9 +20896,9 @@ func (a *StagesApiService) StagesUserLoginDestroyExecute(r ApiStagesUserLoginDes return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -20641,6 +20915,7 @@ func (a *StagesApiService) StagesUserLoginDestroyExecute(r ApiStagesUserLoginDes newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -20651,6 +20926,7 @@ func (a *StagesApiService) StagesUserLoginDestroyExecute(r ApiStagesUserLoginDes newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -20763,31 +21039,31 @@ func (a *StagesApiService) StagesUserLoginListExecute(r ApiStagesUserLoginListRe localVarFormParams := url.Values{} if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.rememberMeOffset != nil { - localVarQueryParams.Add("remember_me_offset", parameterToString(*r.rememberMeOffset, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "remember_me_offset", r.rememberMeOffset, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } if r.sessionDuration != nil { - localVarQueryParams.Add("session_duration", parameterToString(*r.sessionDuration, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "session_duration", r.sessionDuration, "") } if r.stageUuid != nil { - localVarQueryParams.Add("stage_uuid", parameterToString(*r.stageUuid, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "stage_uuid", r.stageUuid, "") } if r.terminateOtherSessions != nil { - localVarQueryParams.Add("terminate_other_sessions", parameterToString(*r.terminateOtherSessions, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "terminate_other_sessions", r.terminateOtherSessions, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -20830,9 +21106,9 @@ func (a *StagesApiService) StagesUserLoginListExecute(r ApiStagesUserLoginListRe return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -20849,6 +21125,7 @@ func (a *StagesApiService) StagesUserLoginListExecute(r ApiStagesUserLoginListRe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -20859,6 +21136,7 @@ func (a *StagesApiService) StagesUserLoginListExecute(r ApiStagesUserLoginListRe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -20925,7 +21203,7 @@ func (a *StagesApiService) StagesUserLoginPartialUpdateExecute(r ApiStagesUserLo } localVarPath := localBasePath + "/stages/user_login/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -20974,9 +21252,9 @@ func (a *StagesApiService) StagesUserLoginPartialUpdateExecute(r ApiStagesUserLo return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -20993,6 +21271,7 @@ func (a *StagesApiService) StagesUserLoginPartialUpdateExecute(r ApiStagesUserLo newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -21003,6 +21282,7 @@ func (a *StagesApiService) StagesUserLoginPartialUpdateExecute(r ApiStagesUserLo newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -21063,7 +21343,7 @@ func (a *StagesApiService) StagesUserLoginRetrieveExecute(r ApiStagesUserLoginRe } localVarPath := localBasePath + "/stages/user_login/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -21110,9 +21390,9 @@ func (a *StagesApiService) StagesUserLoginRetrieveExecute(r ApiStagesUserLoginRe return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -21129,6 +21409,7 @@ func (a *StagesApiService) StagesUserLoginRetrieveExecute(r ApiStagesUserLoginRe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -21139,6 +21420,7 @@ func (a *StagesApiService) StagesUserLoginRetrieveExecute(r ApiStagesUserLoginRe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -21205,7 +21487,7 @@ func (a *StagesApiService) StagesUserLoginUpdateExecute(r ApiStagesUserLoginUpda } localVarPath := localBasePath + "/stages/user_login/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -21257,9 +21539,9 @@ func (a *StagesApiService) StagesUserLoginUpdateExecute(r ApiStagesUserLoginUpda return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -21276,6 +21558,7 @@ func (a *StagesApiService) StagesUserLoginUpdateExecute(r ApiStagesUserLoginUpda newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -21286,6 +21569,7 @@ func (a *StagesApiService) StagesUserLoginUpdateExecute(r ApiStagesUserLoginUpda newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -21346,7 +21630,7 @@ func (a *StagesApiService) StagesUserLoginUsedByListExecute(r ApiStagesUserLogin } localVarPath := localBasePath + "/stages/user_login/{stage_uuid}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -21393,9 +21677,9 @@ func (a *StagesApiService) StagesUserLoginUsedByListExecute(r ApiStagesUserLogin return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -21412,6 +21696,7 @@ func (a *StagesApiService) StagesUserLoginUsedByListExecute(r ApiStagesUserLogin newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -21422,6 +21707,7 @@ func (a *StagesApiService) StagesUserLoginUsedByListExecute(r ApiStagesUserLogin newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -21536,9 +21822,9 @@ func (a *StagesApiService) StagesUserLogoutCreateExecute(r ApiStagesUserLogoutCr return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -21555,6 +21841,7 @@ func (a *StagesApiService) StagesUserLogoutCreateExecute(r ApiStagesUserLogoutCr newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -21565,6 +21852,7 @@ func (a *StagesApiService) StagesUserLogoutCreateExecute(r ApiStagesUserLogoutCr newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -21623,7 +21911,7 @@ func (a *StagesApiService) StagesUserLogoutDestroyExecute(r ApiStagesUserLogoutD } localVarPath := localBasePath + "/stages/user_logout/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -21670,9 +21958,9 @@ func (a *StagesApiService) StagesUserLogoutDestroyExecute(r ApiStagesUserLogoutD return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -21689,6 +21977,7 @@ func (a *StagesApiService) StagesUserLogoutDestroyExecute(r ApiStagesUserLogoutD newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -21699,6 +21988,7 @@ func (a *StagesApiService) StagesUserLogoutDestroyExecute(r ApiStagesUserLogoutD newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -21793,22 +22083,22 @@ func (a *StagesApiService) StagesUserLogoutListExecute(r ApiStagesUserLogoutList localVarFormParams := url.Values{} if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } if r.stageUuid != nil { - localVarQueryParams.Add("stage_uuid", parameterToString(*r.stageUuid, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "stage_uuid", r.stageUuid, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -21851,9 +22141,9 @@ func (a *StagesApiService) StagesUserLogoutListExecute(r ApiStagesUserLogoutList return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -21870,6 +22160,7 @@ func (a *StagesApiService) StagesUserLogoutListExecute(r ApiStagesUserLogoutList newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -21880,6 +22171,7 @@ func (a *StagesApiService) StagesUserLogoutListExecute(r ApiStagesUserLogoutList newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -21946,7 +22238,7 @@ func (a *StagesApiService) StagesUserLogoutPartialUpdateExecute(r ApiStagesUserL } localVarPath := localBasePath + "/stages/user_logout/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -21995,9 +22287,9 @@ func (a *StagesApiService) StagesUserLogoutPartialUpdateExecute(r ApiStagesUserL return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -22014,6 +22306,7 @@ func (a *StagesApiService) StagesUserLogoutPartialUpdateExecute(r ApiStagesUserL newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -22024,6 +22317,7 @@ func (a *StagesApiService) StagesUserLogoutPartialUpdateExecute(r ApiStagesUserL newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -22084,7 +22378,7 @@ func (a *StagesApiService) StagesUserLogoutRetrieveExecute(r ApiStagesUserLogout } localVarPath := localBasePath + "/stages/user_logout/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -22131,9 +22425,9 @@ func (a *StagesApiService) StagesUserLogoutRetrieveExecute(r ApiStagesUserLogout return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -22150,6 +22444,7 @@ func (a *StagesApiService) StagesUserLogoutRetrieveExecute(r ApiStagesUserLogout newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -22160,6 +22455,7 @@ func (a *StagesApiService) StagesUserLogoutRetrieveExecute(r ApiStagesUserLogout newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -22226,7 +22522,7 @@ func (a *StagesApiService) StagesUserLogoutUpdateExecute(r ApiStagesUserLogoutUp } localVarPath := localBasePath + "/stages/user_logout/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -22278,9 +22574,9 @@ func (a *StagesApiService) StagesUserLogoutUpdateExecute(r ApiStagesUserLogoutUp return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -22297,6 +22593,7 @@ func (a *StagesApiService) StagesUserLogoutUpdateExecute(r ApiStagesUserLogoutUp newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -22307,6 +22604,7 @@ func (a *StagesApiService) StagesUserLogoutUpdateExecute(r ApiStagesUserLogoutUp newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -22367,7 +22665,7 @@ func (a *StagesApiService) StagesUserLogoutUsedByListExecute(r ApiStagesUserLogo } localVarPath := localBasePath + "/stages/user_logout/{stage_uuid}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -22414,9 +22712,9 @@ func (a *StagesApiService) StagesUserLogoutUsedByListExecute(r ApiStagesUserLogo return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -22433,6 +22731,7 @@ func (a *StagesApiService) StagesUserLogoutUsedByListExecute(r ApiStagesUserLogo newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -22443,6 +22742,7 @@ func (a *StagesApiService) StagesUserLogoutUsedByListExecute(r ApiStagesUserLogo newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -22557,9 +22857,9 @@ func (a *StagesApiService) StagesUserWriteCreateExecute(r ApiStagesUserWriteCrea return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -22576,6 +22876,7 @@ func (a *StagesApiService) StagesUserWriteCreateExecute(r ApiStagesUserWriteCrea newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -22586,6 +22887,7 @@ func (a *StagesApiService) StagesUserWriteCreateExecute(r ApiStagesUserWriteCrea newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -22644,7 +22946,7 @@ func (a *StagesApiService) StagesUserWriteDestroyExecute(r ApiStagesUserWriteDes } localVarPath := localBasePath + "/stages/user_write/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -22691,9 +22993,9 @@ func (a *StagesApiService) StagesUserWriteDestroyExecute(r ApiStagesUserWriteDes return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarHTTPResponse, err } @@ -22710,6 +23012,7 @@ func (a *StagesApiService) StagesUserWriteDestroyExecute(r ApiStagesUserWriteDes newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarHTTPResponse, newErr } @@ -22720,6 +23023,7 @@ func (a *StagesApiService) StagesUserWriteDestroyExecute(r ApiStagesUserWriteDes newErr.error = err.Error() return localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarHTTPResponse, newErr @@ -22839,34 +23143,34 @@ func (a *StagesApiService) StagesUserWriteListExecute(r ApiStagesUserWriteListRe localVarFormParams := url.Values{} if r.createUsersAsInactive != nil { - localVarQueryParams.Add("create_users_as_inactive", parameterToString(*r.createUsersAsInactive, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "create_users_as_inactive", r.createUsersAsInactive, "") } if r.createUsersGroup != nil { - localVarQueryParams.Add("create_users_group", parameterToString(*r.createUsersGroup, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "create_users_group", r.createUsersGroup, "") } if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } if r.ordering != nil { - localVarQueryParams.Add("ordering", parameterToString(*r.ordering, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } if r.pageSize != nil { - localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "") } if r.search != nil { - localVarQueryParams.Add("search", parameterToString(*r.search, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") } if r.stageUuid != nil { - localVarQueryParams.Add("stage_uuid", parameterToString(*r.stageUuid, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "stage_uuid", r.stageUuid, "") } if r.userCreationMode != nil { - localVarQueryParams.Add("user_creation_mode", parameterToString(*r.userCreationMode, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "user_creation_mode", r.userCreationMode, "") } if r.userPathTemplate != nil { - localVarQueryParams.Add("user_path_template", parameterToString(*r.userPathTemplate, "")) + parameterAddToHeaderOrQuery(localVarQueryParams, "user_path_template", r.userPathTemplate, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -22909,9 +23213,9 @@ func (a *StagesApiService) StagesUserWriteListExecute(r ApiStagesUserWriteListRe return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -22928,6 +23232,7 @@ func (a *StagesApiService) StagesUserWriteListExecute(r ApiStagesUserWriteListRe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -22938,6 +23243,7 @@ func (a *StagesApiService) StagesUserWriteListExecute(r ApiStagesUserWriteListRe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -23004,7 +23310,7 @@ func (a *StagesApiService) StagesUserWritePartialUpdateExecute(r ApiStagesUserWr } localVarPath := localBasePath + "/stages/user_write/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -23053,9 +23359,9 @@ func (a *StagesApiService) StagesUserWritePartialUpdateExecute(r ApiStagesUserWr return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -23072,6 +23378,7 @@ func (a *StagesApiService) StagesUserWritePartialUpdateExecute(r ApiStagesUserWr newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -23082,6 +23389,7 @@ func (a *StagesApiService) StagesUserWritePartialUpdateExecute(r ApiStagesUserWr newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -23142,7 +23450,7 @@ func (a *StagesApiService) StagesUserWriteRetrieveExecute(r ApiStagesUserWriteRe } localVarPath := localBasePath + "/stages/user_write/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -23189,9 +23497,9 @@ func (a *StagesApiService) StagesUserWriteRetrieveExecute(r ApiStagesUserWriteRe return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -23208,6 +23516,7 @@ func (a *StagesApiService) StagesUserWriteRetrieveExecute(r ApiStagesUserWriteRe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -23218,6 +23527,7 @@ func (a *StagesApiService) StagesUserWriteRetrieveExecute(r ApiStagesUserWriteRe newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -23284,7 +23594,7 @@ func (a *StagesApiService) StagesUserWriteUpdateExecute(r ApiStagesUserWriteUpda } localVarPath := localBasePath + "/stages/user_write/{stage_uuid}/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -23336,9 +23646,9 @@ func (a *StagesApiService) StagesUserWriteUpdateExecute(r ApiStagesUserWriteUpda return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -23355,6 +23665,7 @@ func (a *StagesApiService) StagesUserWriteUpdateExecute(r ApiStagesUserWriteUpda newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -23365,6 +23676,7 @@ func (a *StagesApiService) StagesUserWriteUpdateExecute(r ApiStagesUserWriteUpda newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr @@ -23425,7 +23737,7 @@ func (a *StagesApiService) StagesUserWriteUsedByListExecute(r ApiStagesUserWrite } localVarPath := localBasePath + "/stages/user_write/{stage_uuid}/used_by/" - localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterToString(r.stageUuid, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stage_uuid"+"}", url.PathEscape(parameterValueToString(r.stageUuid, "stageUuid")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -23472,9 +23784,9 @@ func (a *StagesApiService) StagesUserWriteUsedByListExecute(r ApiStagesUserWrite return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -23491,6 +23803,7 @@ func (a *StagesApiService) StagesUserWriteUsedByListExecute(r ApiStagesUserWrite newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -23501,6 +23814,7 @@ func (a *StagesApiService) StagesUserWriteUsedByListExecute(r ApiStagesUserWrite newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr diff --git a/client.go b/client.go index bae8b9a99..8437085fc 100644 --- a/client.go +++ b/client.go @@ -19,7 +19,6 @@ import ( "errors" "fmt" "io" - "io/ioutil" "log" "mime/multipart" "net/http" @@ -33,13 +32,13 @@ import ( "strings" "time" "unicode/utf8" - - "golang.org/x/oauth2" ) var ( - jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) - xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) + jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) + xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) + queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) + queryDescape = strings.NewReplacer("%5B", "[", "%5D", "]") ) // APIClient manages communication with the authentik API v2023.3.1 @@ -150,7 +149,7 @@ func selectHeaderAccept(accepts []string) string { // contains is a case insensitive match, finding needle in a haystack func contains(haystack []string, needle string) bool { for _, a := range haystack { - if strings.ToLower(a) == strings.ToLower(needle) { + if strings.EqualFold(a, needle) { return true } } @@ -166,33 +165,111 @@ func typeCheckParameter(obj interface{}, expected string, name string) error { // Check the type is as expected. if reflect.TypeOf(obj).String() != expected { - return fmt.Errorf("Expected %s to be of type %s but received %s.", name, expected, reflect.TypeOf(obj).String()) + return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) } return nil } -// parameterToString convert interface{} parameters to string, using a delimiter if format is provided. -func parameterToString(obj interface{}, collectionFormat string) string { - var delimiter string - - switch collectionFormat { - case "pipes": - delimiter = "|" - case "ssv": - delimiter = " " - case "tsv": - delimiter = "\t" - case "csv": - delimiter = "," +func parameterValueToString(obj interface{}, key string) string { + if reflect.TypeOf(obj).Kind() != reflect.Ptr { + return fmt.Sprintf("%v", obj) + } + var param, ok = obj.(MappedNullable) + if !ok { + return "" + } + dataMap, err := param.ToMap() + if err != nil { + return "" } + return fmt.Sprintf("%v", dataMap[key]) +} + +// parameterAddToHeaderOrQuery adds the provided object to the request header or url query +// supporting deep object syntax +func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { + var v = reflect.ValueOf(obj) + var value = "" + if v == reflect.ValueOf(nil) { + value = "null" + } else { + switch v.Kind() { + case reflect.Invalid: + value = "invalid" - if reflect.TypeOf(obj).Kind() == reflect.Slice { - return strings.Trim(strings.Replace(fmt.Sprint(obj), " ", delimiter, -1), "[]") - } else if t, ok := obj.(time.Time); ok { - return t.Format(time.RFC3339) + case reflect.Struct: + if t, ok := obj.(MappedNullable); ok { + dataMap, err := t.ToMap() + if err != nil { + return + } + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, collectionType) + return + } + if t, ok := obj.(time.Time); ok { + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339), collectionType) + return + } + value = v.Type().String() + " value" + case reflect.Slice: + var indValue = reflect.ValueOf(obj) + if indValue == reflect.ValueOf(nil) { + return + } + var lenIndValue = indValue.Len() + for i := 0; i < lenIndValue; i++ { + var arrayValue = indValue.Index(i) + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, arrayValue.Interface(), collectionType) + } + return + + case reflect.Map: + var indValue = reflect.ValueOf(obj) + if indValue == reflect.ValueOf(nil) { + return + } + iter := indValue.MapRange() + for iter.Next() { + k, v := iter.Key(), iter.Value() + parameterAddToHeaderOrQuery(headerOrQueryParams, fmt.Sprintf("%s[%s]", keyPrefix, k.String()), v.Interface(), collectionType) + } + return + + case reflect.Interface: + fallthrough + case reflect.Ptr: + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, v.Elem().Interface(), collectionType) + return + + case reflect.Int, reflect.Int8, reflect.Int16, + reflect.Int32, reflect.Int64: + value = strconv.FormatInt(v.Int(), 10) + case reflect.Uint, reflect.Uint8, reflect.Uint16, + reflect.Uint32, reflect.Uint64, reflect.Uintptr: + value = strconv.FormatUint(v.Uint(), 10) + case reflect.Float32, reflect.Float64: + value = strconv.FormatFloat(v.Float(), 'g', -1, 32) + case reflect.Bool: + value = strconv.FormatBool(v.Bool()) + case reflect.String: + value = v.String() + default: + value = v.Type().String() + " value" + } } - return fmt.Sprintf("%v", obj) + switch valuesMap := headerOrQueryParams.(type) { + case url.Values: + if collectionType == "csv" && valuesMap.Get(keyPrefix) != "" { + valuesMap.Set(keyPrefix, valuesMap.Get(keyPrefix)+","+value) + } else { + valuesMap.Add(keyPrefix, value) + } + break + case map[string]string: + valuesMap[keyPrefix] = value + break + } } // helper for converting interface{} parameters to json strings @@ -344,7 +421,11 @@ func (c *APIClient) prepareRequest( } // Encode the parameters. - url.RawQuery = query.Encode() + url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { + pieces := strings.Split(s, "=") + pieces[0] = queryDescape.Replace(pieces[0]) + return strings.Join(pieces, "=") + }) // Generate a new request if body != nil { @@ -374,27 +455,6 @@ func (c *APIClient) prepareRequest( // Walk through any authentication. - // OAuth2 authentication - if tok, ok := ctx.Value(ContextOAuth2).(oauth2.TokenSource); ok { - // We were able to grab an oauth2 token from the context - var latestToken *oauth2.Token - if latestToken, err = tok.Token(); err != nil { - return nil, err - } - - latestToken.SetAuthHeader(localVarRequest) - } - - // Basic HTTP Authentication - if auth, ok := ctx.Value(ContextBasicAuth).(BasicAuth); ok { - localVarRequest.SetBasicAuth(auth.UserName, auth.Password) - } - - // AccessToken Authentication - if auth, ok := ctx.Value(ContextAccessToken).(string); ok { - localVarRequest.Header.Add("Authorization", "Bearer "+auth) - } - } for header, value := range c.cfg.DefaultHeader { @@ -411,8 +471,20 @@ func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err err *s = string(b) return nil } + if f, ok := v.(*os.File); ok { + f, err = os.CreateTemp("", "HttpClientFile") + if err != nil { + return + } + _, err = f.Write(b) + if err != nil { + return + } + _, err = f.Seek(0, io.SeekStart) + return + } if f, ok := v.(**os.File); ok { - *f, err = ioutil.TempFile("", "HttpClientFile") + *f, err = os.CreateTemp("", "HttpClientFile") if err != nil { return } @@ -448,11 +520,14 @@ func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err err // Add a file to the multipart request func addFile(w *multipart.Writer, fieldName, path string) error { - file, err := os.Open(path) + file, err := os.Open(filepath.Clean(path)) + if err != nil { + return err + } + err = file.Close() if err != nil { return err } - defer file.Close() part, err := w.CreateFormFile(fieldName, filepath.Base(path)) if err != nil { @@ -483,8 +558,8 @@ func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err e if reader, ok := body.(io.Reader); ok { _, err = bodyBuf.ReadFrom(reader) - } else if fp, ok := body.(**os.File); ok { - _, err = bodyBuf.ReadFrom(*fp) + } else if fp, ok := body.(*os.File); ok { + _, err = bodyBuf.ReadFrom(fp) } else if b, ok := body.([]byte); ok { _, err = bodyBuf.Write(b) } else if s, ok := body.(string); ok { @@ -502,7 +577,7 @@ func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err e } if bodyBuf.Len() == 0 { - err = fmt.Errorf("Invalid body type %s\n", contentType) + err = fmt.Errorf("invalid body type %s\n", contentType) return nil, err } return bodyBuf, nil @@ -604,3 +679,22 @@ func (e GenericOpenAPIError) Body() []byte { func (e GenericOpenAPIError) Model() interface{} { return e.model } + +// format error message using title and detail when model implements rfc7807 +func formatErrorMessage(status string, v interface{}) string { + str := "" + metaValue := reflect.ValueOf(v).Elem() + + field := metaValue.FieldByName("Title") + if field != (reflect.Value{}) { + str = fmt.Sprintf("%s", field.Interface()) + } + + field = metaValue.FieldByName("Detail") + if field != (reflect.Value{}) { + str = fmt.Sprintf("%s (%s)", str, field.Interface()) + } + + // status title (detail) + return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) +} diff --git a/configuration.go b/configuration.go index 00ace29aa..d089f0166 100644 --- a/configuration.go +++ b/configuration.go @@ -29,21 +29,9 @@ func (c contextKey) String() string { } var ( - // ContextOAuth2 takes an oauth2.TokenSource as authentication for the request. - ContextOAuth2 = contextKey("token") - - // ContextBasicAuth takes BasicAuth as authentication for the request. - ContextBasicAuth = contextKey("basic") - - // ContextAccessToken takes a string oauth2 access token as authentication for the request. - ContextAccessToken = contextKey("accesstoken") - // ContextAPIKeys takes a string apikey as authentication for the request ContextAPIKeys = contextKey("apiKeys") - // ContextHttpSignatureAuth takes HttpSignatureAuth as authentication for the request. - ContextHttpSignatureAuth = contextKey("httpsignature") - // ContextServerIndex uses a server configuration from the index. ContextServerIndex = contextKey("serverIndex") @@ -123,7 +111,7 @@ func (c *Configuration) AddDefaultHeader(key string, value string) { // URL formats template on a index using given variables func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) { if index < 0 || len(sc) <= index { - return "", fmt.Errorf("Index %v out of range %v", index, len(sc)-1) + return "", fmt.Errorf("index %v out of range %v", index, len(sc)-1) } server := sc[index] url := server.URL @@ -138,7 +126,7 @@ func (sc ServerConfigurations) URL(index int, variables map[string]string) (stri } } if !found { - return "", fmt.Errorf("The variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) + return "", fmt.Errorf("the variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) } url = strings.Replace(url, "{"+name+"}", value, -1) } else { diff --git a/docs/AdminApi.md b/docs/AdminApi.md index 98579ee9c..c15f89ea0 100644 --- a/docs/AdminApi.md +++ b/docs/AdminApi.md @@ -33,7 +33,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -94,7 +94,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -155,7 +155,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -216,7 +216,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -277,7 +277,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -338,7 +338,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -408,7 +408,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -416,7 +416,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AdminApi.AdminSystemTasksRetryCreate(context.Background(), id).Execute() + r, err := apiClient.AdminApi.AdminSystemTasksRetryCreate(context.Background(), id).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `AdminApi.AdminSystemTasksRetryCreate``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -476,7 +476,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -537,7 +537,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { diff --git a/docs/Application.md b/docs/Application.md index 24dfabadb..fec1e0870 100644 --- a/docs/Application.md +++ b/docs/Application.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **Name** | **string** | Application's display Name. | **Slug** | **string** | Internal application name, used in URLs. | **Provider** | Pointer to **NullableInt32** | | [optional] -**ProviderObj** | [**ApplicationProviderObj**](ApplicationProviderObj.md) | | +**ProviderObj** | [**Provider**](Provider.md) | | [readonly] **LaunchUrl** | **NullableString** | Allow formatting of launch URL | [readonly] **OpenInNewTab** | Pointer to **bool** | Open launch URL in a new browser tab or window. | [optional] **MetaLaunchUrl** | Pointer to **string** | | [optional] @@ -22,7 +22,7 @@ Name | Type | Description | Notes ### NewApplication -`func NewApplication(pk string, name string, slug string, providerObj ApplicationProviderObj, launchUrl NullableString, metaIcon NullableString, ) *Application` +`func NewApplication(pk string, name string, slug string, providerObj Provider, launchUrl NullableString, metaIcon NullableString, ) *Application` NewApplication instantiates a new Application object This constructor will assign default values to properties that have it defined, @@ -134,20 +134,20 @@ HasProvider returns a boolean if a field has been set. UnsetProvider ensures that no value is present for Provider, not even an explicit nil ### GetProviderObj -`func (o *Application) GetProviderObj() ApplicationProviderObj` +`func (o *Application) GetProviderObj() Provider` GetProviderObj returns the ProviderObj field if non-nil, zero value otherwise. ### GetProviderObjOk -`func (o *Application) GetProviderObjOk() (*ApplicationProviderObj, bool)` +`func (o *Application) GetProviderObjOk() (*Provider, bool)` GetProviderObjOk returns a tuple with the ProviderObj field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProviderObj -`func (o *Application) SetProviderObj(v ApplicationProviderObj)` +`func (o *Application) SetProviderObj(v Provider)` SetProviderObj sets ProviderObj field to given value. diff --git a/docs/ApplicationProviderObj.md b/docs/ApplicationProviderObj.md deleted file mode 100644 index 58af404d0..000000000 --- a/docs/ApplicationProviderObj.md +++ /dev/null @@ -1,281 +0,0 @@ -# ApplicationProviderObj - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Pk** | **int32** | | [readonly] -**Name** | **string** | | -**AuthenticationFlow** | Pointer to **NullableString** | Flow used for authentication when the associated application is accessed by an un-authenticated user. | [optional] -**AuthorizationFlow** | **string** | Flow used when authorizing this provider. | -**PropertyMappings** | Pointer to **[]string** | | [optional] -**Component** | **string** | Get object component so that we know how to edit the object | [readonly] -**AssignedApplicationSlug** | **string** | Internal application name, used in URLs. | [readonly] -**AssignedApplicationName** | **string** | Application's display Name. | [readonly] -**VerboseName** | **string** | Return object's verbose_name | [readonly] -**VerboseNamePlural** | **string** | Return object's plural verbose_name | [readonly] -**MetaModelName** | **string** | Return internal model name | [readonly] - -## Methods - -### NewApplicationProviderObj - -`func NewApplicationProviderObj(pk int32, name string, authorizationFlow string, component string, assignedApplicationSlug string, assignedApplicationName string, verboseName string, verboseNamePlural string, metaModelName string, ) *ApplicationProviderObj` - -NewApplicationProviderObj instantiates a new ApplicationProviderObj object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewApplicationProviderObjWithDefaults - -`func NewApplicationProviderObjWithDefaults() *ApplicationProviderObj` - -NewApplicationProviderObjWithDefaults instantiates a new ApplicationProviderObj object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetPk - -`func (o *ApplicationProviderObj) GetPk() int32` - -GetPk returns the Pk field if non-nil, zero value otherwise. - -### GetPkOk - -`func (o *ApplicationProviderObj) GetPkOk() (*int32, bool)` - -GetPkOk returns a tuple with the Pk field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPk - -`func (o *ApplicationProviderObj) SetPk(v int32)` - -SetPk sets Pk field to given value. - - -### GetName - -`func (o *ApplicationProviderObj) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *ApplicationProviderObj) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *ApplicationProviderObj) SetName(v string)` - -SetName sets Name field to given value. - - -### GetAuthenticationFlow - -`func (o *ApplicationProviderObj) GetAuthenticationFlow() string` - -GetAuthenticationFlow returns the AuthenticationFlow field if non-nil, zero value otherwise. - -### GetAuthenticationFlowOk - -`func (o *ApplicationProviderObj) GetAuthenticationFlowOk() (*string, bool)` - -GetAuthenticationFlowOk returns a tuple with the AuthenticationFlow field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAuthenticationFlow - -`func (o *ApplicationProviderObj) SetAuthenticationFlow(v string)` - -SetAuthenticationFlow sets AuthenticationFlow field to given value. - -### HasAuthenticationFlow - -`func (o *ApplicationProviderObj) HasAuthenticationFlow() bool` - -HasAuthenticationFlow returns a boolean if a field has been set. - -### SetAuthenticationFlowNil - -`func (o *ApplicationProviderObj) SetAuthenticationFlowNil(b bool)` - - SetAuthenticationFlowNil sets the value for AuthenticationFlow to be an explicit nil - -### UnsetAuthenticationFlow -`func (o *ApplicationProviderObj) UnsetAuthenticationFlow()` - -UnsetAuthenticationFlow ensures that no value is present for AuthenticationFlow, not even an explicit nil -### GetAuthorizationFlow - -`func (o *ApplicationProviderObj) GetAuthorizationFlow() string` - -GetAuthorizationFlow returns the AuthorizationFlow field if non-nil, zero value otherwise. - -### GetAuthorizationFlowOk - -`func (o *ApplicationProviderObj) GetAuthorizationFlowOk() (*string, bool)` - -GetAuthorizationFlowOk returns a tuple with the AuthorizationFlow field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAuthorizationFlow - -`func (o *ApplicationProviderObj) SetAuthorizationFlow(v string)` - -SetAuthorizationFlow sets AuthorizationFlow field to given value. - - -### GetPropertyMappings - -`func (o *ApplicationProviderObj) GetPropertyMappings() []string` - -GetPropertyMappings returns the PropertyMappings field if non-nil, zero value otherwise. - -### GetPropertyMappingsOk - -`func (o *ApplicationProviderObj) GetPropertyMappingsOk() (*[]string, bool)` - -GetPropertyMappingsOk returns a tuple with the PropertyMappings field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPropertyMappings - -`func (o *ApplicationProviderObj) SetPropertyMappings(v []string)` - -SetPropertyMappings sets PropertyMappings field to given value. - -### HasPropertyMappings - -`func (o *ApplicationProviderObj) HasPropertyMappings() bool` - -HasPropertyMappings returns a boolean if a field has been set. - -### GetComponent - -`func (o *ApplicationProviderObj) GetComponent() string` - -GetComponent returns the Component field if non-nil, zero value otherwise. - -### GetComponentOk - -`func (o *ApplicationProviderObj) GetComponentOk() (*string, bool)` - -GetComponentOk returns a tuple with the Component field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetComponent - -`func (o *ApplicationProviderObj) SetComponent(v string)` - -SetComponent sets Component field to given value. - - -### GetAssignedApplicationSlug - -`func (o *ApplicationProviderObj) GetAssignedApplicationSlug() string` - -GetAssignedApplicationSlug returns the AssignedApplicationSlug field if non-nil, zero value otherwise. - -### GetAssignedApplicationSlugOk - -`func (o *ApplicationProviderObj) GetAssignedApplicationSlugOk() (*string, bool)` - -GetAssignedApplicationSlugOk returns a tuple with the AssignedApplicationSlug field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAssignedApplicationSlug - -`func (o *ApplicationProviderObj) SetAssignedApplicationSlug(v string)` - -SetAssignedApplicationSlug sets AssignedApplicationSlug field to given value. - - -### GetAssignedApplicationName - -`func (o *ApplicationProviderObj) GetAssignedApplicationName() string` - -GetAssignedApplicationName returns the AssignedApplicationName field if non-nil, zero value otherwise. - -### GetAssignedApplicationNameOk - -`func (o *ApplicationProviderObj) GetAssignedApplicationNameOk() (*string, bool)` - -GetAssignedApplicationNameOk returns a tuple with the AssignedApplicationName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAssignedApplicationName - -`func (o *ApplicationProviderObj) SetAssignedApplicationName(v string)` - -SetAssignedApplicationName sets AssignedApplicationName field to given value. - - -### GetVerboseName - -`func (o *ApplicationProviderObj) GetVerboseName() string` - -GetVerboseName returns the VerboseName field if non-nil, zero value otherwise. - -### GetVerboseNameOk - -`func (o *ApplicationProviderObj) GetVerboseNameOk() (*string, bool)` - -GetVerboseNameOk returns a tuple with the VerboseName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetVerboseName - -`func (o *ApplicationProviderObj) SetVerboseName(v string)` - -SetVerboseName sets VerboseName field to given value. - - -### GetVerboseNamePlural - -`func (o *ApplicationProviderObj) GetVerboseNamePlural() string` - -GetVerboseNamePlural returns the VerboseNamePlural field if non-nil, zero value otherwise. - -### GetVerboseNamePluralOk - -`func (o *ApplicationProviderObj) GetVerboseNamePluralOk() (*string, bool)` - -GetVerboseNamePluralOk returns a tuple with the VerboseNamePlural field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetVerboseNamePlural - -`func (o *ApplicationProviderObj) SetVerboseNamePlural(v string)` - -SetVerboseNamePlural sets VerboseNamePlural field to given value. - - -### GetMetaModelName - -`func (o *ApplicationProviderObj) GetMetaModelName() string` - -GetMetaModelName returns the MetaModelName field if non-nil, zero value otherwise. - -### GetMetaModelNameOk - -`func (o *ApplicationProviderObj) GetMetaModelNameOk() (*string, bool)` - -GetMetaModelNameOk returns a tuple with the MetaModelName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMetaModelName - -`func (o *ApplicationProviderObj) SetMetaModelName(v string)` - -SetMetaModelName sets MetaModelName field to given value. - - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AuthenticatorTOTPStage.md b/docs/AuthenticatorTOTPStage.md index 865d6d967..b6e25b7f5 100644 --- a/docs/AuthenticatorTOTPStage.md +++ b/docs/AuthenticatorTOTPStage.md @@ -12,13 +12,13 @@ Name | Type | Description | Notes **MetaModelName** | **string** | Return internal model name | [readonly] **FlowSet** | Pointer to [**[]FlowSet**](FlowSet.md) | | [optional] **ConfigureFlow** | Pointer to **NullableString** | Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. | [optional] -**Digits** | [**NullableDigitsEnum**](DigitsEnum.md) | | +**Digits** | [**DigitsEnum**](DigitsEnum.md) | | ## Methods ### NewAuthenticatorTOTPStage -`func NewAuthenticatorTOTPStage(pk string, name string, component string, verboseName string, verboseNamePlural string, metaModelName string, digits NullableDigitsEnum, ) *AuthenticatorTOTPStage` +`func NewAuthenticatorTOTPStage(pk string, name string, component string, verboseName string, verboseNamePlural string, metaModelName string, digits DigitsEnum, ) *AuthenticatorTOTPStage` NewAuthenticatorTOTPStage instantiates a new AuthenticatorTOTPStage object This constructor will assign default values to properties that have it defined, @@ -233,16 +233,6 @@ and a boolean to check if the value has been set. SetDigits sets Digits field to given value. -### SetDigitsNil - -`func (o *AuthenticatorTOTPStage) SetDigitsNil(b bool)` - - SetDigitsNil sets the value for Digits to be an explicit nil - -### UnsetDigits -`func (o *AuthenticatorTOTPStage) UnsetDigits()` - -UnsetDigits ensures that no value is present for Digits, not even an explicit nil [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AuthenticatorTOTPStageRequest.md b/docs/AuthenticatorTOTPStageRequest.md index 0c54faa23..9f0f29760 100644 --- a/docs/AuthenticatorTOTPStageRequest.md +++ b/docs/AuthenticatorTOTPStageRequest.md @@ -7,13 +7,13 @@ Name | Type | Description | Notes **Name** | **string** | | **FlowSet** | Pointer to [**[]FlowSetRequest**](FlowSetRequest.md) | | [optional] **ConfigureFlow** | Pointer to **NullableString** | Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. | [optional] -**Digits** | [**NullableDigitsEnum**](DigitsEnum.md) | | +**Digits** | [**DigitsEnum**](DigitsEnum.md) | | ## Methods ### NewAuthenticatorTOTPStageRequest -`func NewAuthenticatorTOTPStageRequest(name string, digits NullableDigitsEnum, ) *AuthenticatorTOTPStageRequest` +`func NewAuthenticatorTOTPStageRequest(name string, digits DigitsEnum, ) *AuthenticatorTOTPStageRequest` NewAuthenticatorTOTPStageRequest instantiates a new AuthenticatorTOTPStageRequest object This constructor will assign default values to properties that have it defined, @@ -128,16 +128,6 @@ and a boolean to check if the value has been set. SetDigits sets Digits field to given value. -### SetDigitsNil - -`func (o *AuthenticatorTOTPStageRequest) SetDigitsNil(b bool)` - - SetDigitsNil sets the value for Digits to be an explicit nil - -### UnsetDigits -`func (o *AuthenticatorTOTPStageRequest) UnsetDigits()` - -UnsetDigits ensures that no value is present for Digits, not even an explicit nil [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AuthenticatorValidateStage.md b/docs/AuthenticatorValidateStage.md index 64f48add0..2124efffe 100644 --- a/docs/AuthenticatorValidateStage.md +++ b/docs/AuthenticatorValidateStage.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes **DeviceClasses** | Pointer to [**[]DeviceClassesEnum**](DeviceClassesEnum.md) | Device classes which can be used to authenticate | [optional] **ConfigurationStages** | Pointer to **[]string** | Stages used to configure Authenticator when user doesn't have any compatible devices. After this configuration Stage passes, the user is not prompted again. | [optional] **LastAuthThreshold** | Pointer to **string** | If any of the user's device has been used within this threshold, this stage will be skipped | [optional] -**WebauthnUserVerification** | Pointer to [**NullableUserVerificationEnum**](UserVerificationEnum.md) | Enforce user verification for WebAuthn devices. * `required` - Required * `preferred` - Preferred * `discouraged` - Discouraged | [optional] +**WebauthnUserVerification** | Pointer to [**UserVerificationEnum**](UserVerificationEnum.md) | | [optional] ## Methods @@ -306,16 +306,6 @@ SetWebauthnUserVerification sets WebauthnUserVerification field to given value. HasWebauthnUserVerification returns a boolean if a field has been set. -### SetWebauthnUserVerificationNil - -`func (o *AuthenticatorValidateStage) SetWebauthnUserVerificationNil(b bool)` - - SetWebauthnUserVerificationNil sets the value for WebauthnUserVerification to be an explicit nil - -### UnsetWebauthnUserVerification -`func (o *AuthenticatorValidateStage) UnsetWebauthnUserVerification()` - -UnsetWebauthnUserVerification ensures that no value is present for WebauthnUserVerification, not even an explicit nil [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AuthenticatorValidateStageRequest.md b/docs/AuthenticatorValidateStageRequest.md index 374a3ba7f..dfcf969f6 100644 --- a/docs/AuthenticatorValidateStageRequest.md +++ b/docs/AuthenticatorValidateStageRequest.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **DeviceClasses** | Pointer to [**[]DeviceClassesEnum**](DeviceClassesEnum.md) | Device classes which can be used to authenticate | [optional] **ConfigurationStages** | Pointer to **[]string** | Stages used to configure Authenticator when user doesn't have any compatible devices. After this configuration Stage passes, the user is not prompted again. | [optional] **LastAuthThreshold** | Pointer to **string** | If any of the user's device has been used within this threshold, this stage will be skipped | [optional] -**WebauthnUserVerification** | Pointer to [**NullableUserVerificationEnum**](UserVerificationEnum.md) | Enforce user verification for WebAuthn devices. * `required` - Required * `preferred` - Preferred * `discouraged` - Discouraged | [optional] +**WebauthnUserVerification** | Pointer to [**UserVerificationEnum**](UserVerificationEnum.md) | | [optional] ## Methods @@ -201,16 +201,6 @@ SetWebauthnUserVerification sets WebauthnUserVerification field to given value. HasWebauthnUserVerification returns a boolean if a field has been set. -### SetWebauthnUserVerificationNil - -`func (o *AuthenticatorValidateStageRequest) SetWebauthnUserVerificationNil(b bool)` - - SetWebauthnUserVerificationNil sets the value for WebauthnUserVerification to be an explicit nil - -### UnsetWebauthnUserVerification -`func (o *AuthenticatorValidateStageRequest) UnsetWebauthnUserVerification()` - -UnsetWebauthnUserVerification ensures that no value is present for WebauthnUserVerification, not even an explicit nil [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AuthenticatorsApi.md b/docs/AuthenticatorsApi.md index 3a1b17673..6a1996773 100644 --- a/docs/AuthenticatorsApi.md +++ b/docs/AuthenticatorsApi.md @@ -86,7 +86,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -152,7 +152,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -218,7 +218,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -226,7 +226,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AuthenticatorsApi.AuthenticatorsAdminDuoDestroy(context.Background(), id).Execute() + r, err := apiClient.AuthenticatorsApi.AuthenticatorsAdminDuoDestroy(context.Background(), id).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `AuthenticatorsApi.AuthenticatorsAdminDuoDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -286,7 +286,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -360,7 +360,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -432,7 +432,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -502,7 +502,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -574,7 +574,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -640,7 +640,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -648,7 +648,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AuthenticatorsApi.AuthenticatorsAdminSmsDestroy(context.Background(), id).Execute() + r, err := apiClient.AuthenticatorsApi.AuthenticatorsAdminSmsDestroy(context.Background(), id).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `AuthenticatorsApi.AuthenticatorsAdminSmsDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -708,7 +708,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -782,7 +782,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -854,7 +854,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -924,7 +924,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -996,7 +996,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1062,7 +1062,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1070,7 +1070,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AuthenticatorsApi.AuthenticatorsAdminStaticDestroy(context.Background(), id).Execute() + r, err := apiClient.AuthenticatorsApi.AuthenticatorsAdminStaticDestroy(context.Background(), id).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `AuthenticatorsApi.AuthenticatorsAdminStaticDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -1130,7 +1130,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1204,7 +1204,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1276,7 +1276,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1346,7 +1346,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1418,7 +1418,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1484,7 +1484,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1492,7 +1492,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AuthenticatorsApi.AuthenticatorsAdminTotpDestroy(context.Background(), id).Execute() + r, err := apiClient.AuthenticatorsApi.AuthenticatorsAdminTotpDestroy(context.Background(), id).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `AuthenticatorsApi.AuthenticatorsAdminTotpDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -1552,7 +1552,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1626,7 +1626,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1698,7 +1698,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1768,7 +1768,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1840,7 +1840,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1906,7 +1906,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1914,7 +1914,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AuthenticatorsApi.AuthenticatorsAdminWebauthnDestroy(context.Background(), id).Execute() + r, err := apiClient.AuthenticatorsApi.AuthenticatorsAdminWebauthnDestroy(context.Background(), id).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `AuthenticatorsApi.AuthenticatorsAdminWebauthnDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -1974,7 +1974,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2048,7 +2048,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2120,7 +2120,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2190,7 +2190,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2262,7 +2262,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2323,7 +2323,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2331,7 +2331,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AuthenticatorsApi.AuthenticatorsDuoDestroy(context.Background(), id).Execute() + r, err := apiClient.AuthenticatorsApi.AuthenticatorsDuoDestroy(context.Background(), id).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `AuthenticatorsApi.AuthenticatorsDuoDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -2391,7 +2391,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2465,7 +2465,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2537,7 +2537,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2607,7 +2607,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2679,7 +2679,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2749,7 +2749,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2757,7 +2757,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AuthenticatorsApi.AuthenticatorsSmsDestroy(context.Background(), id).Execute() + r, err := apiClient.AuthenticatorsApi.AuthenticatorsSmsDestroy(context.Background(), id).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `AuthenticatorsApi.AuthenticatorsSmsDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -2817,7 +2817,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2891,7 +2891,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2963,7 +2963,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3033,7 +3033,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3105,7 +3105,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3175,7 +3175,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3183,7 +3183,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AuthenticatorsApi.AuthenticatorsStaticDestroy(context.Background(), id).Execute() + r, err := apiClient.AuthenticatorsApi.AuthenticatorsStaticDestroy(context.Background(), id).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `AuthenticatorsApi.AuthenticatorsStaticDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -3243,7 +3243,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3317,7 +3317,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3389,7 +3389,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3459,7 +3459,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3531,7 +3531,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3601,7 +3601,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3609,7 +3609,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AuthenticatorsApi.AuthenticatorsTotpDestroy(context.Background(), id).Execute() + r, err := apiClient.AuthenticatorsApi.AuthenticatorsTotpDestroy(context.Background(), id).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `AuthenticatorsApi.AuthenticatorsTotpDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -3669,7 +3669,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3743,7 +3743,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3815,7 +3815,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3885,7 +3885,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3957,7 +3957,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -4027,7 +4027,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -4035,7 +4035,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AuthenticatorsApi.AuthenticatorsWebauthnDestroy(context.Background(), id).Execute() + r, err := apiClient.AuthenticatorsApi.AuthenticatorsWebauthnDestroy(context.Background(), id).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `AuthenticatorsApi.AuthenticatorsWebauthnDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -4095,7 +4095,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -4169,7 +4169,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -4241,7 +4241,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -4311,7 +4311,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -4383,7 +4383,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { diff --git a/docs/BlueprintFile.md b/docs/BlueprintFile.md index 294a629ac..f6cc07734 100644 --- a/docs/BlueprintFile.md +++ b/docs/BlueprintFile.md @@ -7,13 +7,13 @@ Name | Type | Description | Notes **Path** | **string** | | **LastM** | **time.Time** | | **Hash** | **string** | | -**Meta** | [**BlueprintFileMeta**](BlueprintFileMeta.md) | | +**Meta** | [**Metadata**](Metadata.md) | | [readonly] ## Methods ### NewBlueprintFile -`func NewBlueprintFile(path string, lastM time.Time, hash string, meta BlueprintFileMeta, ) *BlueprintFile` +`func NewBlueprintFile(path string, lastM time.Time, hash string, meta Metadata, ) *BlueprintFile` NewBlueprintFile instantiates a new BlueprintFile object This constructor will assign default values to properties that have it defined, @@ -90,20 +90,20 @@ SetHash sets Hash field to given value. ### GetMeta -`func (o *BlueprintFile) GetMeta() BlueprintFileMeta` +`func (o *BlueprintFile) GetMeta() Metadata` GetMeta returns the Meta field if non-nil, zero value otherwise. ### GetMetaOk -`func (o *BlueprintFile) GetMetaOk() (*BlueprintFileMeta, bool)` +`func (o *BlueprintFile) GetMetaOk() (*Metadata, bool)` GetMetaOk returns a tuple with the Meta field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMeta -`func (o *BlueprintFile) SetMeta(v BlueprintFileMeta)` +`func (o *BlueprintFile) SetMeta(v Metadata)` SetMeta sets Meta field to given value. diff --git a/docs/BlueprintFileMeta.md b/docs/BlueprintFileMeta.md deleted file mode 100644 index 727726bce..000000000 --- a/docs/BlueprintFileMeta.md +++ /dev/null @@ -1,72 +0,0 @@ -# BlueprintFileMeta - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | -**Labels** | **map[string]interface{}** | | - -## Methods - -### NewBlueprintFileMeta - -`func NewBlueprintFileMeta(name string, labels map[string]interface{}, ) *BlueprintFileMeta` - -NewBlueprintFileMeta instantiates a new BlueprintFileMeta object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewBlueprintFileMetaWithDefaults - -`func NewBlueprintFileMetaWithDefaults() *BlueprintFileMeta` - -NewBlueprintFileMetaWithDefaults instantiates a new BlueprintFileMeta object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetName - -`func (o *BlueprintFileMeta) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *BlueprintFileMeta) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *BlueprintFileMeta) SetName(v string)` - -SetName sets Name field to given value. - - -### GetLabels - -`func (o *BlueprintFileMeta) GetLabels() map[string]interface{}` - -GetLabels returns the Labels field if non-nil, zero value otherwise. - -### GetLabelsOk - -`func (o *BlueprintFileMeta) GetLabelsOk() (*map[string]interface{}, bool)` - -GetLabelsOk returns a tuple with the Labels field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLabels - -`func (o *BlueprintFileMeta) SetLabels(v map[string]interface{})` - -SetLabels sets Labels field to given value. - - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/BlueprintInstance.md b/docs/BlueprintInstance.md index 37f717ea1..16943602f 100644 --- a/docs/BlueprintInstance.md +++ b/docs/BlueprintInstance.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **Context** | Pointer to **map[string]interface{}** | | [optional] **LastApplied** | **time.Time** | | [readonly] **LastAppliedHash** | **string** | | [readonly] -**Status** | [**NullableBlueprintInstanceStatusEnum**](BlueprintInstanceStatusEnum.md) | | [readonly] +**Status** | [**BlueprintInstanceStatusEnum**](BlueprintInstanceStatusEnum.md) | | [readonly] **Enabled** | Pointer to **bool** | | [optional] **ManagedModels** | **[]string** | | [readonly] **Metadata** | **map[string]interface{}** | | [readonly] @@ -20,7 +20,7 @@ Name | Type | Description | Notes ### NewBlueprintInstance -`func NewBlueprintInstance(pk string, name string, lastApplied time.Time, lastAppliedHash string, status NullableBlueprintInstanceStatusEnum, managedModels []string, metadata map[string]interface{}, ) *BlueprintInstance` +`func NewBlueprintInstance(pk string, name string, lastApplied time.Time, lastAppliedHash string, status BlueprintInstanceStatusEnum, managedModels []string, metadata map[string]interface{}, ) *BlueprintInstance` NewBlueprintInstance instantiates a new BlueprintInstance object This constructor will assign default values to properties that have it defined, @@ -185,16 +185,6 @@ and a boolean to check if the value has been set. SetStatus sets Status field to given value. -### SetStatusNil - -`func (o *BlueprintInstance) SetStatusNil(b bool)` - - SetStatusNil sets the value for Status to be an explicit nil - -### UnsetStatus -`func (o *BlueprintInstance) UnsetStatus()` - -UnsetStatus ensures that no value is present for Status, not even an explicit nil ### GetEnabled `func (o *BlueprintInstance) GetEnabled() bool` diff --git a/docs/CoreApi.md b/docs/CoreApi.md index 4e24b6301..01c2221bf 100644 --- a/docs/CoreApi.md +++ b/docs/CoreApi.md @@ -83,7 +83,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -155,7 +155,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -221,7 +221,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -229,7 +229,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.CoreApi.CoreApplicationsDestroy(context.Background(), slug).Execute() + r, err := apiClient.CoreApi.CoreApplicationsDestroy(context.Background(), slug).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `CoreApi.CoreApplicationsDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -289,7 +289,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -375,7 +375,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -445,7 +445,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -517,7 +517,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -587,7 +587,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -597,7 +597,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.CoreApi.CoreApplicationsSetIconCreate(context.Background(), slug).File(file).Clear(clear).Execute() + r, err := apiClient.CoreApi.CoreApplicationsSetIconCreate(context.Background(), slug).File(file).Clear(clear).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `CoreApi.CoreApplicationsSetIconCreate``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -659,7 +659,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -668,7 +668,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.CoreApi.CoreApplicationsSetIconUrlCreate(context.Background(), slug).FilePathRequest(filePathRequest).Execute() + r, err := apiClient.CoreApi.CoreApplicationsSetIconUrlCreate(context.Background(), slug).FilePathRequest(filePathRequest).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `CoreApi.CoreApplicationsSetIconUrlCreate``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -729,7 +729,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -801,7 +801,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -871,7 +871,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -879,7 +879,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.CoreApi.CoreAuthenticatedSessionsDestroy(context.Background(), uuid).Execute() + r, err := apiClient.CoreApi.CoreAuthenticatedSessionsDestroy(context.Background(), uuid).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `CoreApi.CoreAuthenticatedSessionsDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -939,7 +939,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1017,7 +1017,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1087,7 +1087,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1157,7 +1157,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1166,7 +1166,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.CoreApi.CoreGroupsAddUserCreate(context.Background(), groupUuid).UserAccountRequest(userAccountRequest).Execute() + r, err := apiClient.CoreApi.CoreGroupsAddUserCreate(context.Background(), groupUuid).UserAccountRequest(userAccountRequest).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `CoreApi.CoreGroupsAddUserCreate``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -1227,7 +1227,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1293,7 +1293,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1301,7 +1301,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.CoreApi.CoreGroupsDestroy(context.Background(), groupUuid).Execute() + r, err := apiClient.CoreApi.CoreGroupsDestroy(context.Background(), groupUuid).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `CoreApi.CoreGroupsDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -1361,7 +1361,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1443,7 +1443,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1515,7 +1515,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1524,7 +1524,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.CoreApi.CoreGroupsRemoveUserCreate(context.Background(), groupUuid).UserAccountRequest(userAccountRequest).Execute() + r, err := apiClient.CoreApi.CoreGroupsRemoveUserCreate(context.Background(), groupUuid).UserAccountRequest(userAccountRequest).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `CoreApi.CoreGroupsRemoveUserCreate``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -1585,7 +1585,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1655,7 +1655,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1727,7 +1727,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1797,7 +1797,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1863,7 +1863,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1924,7 +1924,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1932,7 +1932,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.CoreApi.CoreTenantsDestroy(context.Background(), tenantUuid).Execute() + r, err := apiClient.CoreApi.CoreTenantsDestroy(context.Background(), tenantUuid).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `CoreApi.CoreTenantsDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -1992,7 +1992,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2092,7 +2092,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2164,7 +2164,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2234,7 +2234,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2306,7 +2306,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2376,7 +2376,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2442,7 +2442,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2450,7 +2450,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.CoreApi.CoreTokensDestroy(context.Background(), identifier).Execute() + r, err := apiClient.CoreApi.CoreTokensDestroy(context.Background(), identifier).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `CoreApi.CoreTokensDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -2511,7 +2511,7 @@ import ( "fmt" "os" "time" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2597,7 +2597,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2669,7 +2669,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2739,7 +2739,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2748,7 +2748,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.CoreApi.CoreTokensSetKeyCreate(context.Background(), identifier).TokenSetKeyRequest(tokenSetKeyRequest).Execute() + r, err := apiClient.CoreApi.CoreTokensSetKeyCreate(context.Background(), identifier).TokenSetKeyRequest(tokenSetKeyRequest).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `CoreApi.CoreTokensSetKeyCreate``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -2809,7 +2809,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2881,7 +2881,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2951,7 +2951,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3021,7 +3021,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3029,7 +3029,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.CoreApi.CoreUserConsentDestroy(context.Background(), id).Execute() + r, err := apiClient.CoreApi.CoreUserConsentDestroy(context.Background(), id).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `CoreApi.CoreUserConsentDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -3089,7 +3089,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3165,7 +3165,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3235,7 +3235,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3305,7 +3305,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3371,7 +3371,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3379,7 +3379,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.CoreApi.CoreUsersDestroy(context.Background(), id).Execute() + r, err := apiClient.CoreApi.CoreUsersDestroy(context.Background(), id).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `CoreApi.CoreUsersDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -3439,7 +3439,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3533,7 +3533,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3594,7 +3594,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3664,7 +3664,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3736,7 +3736,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3802,7 +3802,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3811,7 +3811,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.CoreApi.CoreUsersRecoveryEmailRetrieve(context.Background(), id).EmailStage(emailStage).Execute() + r, err := apiClient.CoreApi.CoreUsersRecoveryEmailRetrieve(context.Background(), id).EmailStage(emailStage).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `CoreApi.CoreUsersRecoveryEmailRetrieve``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -3872,7 +3872,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3942,7 +3942,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -4012,7 +4012,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -4078,7 +4078,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -4087,7 +4087,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.CoreApi.CoreUsersSetPasswordCreate(context.Background(), id).UserPasswordSetRequest(userPasswordSetRequest).Execute() + r, err := apiClient.CoreApi.CoreUsersSetPasswordCreate(context.Background(), id).UserPasswordSetRequest(userPasswordSetRequest).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `CoreApi.CoreUsersSetPasswordCreate``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -4148,7 +4148,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -4220,7 +4220,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { diff --git a/docs/CryptoApi.md b/docs/CryptoApi.md index 31552f6c0..972323aca 100644 --- a/docs/CryptoApi.md +++ b/docs/CryptoApi.md @@ -34,7 +34,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -100,7 +100,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -108,7 +108,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.CryptoApi.CryptoCertificatekeypairsDestroy(context.Background(), kpUuid).Execute() + r, err := apiClient.CryptoApi.CryptoCertificatekeypairsDestroy(context.Background(), kpUuid).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `CryptoApi.CryptoCertificatekeypairsDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -168,7 +168,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -234,7 +234,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -314,7 +314,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -386,7 +386,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -456,7 +456,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -528,7 +528,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -598,7 +598,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -670,7 +670,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { diff --git a/docs/CurrentTenant.md b/docs/CurrentTenant.md index aa9acf0a1..5fa6d2c94 100644 --- a/docs/CurrentTenant.md +++ b/docs/CurrentTenant.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **BrandingLogo** | **string** | | **BrandingFavicon** | **string** | | **UiFooterLinks** | [**[]FooterLink**](FooterLink.md) | | [readonly] [default to []] -**UiTheme** | [**NullableUiThemeEnum**](UiThemeEnum.md) | | [readonly] +**UiTheme** | [**UiThemeEnum**](UiThemeEnum.md) | | [readonly] [default to UITHEMEENUM_AUTOMATIC] **FlowAuthentication** | Pointer to **string** | | [optional] **FlowInvalidation** | Pointer to **string** | | [optional] **FlowRecovery** | Pointer to **string** | | [optional] @@ -22,7 +22,7 @@ Name | Type | Description | Notes ### NewCurrentTenant -`func NewCurrentTenant(matchedDomain string, brandingTitle string, brandingLogo string, brandingFavicon string, uiFooterLinks []FooterLink, uiTheme NullableUiThemeEnum, defaultLocale string, ) *CurrentTenant` +`func NewCurrentTenant(matchedDomain string, brandingTitle string, brandingLogo string, brandingFavicon string, uiFooterLinks []FooterLink, uiTheme UiThemeEnum, defaultLocale string, ) *CurrentTenant` NewCurrentTenant instantiates a new CurrentTenant object This constructor will assign default values to properties that have it defined, @@ -157,16 +157,6 @@ and a boolean to check if the value has been set. SetUiTheme sets UiTheme field to given value. -### SetUiThemeNil - -`func (o *CurrentTenant) SetUiThemeNil(b bool)` - - SetUiThemeNil sets the value for UiTheme to be an explicit nil - -### UnsetUiTheme -`func (o *CurrentTenant) UnsetUiTheme()` - -UnsetUiTheme ensures that no value is present for UiTheme, not even an explicit nil ### GetFlowAuthentication `func (o *CurrentTenant) GetFlowAuthentication() string` diff --git a/docs/EventMatcherPolicy.md b/docs/EventMatcherPolicy.md index 23d933239..5fdb060d5 100644 --- a/docs/EventMatcherPolicy.md +++ b/docs/EventMatcherPolicy.md @@ -12,9 +12,9 @@ Name | Type | Description | Notes **VerboseNamePlural** | **string** | Return object's plural verbose_name | [readonly] **MetaModelName** | **string** | Return internal model name | [readonly] **BoundTo** | **int32** | Return objects policy is bound to | [readonly] -**Action** | Pointer to [**NullableEventActions**](EventActions.md) | Match created events with this action type. When left empty, all action types will be matched. * `login` - Login * `login_failed` - Login Failed * `logout` - Logout * `user_write` - User Write * `suspicious_request` - Suspicious Request * `password_set` - Password Set * `secret_view` - Secret View * `secret_rotate` - Secret Rotate * `invitation_used` - Invite Used * `authorize_application` - Authorize Application * `source_linked` - Source Linked * `impersonation_started` - Impersonation Started * `impersonation_ended` - Impersonation Ended * `flow_execution` - Flow Execution * `policy_execution` - Policy Execution * `policy_exception` - Policy Exception * `property_mapping_exception` - Property Mapping Exception * `system_task_execution` - System Task Execution * `system_task_exception` - System Task Exception * `system_exception` - System Exception * `configuration_error` - Configuration Error * `model_created` - Model Created * `model_updated` - Model Updated * `model_deleted` - Model Deleted * `email_sent` - Email Sent * `update_available` - Update Available * `custom_` - Custom Prefix | [optional] +**Action** | Pointer to [**EventActions**](EventActions.md) | | [optional] **ClientIp** | Pointer to **string** | Matches Event's Client IP (strict matching, for network matching use an Expression Policy) | [optional] -**App** | Pointer to [**NullableAppEnum**](AppEnum.md) | Match events created by selected application. When left empty, all applications are matched. * `authentik.admin` - authentik Admin * `authentik.api` - authentik API * `authentik.crypto` - authentik Crypto * `authentik.events` - authentik Events * `authentik.flows` - authentik Flows * `authentik.lib` - authentik lib * `authentik.outposts` - authentik Outpost * `authentik.policies.dummy` - authentik Policies.Dummy * `authentik.policies.event_matcher` - authentik Policies.Event Matcher * `authentik.policies.expiry` - authentik Policies.Expiry * `authentik.policies.expression` - authentik Policies.Expression * `authentik.policies.password` - authentik Policies.Password * `authentik.policies.reputation` - authentik Policies.Reputation * `authentik.policies` - authentik Policies * `authentik.providers.ldap` - authentik Providers.LDAP * `authentik.providers.oauth2` - authentik Providers.OAuth2 * `authentik.providers.proxy` - authentik Providers.Proxy * `authentik.providers.radius` - authentik Providers.Radius * `authentik.providers.saml` - authentik Providers.SAML * `authentik.providers.scim` - authentik Providers.SCIM * `authentik.recovery` - authentik Recovery * `authentik.sources.ldap` - authentik Sources.LDAP * `authentik.sources.oauth` - authentik Sources.OAuth * `authentik.sources.plex` - authentik Sources.Plex * `authentik.sources.saml` - authentik Sources.SAML * `authentik.stages.authenticator_duo` - authentik Stages.Authenticator.Duo * `authentik.stages.authenticator_sms` - authentik Stages.Authenticator.SMS * `authentik.stages.authenticator_static` - authentik Stages.Authenticator.Static * `authentik.stages.authenticator_totp` - authentik Stages.Authenticator.TOTP * `authentik.stages.authenticator_validate` - authentik Stages.Authenticator.Validate * `authentik.stages.authenticator_webauthn` - authentik Stages.Authenticator.WebAuthn * `authentik.stages.captcha` - authentik Stages.Captcha * `authentik.stages.consent` - authentik Stages.Consent * `authentik.stages.deny` - authentik Stages.Deny * `authentik.stages.dummy` - authentik Stages.Dummy * `authentik.stages.email` - authentik Stages.Email * `authentik.stages.identification` - authentik Stages.Identification * `authentik.stages.invitation` - authentik Stages.User Invitation * `authentik.stages.password` - authentik Stages.Password * `authentik.stages.prompt` - authentik Stages.Prompt * `authentik.stages.user_delete` - authentik Stages.User Delete * `authentik.stages.user_login` - authentik Stages.User Login * `authentik.stages.user_logout` - authentik Stages.User Logout * `authentik.stages.user_write` - authentik Stages.User Write * `authentik.tenants` - authentik Tenants * `authentik.blueprints` - authentik Blueprints * `authentik.core` - authentik Core | [optional] +**App** | Pointer to [**AppEnum**](AppEnum.md) | | [optional] ## Methods @@ -225,16 +225,6 @@ SetAction sets Action field to given value. HasAction returns a boolean if a field has been set. -### SetActionNil - -`func (o *EventMatcherPolicy) SetActionNil(b bool)` - - SetActionNil sets the value for Action to be an explicit nil - -### UnsetAction -`func (o *EventMatcherPolicy) UnsetAction()` - -UnsetAction ensures that no value is present for Action, not even an explicit nil ### GetClientIp `func (o *EventMatcherPolicy) GetClientIp() string` @@ -285,16 +275,6 @@ SetApp sets App field to given value. HasApp returns a boolean if a field has been set. -### SetAppNil - -`func (o *EventMatcherPolicy) SetAppNil(b bool)` - - SetAppNil sets the value for App to be an explicit nil - -### UnsetApp -`func (o *EventMatcherPolicy) UnsetApp()` - -UnsetApp ensures that no value is present for App, not even an explicit nil [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EventMatcherPolicyRequest.md b/docs/EventMatcherPolicyRequest.md index 27475905d..40ff5f228 100644 --- a/docs/EventMatcherPolicyRequest.md +++ b/docs/EventMatcherPolicyRequest.md @@ -6,9 +6,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Name** | **string** | | **ExecutionLogging** | Pointer to **bool** | When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. | [optional] -**Action** | Pointer to [**NullableEventActions**](EventActions.md) | Match created events with this action type. When left empty, all action types will be matched. * `login` - Login * `login_failed` - Login Failed * `logout` - Logout * `user_write` - User Write * `suspicious_request` - Suspicious Request * `password_set` - Password Set * `secret_view` - Secret View * `secret_rotate` - Secret Rotate * `invitation_used` - Invite Used * `authorize_application` - Authorize Application * `source_linked` - Source Linked * `impersonation_started` - Impersonation Started * `impersonation_ended` - Impersonation Ended * `flow_execution` - Flow Execution * `policy_execution` - Policy Execution * `policy_exception` - Policy Exception * `property_mapping_exception` - Property Mapping Exception * `system_task_execution` - System Task Execution * `system_task_exception` - System Task Exception * `system_exception` - System Exception * `configuration_error` - Configuration Error * `model_created` - Model Created * `model_updated` - Model Updated * `model_deleted` - Model Deleted * `email_sent` - Email Sent * `update_available` - Update Available * `custom_` - Custom Prefix | [optional] +**Action** | Pointer to [**EventActions**](EventActions.md) | | [optional] **ClientIp** | Pointer to **string** | Matches Event's Client IP (strict matching, for network matching use an Expression Policy) | [optional] -**App** | Pointer to [**NullableAppEnum**](AppEnum.md) | Match events created by selected application. When left empty, all applications are matched. * `authentik.admin` - authentik Admin * `authentik.api` - authentik API * `authentik.crypto` - authentik Crypto * `authentik.events` - authentik Events * `authentik.flows` - authentik Flows * `authentik.lib` - authentik lib * `authentik.outposts` - authentik Outpost * `authentik.policies.dummy` - authentik Policies.Dummy * `authentik.policies.event_matcher` - authentik Policies.Event Matcher * `authentik.policies.expiry` - authentik Policies.Expiry * `authentik.policies.expression` - authentik Policies.Expression * `authentik.policies.password` - authentik Policies.Password * `authentik.policies.reputation` - authentik Policies.Reputation * `authentik.policies` - authentik Policies * `authentik.providers.ldap` - authentik Providers.LDAP * `authentik.providers.oauth2` - authentik Providers.OAuth2 * `authentik.providers.proxy` - authentik Providers.Proxy * `authentik.providers.radius` - authentik Providers.Radius * `authentik.providers.saml` - authentik Providers.SAML * `authentik.providers.scim` - authentik Providers.SCIM * `authentik.recovery` - authentik Recovery * `authentik.sources.ldap` - authentik Sources.LDAP * `authentik.sources.oauth` - authentik Sources.OAuth * `authentik.sources.plex` - authentik Sources.Plex * `authentik.sources.saml` - authentik Sources.SAML * `authentik.stages.authenticator_duo` - authentik Stages.Authenticator.Duo * `authentik.stages.authenticator_sms` - authentik Stages.Authenticator.SMS * `authentik.stages.authenticator_static` - authentik Stages.Authenticator.Static * `authentik.stages.authenticator_totp` - authentik Stages.Authenticator.TOTP * `authentik.stages.authenticator_validate` - authentik Stages.Authenticator.Validate * `authentik.stages.authenticator_webauthn` - authentik Stages.Authenticator.WebAuthn * `authentik.stages.captcha` - authentik Stages.Captcha * `authentik.stages.consent` - authentik Stages.Consent * `authentik.stages.deny` - authentik Stages.Deny * `authentik.stages.dummy` - authentik Stages.Dummy * `authentik.stages.email` - authentik Stages.Email * `authentik.stages.identification` - authentik Stages.Identification * `authentik.stages.invitation` - authentik Stages.User Invitation * `authentik.stages.password` - authentik Stages.Password * `authentik.stages.prompt` - authentik Stages.Prompt * `authentik.stages.user_delete` - authentik Stages.User Delete * `authentik.stages.user_login` - authentik Stages.User Login * `authentik.stages.user_logout` - authentik Stages.User Logout * `authentik.stages.user_write` - authentik Stages.User Write * `authentik.tenants` - authentik Tenants * `authentik.blueprints` - authentik Blueprints * `authentik.core` - authentik Core | [optional] +**App** | Pointer to [**AppEnum**](AppEnum.md) | | [optional] ## Methods @@ -99,16 +99,6 @@ SetAction sets Action field to given value. HasAction returns a boolean if a field has been set. -### SetActionNil - -`func (o *EventMatcherPolicyRequest) SetActionNil(b bool)` - - SetActionNil sets the value for Action to be an explicit nil - -### UnsetAction -`func (o *EventMatcherPolicyRequest) UnsetAction()` - -UnsetAction ensures that no value is present for Action, not even an explicit nil ### GetClientIp `func (o *EventMatcherPolicyRequest) GetClientIp() string` @@ -159,16 +149,6 @@ SetApp sets App field to given value. HasApp returns a boolean if a field has been set. -### SetAppNil - -`func (o *EventMatcherPolicyRequest) SetAppNil(b bool)` - - SetAppNil sets the value for App to be an explicit nil - -### UnsetApp -`func (o *EventMatcherPolicyRequest) UnsetApp()` - -UnsetApp ensures that no value is present for App, not even an explicit nil [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EventsApi.md b/docs/EventsApi.md index 3dc07d031..9f450c0fc 100644 --- a/docs/EventsApi.md +++ b/docs/EventsApi.md @@ -55,7 +55,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -116,7 +116,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -182,7 +182,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -190,7 +190,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.EventsApi.EventsEventsDestroy(context.Background(), eventUuid).Execute() + r, err := apiClient.EventsApi.EventsEventsDestroy(context.Background(), eventUuid).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `EventsApi.EventsEventsDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -250,7 +250,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -338,7 +338,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -410,7 +410,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -478,7 +478,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -548,7 +548,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -616,7 +616,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -688,7 +688,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -696,7 +696,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.EventsApi.EventsNotificationsDestroy(context.Background(), uuid).Execute() + r, err := apiClient.EventsApi.EventsNotificationsDestroy(context.Background(), uuid).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `EventsApi.EventsNotificationsDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -757,7 +757,7 @@ import ( "fmt" "os" "time" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -841,14 +841,14 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.EventsApi.EventsNotificationsMarkAllSeenCreate(context.Background()).Execute() + r, err := apiClient.EventsApi.EventsNotificationsMarkAllSeenCreate(context.Background()).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `EventsApi.EventsNotificationsMarkAllSeenCreate``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -900,7 +900,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -972,7 +972,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1042,7 +1042,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1114,7 +1114,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1184,7 +1184,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1250,7 +1250,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1258,7 +1258,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.EventsApi.EventsRulesDestroy(context.Background(), pbmUuid).Execute() + r, err := apiClient.EventsApi.EventsRulesDestroy(context.Background(), pbmUuid).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `EventsApi.EventsRulesDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -1318,7 +1318,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1396,7 +1396,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1468,7 +1468,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1538,7 +1538,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1610,7 +1610,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1680,7 +1680,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1746,7 +1746,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1754,7 +1754,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.EventsApi.EventsTransportsDestroy(context.Background(), uuid).Execute() + r, err := apiClient.EventsApi.EventsTransportsDestroy(context.Background(), uuid).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `EventsApi.EventsTransportsDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -1814,7 +1814,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1894,7 +1894,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1966,7 +1966,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2036,7 +2036,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2106,7 +2106,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2178,7 +2178,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { diff --git a/docs/Flow.md b/docs/Flow.md index 52a317114..71f1f2f06 100644 --- a/docs/Flow.md +++ b/docs/Flow.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **Name** | **string** | | **Slug** | **string** | Visible in the URL. | **Title** | **string** | Shown as the Title in Flow pages. | -**Designation** | [**NullableFlowDesignationEnum**](FlowDesignationEnum.md) | Decides what this Flow is used for. For example, the Authentication flow is redirect to when an un-authenticated user visits authentik. * `authentication` - Authentication * `authorization` - Authorization * `invalidation` - Invalidation * `enrollment` - Enrollment * `unenrollment` - Unrenollment * `recovery` - Recovery * `stage_configuration` - Stage Configuration | +**Designation** | [**FlowDesignationEnum**](FlowDesignationEnum.md) | | **Background** | **string** | Get the URL to the background image. If the name is /static or starts with http it is returned as-is | [readonly] **Stages** | **[]string** | | [readonly] **Policies** | **[]string** | | [readonly] @@ -18,14 +18,14 @@ Name | Type | Description | Notes **CompatibilityMode** | Pointer to **bool** | Enable compatibility mode, increases compatibility with password managers on mobile devices. | [optional] **ExportUrl** | **string** | Get export URL for flow | [readonly] **Layout** | Pointer to [**LayoutEnum**](LayoutEnum.md) | | [optional] -**DeniedAction** | Pointer to [**NullableDeniedActionEnum**](DeniedActionEnum.md) | Configure what should happen when a flow denies access to a user. * `message_continue` - Message Continue * `message` - Message * `continue` - Continue | [optional] -**Authentication** | Pointer to [**NullableAuthenticationEnum**](AuthenticationEnum.md) | Required level of authentication and authorization to access a flow. * `none` - None * `require_authenticated` - Require Authenticated * `require_unauthenticated` - Require Unauthenticated * `require_superuser` - Require Superuser | [optional] +**DeniedAction** | Pointer to [**DeniedActionEnum**](DeniedActionEnum.md) | | [optional] +**Authentication** | Pointer to [**AuthenticationEnum**](AuthenticationEnum.md) | | [optional] ## Methods ### NewFlow -`func NewFlow(pk string, policybindingmodelPtrId string, name string, slug string, title string, designation NullableFlowDesignationEnum, background string, stages []string, policies []string, cacheCount int32, exportUrl string, ) *Flow` +`func NewFlow(pk string, policybindingmodelPtrId string, name string, slug string, title string, designation FlowDesignationEnum, background string, stages []string, policies []string, cacheCount int32, exportUrl string, ) *Flow` NewFlow instantiates a new Flow object This constructor will assign default values to properties that have it defined, @@ -160,16 +160,6 @@ and a boolean to check if the value has been set. SetDesignation sets Designation field to given value. -### SetDesignationNil - -`func (o *Flow) SetDesignationNil(b bool)` - - SetDesignationNil sets the value for Designation to be an explicit nil - -### UnsetDesignation -`func (o *Flow) UnsetDesignation()` - -UnsetDesignation ensures that no value is present for Designation, not even an explicit nil ### GetBackground `func (o *Flow) GetBackground() string` @@ -370,16 +360,6 @@ SetDeniedAction sets DeniedAction field to given value. HasDeniedAction returns a boolean if a field has been set. -### SetDeniedActionNil - -`func (o *Flow) SetDeniedActionNil(b bool)` - - SetDeniedActionNil sets the value for DeniedAction to be an explicit nil - -### UnsetDeniedAction -`func (o *Flow) UnsetDeniedAction()` - -UnsetDeniedAction ensures that no value is present for DeniedAction, not even an explicit nil ### GetAuthentication `func (o *Flow) GetAuthentication() AuthenticationEnum` @@ -405,16 +385,6 @@ SetAuthentication sets Authentication field to given value. HasAuthentication returns a boolean if a field has been set. -### SetAuthenticationNil - -`func (o *Flow) SetAuthenticationNil(b bool)` - - SetAuthenticationNil sets the value for Authentication to be an explicit nil - -### UnsetAuthentication -`func (o *Flow) UnsetAuthentication()` - -UnsetAuthentication ensures that no value is present for Authentication, not even an explicit nil [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FlowInspectorPlan.md b/docs/FlowInspectorPlan.md index a5c937006..6b706e28a 100644 --- a/docs/FlowInspectorPlan.md +++ b/docs/FlowInspectorPlan.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**CurrentStage** | [**FlowInspectorPlanCurrentStage**](FlowInspectorPlanCurrentStage.md) | | -**NextPlannedStage** | [**FlowInspectorPlanCurrentStage**](FlowInspectorPlanCurrentStage.md) | | +**CurrentStage** | [**FlowStageBinding**](FlowStageBinding.md) | | [readonly] +**NextPlannedStage** | [**FlowStageBinding**](FlowStageBinding.md) | | [readonly] **PlanContext** | **map[string]interface{}** | Get the plan's context, sanitized | [readonly] **SessionId** | **string** | Get a unique session ID | [readonly] @@ -13,7 +13,7 @@ Name | Type | Description | Notes ### NewFlowInspectorPlan -`func NewFlowInspectorPlan(currentStage FlowInspectorPlanCurrentStage, nextPlannedStage FlowInspectorPlanCurrentStage, planContext map[string]interface{}, sessionId string, ) *FlowInspectorPlan` +`func NewFlowInspectorPlan(currentStage FlowStageBinding, nextPlannedStage FlowStageBinding, planContext map[string]interface{}, sessionId string, ) *FlowInspectorPlan` NewFlowInspectorPlan instantiates a new FlowInspectorPlan object This constructor will assign default values to properties that have it defined, @@ -30,40 +30,40 @@ but it doesn't guarantee that properties required by API are set ### GetCurrentStage -`func (o *FlowInspectorPlan) GetCurrentStage() FlowInspectorPlanCurrentStage` +`func (o *FlowInspectorPlan) GetCurrentStage() FlowStageBinding` GetCurrentStage returns the CurrentStage field if non-nil, zero value otherwise. ### GetCurrentStageOk -`func (o *FlowInspectorPlan) GetCurrentStageOk() (*FlowInspectorPlanCurrentStage, bool)` +`func (o *FlowInspectorPlan) GetCurrentStageOk() (*FlowStageBinding, bool)` GetCurrentStageOk returns a tuple with the CurrentStage field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCurrentStage -`func (o *FlowInspectorPlan) SetCurrentStage(v FlowInspectorPlanCurrentStage)` +`func (o *FlowInspectorPlan) SetCurrentStage(v FlowStageBinding)` SetCurrentStage sets CurrentStage field to given value. ### GetNextPlannedStage -`func (o *FlowInspectorPlan) GetNextPlannedStage() FlowInspectorPlanCurrentStage` +`func (o *FlowInspectorPlan) GetNextPlannedStage() FlowStageBinding` GetNextPlannedStage returns the NextPlannedStage field if non-nil, zero value otherwise. ### GetNextPlannedStageOk -`func (o *FlowInspectorPlan) GetNextPlannedStageOk() (*FlowInspectorPlanCurrentStage, bool)` +`func (o *FlowInspectorPlan) GetNextPlannedStageOk() (*FlowStageBinding, bool)` GetNextPlannedStageOk returns a tuple with the NextPlannedStage field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetNextPlannedStage -`func (o *FlowInspectorPlan) SetNextPlannedStage(v FlowInspectorPlanCurrentStage)` +`func (o *FlowInspectorPlan) SetNextPlannedStage(v FlowStageBinding)` SetNextPlannedStage sets NextPlannedStage field to given value. diff --git a/docs/FlowInspectorPlanCurrentStage.md b/docs/FlowInspectorPlanCurrentStage.md deleted file mode 100644 index 39172df19..000000000 --- a/docs/FlowInspectorPlanCurrentStage.md +++ /dev/null @@ -1,270 +0,0 @@ -# FlowInspectorPlanCurrentStage - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Pk** | **string** | | [readonly] -**PolicybindingmodelPtrId** | **string** | | [readonly] -**Target** | **string** | | -**Stage** | **string** | | -**StageObj** | [**FlowStageBindingStageObj**](FlowStageBindingStageObj.md) | | -**EvaluateOnPlan** | Pointer to **bool** | Evaluate policies during the Flow planning process. | [optional] -**ReEvaluatePolicies** | Pointer to **bool** | Evaluate policies when the Stage is present to the user. | [optional] -**Order** | **int32** | | -**PolicyEngineMode** | Pointer to [**PolicyEngineMode**](PolicyEngineMode.md) | | [optional] -**InvalidResponseAction** | Pointer to [**NullableInvalidResponseActionEnum**](InvalidResponseActionEnum.md) | Configure how the flow executor should handle an invalid response to a challenge. RETRY returns the error message and a similar challenge to the executor. RESTART restarts the flow from the beginning, and RESTART_WITH_CONTEXT restarts the flow while keeping the current context. * `retry` - Retry * `restart` - Restart * `restart_with_context` - Restart With Context | [optional] - -## Methods - -### NewFlowInspectorPlanCurrentStage - -`func NewFlowInspectorPlanCurrentStage(pk string, policybindingmodelPtrId string, target string, stage string, stageObj FlowStageBindingStageObj, order int32, ) *FlowInspectorPlanCurrentStage` - -NewFlowInspectorPlanCurrentStage instantiates a new FlowInspectorPlanCurrentStage object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewFlowInspectorPlanCurrentStageWithDefaults - -`func NewFlowInspectorPlanCurrentStageWithDefaults() *FlowInspectorPlanCurrentStage` - -NewFlowInspectorPlanCurrentStageWithDefaults instantiates a new FlowInspectorPlanCurrentStage object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetPk - -`func (o *FlowInspectorPlanCurrentStage) GetPk() string` - -GetPk returns the Pk field if non-nil, zero value otherwise. - -### GetPkOk - -`func (o *FlowInspectorPlanCurrentStage) GetPkOk() (*string, bool)` - -GetPkOk returns a tuple with the Pk field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPk - -`func (o *FlowInspectorPlanCurrentStage) SetPk(v string)` - -SetPk sets Pk field to given value. - - -### GetPolicybindingmodelPtrId - -`func (o *FlowInspectorPlanCurrentStage) GetPolicybindingmodelPtrId() string` - -GetPolicybindingmodelPtrId returns the PolicybindingmodelPtrId field if non-nil, zero value otherwise. - -### GetPolicybindingmodelPtrIdOk - -`func (o *FlowInspectorPlanCurrentStage) GetPolicybindingmodelPtrIdOk() (*string, bool)` - -GetPolicybindingmodelPtrIdOk returns a tuple with the PolicybindingmodelPtrId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPolicybindingmodelPtrId - -`func (o *FlowInspectorPlanCurrentStage) SetPolicybindingmodelPtrId(v string)` - -SetPolicybindingmodelPtrId sets PolicybindingmodelPtrId field to given value. - - -### GetTarget - -`func (o *FlowInspectorPlanCurrentStage) GetTarget() string` - -GetTarget returns the Target field if non-nil, zero value otherwise. - -### GetTargetOk - -`func (o *FlowInspectorPlanCurrentStage) GetTargetOk() (*string, bool)` - -GetTargetOk returns a tuple with the Target field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTarget - -`func (o *FlowInspectorPlanCurrentStage) SetTarget(v string)` - -SetTarget sets Target field to given value. - - -### GetStage - -`func (o *FlowInspectorPlanCurrentStage) GetStage() string` - -GetStage returns the Stage field if non-nil, zero value otherwise. - -### GetStageOk - -`func (o *FlowInspectorPlanCurrentStage) GetStageOk() (*string, bool)` - -GetStageOk returns a tuple with the Stage field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStage - -`func (o *FlowInspectorPlanCurrentStage) SetStage(v string)` - -SetStage sets Stage field to given value. - - -### GetStageObj - -`func (o *FlowInspectorPlanCurrentStage) GetStageObj() FlowStageBindingStageObj` - -GetStageObj returns the StageObj field if non-nil, zero value otherwise. - -### GetStageObjOk - -`func (o *FlowInspectorPlanCurrentStage) GetStageObjOk() (*FlowStageBindingStageObj, bool)` - -GetStageObjOk returns a tuple with the StageObj field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStageObj - -`func (o *FlowInspectorPlanCurrentStage) SetStageObj(v FlowStageBindingStageObj)` - -SetStageObj sets StageObj field to given value. - - -### GetEvaluateOnPlan - -`func (o *FlowInspectorPlanCurrentStage) GetEvaluateOnPlan() bool` - -GetEvaluateOnPlan returns the EvaluateOnPlan field if non-nil, zero value otherwise. - -### GetEvaluateOnPlanOk - -`func (o *FlowInspectorPlanCurrentStage) GetEvaluateOnPlanOk() (*bool, bool)` - -GetEvaluateOnPlanOk returns a tuple with the EvaluateOnPlan field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEvaluateOnPlan - -`func (o *FlowInspectorPlanCurrentStage) SetEvaluateOnPlan(v bool)` - -SetEvaluateOnPlan sets EvaluateOnPlan field to given value. - -### HasEvaluateOnPlan - -`func (o *FlowInspectorPlanCurrentStage) HasEvaluateOnPlan() bool` - -HasEvaluateOnPlan returns a boolean if a field has been set. - -### GetReEvaluatePolicies - -`func (o *FlowInspectorPlanCurrentStage) GetReEvaluatePolicies() bool` - -GetReEvaluatePolicies returns the ReEvaluatePolicies field if non-nil, zero value otherwise. - -### GetReEvaluatePoliciesOk - -`func (o *FlowInspectorPlanCurrentStage) GetReEvaluatePoliciesOk() (*bool, bool)` - -GetReEvaluatePoliciesOk returns a tuple with the ReEvaluatePolicies field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetReEvaluatePolicies - -`func (o *FlowInspectorPlanCurrentStage) SetReEvaluatePolicies(v bool)` - -SetReEvaluatePolicies sets ReEvaluatePolicies field to given value. - -### HasReEvaluatePolicies - -`func (o *FlowInspectorPlanCurrentStage) HasReEvaluatePolicies() bool` - -HasReEvaluatePolicies returns a boolean if a field has been set. - -### GetOrder - -`func (o *FlowInspectorPlanCurrentStage) GetOrder() int32` - -GetOrder returns the Order field if non-nil, zero value otherwise. - -### GetOrderOk - -`func (o *FlowInspectorPlanCurrentStage) GetOrderOk() (*int32, bool)` - -GetOrderOk returns a tuple with the Order field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetOrder - -`func (o *FlowInspectorPlanCurrentStage) SetOrder(v int32)` - -SetOrder sets Order field to given value. - - -### GetPolicyEngineMode - -`func (o *FlowInspectorPlanCurrentStage) GetPolicyEngineMode() PolicyEngineMode` - -GetPolicyEngineMode returns the PolicyEngineMode field if non-nil, zero value otherwise. - -### GetPolicyEngineModeOk - -`func (o *FlowInspectorPlanCurrentStage) GetPolicyEngineModeOk() (*PolicyEngineMode, bool)` - -GetPolicyEngineModeOk returns a tuple with the PolicyEngineMode field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPolicyEngineMode - -`func (o *FlowInspectorPlanCurrentStage) SetPolicyEngineMode(v PolicyEngineMode)` - -SetPolicyEngineMode sets PolicyEngineMode field to given value. - -### HasPolicyEngineMode - -`func (o *FlowInspectorPlanCurrentStage) HasPolicyEngineMode() bool` - -HasPolicyEngineMode returns a boolean if a field has been set. - -### GetInvalidResponseAction - -`func (o *FlowInspectorPlanCurrentStage) GetInvalidResponseAction() InvalidResponseActionEnum` - -GetInvalidResponseAction returns the InvalidResponseAction field if non-nil, zero value otherwise. - -### GetInvalidResponseActionOk - -`func (o *FlowInspectorPlanCurrentStage) GetInvalidResponseActionOk() (*InvalidResponseActionEnum, bool)` - -GetInvalidResponseActionOk returns a tuple with the InvalidResponseAction field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetInvalidResponseAction - -`func (o *FlowInspectorPlanCurrentStage) SetInvalidResponseAction(v InvalidResponseActionEnum)` - -SetInvalidResponseAction sets InvalidResponseAction field to given value. - -### HasInvalidResponseAction - -`func (o *FlowInspectorPlanCurrentStage) HasInvalidResponseAction() bool` - -HasInvalidResponseAction returns a boolean if a field has been set. - -### SetInvalidResponseActionNil - -`func (o *FlowInspectorPlanCurrentStage) SetInvalidResponseActionNil(b bool)` - - SetInvalidResponseActionNil sets the value for InvalidResponseAction to be an explicit nil - -### UnsetInvalidResponseAction -`func (o *FlowInspectorPlanCurrentStage) UnsetInvalidResponseAction()` - -UnsetInvalidResponseAction ensures that no value is present for InvalidResponseAction, not even an explicit nil - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/FlowRequest.md b/docs/FlowRequest.md index 6375a11b0..1857b7344 100644 --- a/docs/FlowRequest.md +++ b/docs/FlowRequest.md @@ -7,18 +7,18 @@ Name | Type | Description | Notes **Name** | **string** | | **Slug** | **string** | Visible in the URL. | **Title** | **string** | Shown as the Title in Flow pages. | -**Designation** | [**NullableFlowDesignationEnum**](FlowDesignationEnum.md) | Decides what this Flow is used for. For example, the Authentication flow is redirect to when an un-authenticated user visits authentik. * `authentication` - Authentication * `authorization` - Authorization * `invalidation` - Invalidation * `enrollment` - Enrollment * `unenrollment` - Unrenollment * `recovery` - Recovery * `stage_configuration` - Stage Configuration | +**Designation** | [**FlowDesignationEnum**](FlowDesignationEnum.md) | | **PolicyEngineMode** | Pointer to [**PolicyEngineMode**](PolicyEngineMode.md) | | [optional] **CompatibilityMode** | Pointer to **bool** | Enable compatibility mode, increases compatibility with password managers on mobile devices. | [optional] **Layout** | Pointer to [**LayoutEnum**](LayoutEnum.md) | | [optional] -**DeniedAction** | Pointer to [**NullableDeniedActionEnum**](DeniedActionEnum.md) | Configure what should happen when a flow denies access to a user. * `message_continue` - Message Continue * `message` - Message * `continue` - Continue | [optional] -**Authentication** | Pointer to [**NullableAuthenticationEnum**](AuthenticationEnum.md) | Required level of authentication and authorization to access a flow. * `none` - None * `require_authenticated` - Require Authenticated * `require_unauthenticated` - Require Unauthenticated * `require_superuser` - Require Superuser | [optional] +**DeniedAction** | Pointer to [**DeniedActionEnum**](DeniedActionEnum.md) | | [optional] +**Authentication** | Pointer to [**AuthenticationEnum**](AuthenticationEnum.md) | | [optional] ## Methods ### NewFlowRequest -`func NewFlowRequest(name string, slug string, title string, designation NullableFlowDesignationEnum, ) *FlowRequest` +`func NewFlowRequest(name string, slug string, title string, designation FlowDesignationEnum, ) *FlowRequest` NewFlowRequest instantiates a new FlowRequest object This constructor will assign default values to properties that have it defined, @@ -113,16 +113,6 @@ and a boolean to check if the value has been set. SetDesignation sets Designation field to given value. -### SetDesignationNil - -`func (o *FlowRequest) SetDesignationNil(b bool)` - - SetDesignationNil sets the value for Designation to be an explicit nil - -### UnsetDesignation -`func (o *FlowRequest) UnsetDesignation()` - -UnsetDesignation ensures that no value is present for Designation, not even an explicit nil ### GetPolicyEngineMode `func (o *FlowRequest) GetPolicyEngineMode() PolicyEngineMode` @@ -223,16 +213,6 @@ SetDeniedAction sets DeniedAction field to given value. HasDeniedAction returns a boolean if a field has been set. -### SetDeniedActionNil - -`func (o *FlowRequest) SetDeniedActionNil(b bool)` - - SetDeniedActionNil sets the value for DeniedAction to be an explicit nil - -### UnsetDeniedAction -`func (o *FlowRequest) UnsetDeniedAction()` - -UnsetDeniedAction ensures that no value is present for DeniedAction, not even an explicit nil ### GetAuthentication `func (o *FlowRequest) GetAuthentication() AuthenticationEnum` @@ -258,16 +238,6 @@ SetAuthentication sets Authentication field to given value. HasAuthentication returns a boolean if a field has been set. -### SetAuthenticationNil - -`func (o *FlowRequest) SetAuthenticationNil(b bool)` - - SetAuthenticationNil sets the value for Authentication to be an explicit nil - -### UnsetAuthentication -`func (o *FlowRequest) UnsetAuthentication()` - -UnsetAuthentication ensures that no value is present for Authentication, not even an explicit nil [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FlowSet.md b/docs/FlowSet.md index 979607f87..914db3ad3 100644 --- a/docs/FlowSet.md +++ b/docs/FlowSet.md @@ -9,19 +9,19 @@ Name | Type | Description | Notes **Name** | **string** | | **Slug** | **string** | Visible in the URL. | **Title** | **string** | Shown as the Title in Flow pages. | -**Designation** | [**NullableFlowDesignationEnum**](FlowDesignationEnum.md) | Decides what this Flow is used for. For example, the Authentication flow is redirect to when an un-authenticated user visits authentik. * `authentication` - Authentication * `authorization` - Authorization * `invalidation` - Invalidation * `enrollment` - Enrollment * `unenrollment` - Unrenollment * `recovery` - Recovery * `stage_configuration` - Stage Configuration | +**Designation** | [**FlowDesignationEnum**](FlowDesignationEnum.md) | | **Background** | **string** | Get the URL to the background image. If the name is /static or starts with http it is returned as-is | [readonly] **PolicyEngineMode** | Pointer to [**PolicyEngineMode**](PolicyEngineMode.md) | | [optional] **CompatibilityMode** | Pointer to **bool** | Enable compatibility mode, increases compatibility with password managers on mobile devices. | [optional] **ExportUrl** | **string** | Get export URL for flow | [readonly] **Layout** | Pointer to [**LayoutEnum**](LayoutEnum.md) | | [optional] -**DeniedAction** | Pointer to [**NullableDeniedActionEnum**](DeniedActionEnum.md) | Configure what should happen when a flow denies access to a user. * `message_continue` - Message Continue * `message` - Message * `continue` - Continue | [optional] +**DeniedAction** | Pointer to [**DeniedActionEnum**](DeniedActionEnum.md) | | [optional] ## Methods ### NewFlowSet -`func NewFlowSet(pk string, policybindingmodelPtrId string, name string, slug string, title string, designation NullableFlowDesignationEnum, background string, exportUrl string, ) *FlowSet` +`func NewFlowSet(pk string, policybindingmodelPtrId string, name string, slug string, title string, designation FlowDesignationEnum, background string, exportUrl string, ) *FlowSet` NewFlowSet instantiates a new FlowSet object This constructor will assign default values to properties that have it defined, @@ -156,16 +156,6 @@ and a boolean to check if the value has been set. SetDesignation sets Designation field to given value. -### SetDesignationNil - -`func (o *FlowSet) SetDesignationNil(b bool)` - - SetDesignationNil sets the value for Designation to be an explicit nil - -### UnsetDesignation -`func (o *FlowSet) UnsetDesignation()` - -UnsetDesignation ensures that no value is present for Designation, not even an explicit nil ### GetBackground `func (o *FlowSet) GetBackground() string` @@ -306,16 +296,6 @@ SetDeniedAction sets DeniedAction field to given value. HasDeniedAction returns a boolean if a field has been set. -### SetDeniedActionNil - -`func (o *FlowSet) SetDeniedActionNil(b bool)` - - SetDeniedActionNil sets the value for DeniedAction to be an explicit nil - -### UnsetDeniedAction -`func (o *FlowSet) UnsetDeniedAction()` - -UnsetDeniedAction ensures that no value is present for DeniedAction, not even an explicit nil [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FlowSetRequest.md b/docs/FlowSetRequest.md index b9f415d6b..a35d3a5e1 100644 --- a/docs/FlowSetRequest.md +++ b/docs/FlowSetRequest.md @@ -7,17 +7,17 @@ Name | Type | Description | Notes **Name** | **string** | | **Slug** | **string** | Visible in the URL. | **Title** | **string** | Shown as the Title in Flow pages. | -**Designation** | [**NullableFlowDesignationEnum**](FlowDesignationEnum.md) | Decides what this Flow is used for. For example, the Authentication flow is redirect to when an un-authenticated user visits authentik. * `authentication` - Authentication * `authorization` - Authorization * `invalidation` - Invalidation * `enrollment` - Enrollment * `unenrollment` - Unrenollment * `recovery` - Recovery * `stage_configuration` - Stage Configuration | +**Designation** | [**FlowDesignationEnum**](FlowDesignationEnum.md) | | **PolicyEngineMode** | Pointer to [**PolicyEngineMode**](PolicyEngineMode.md) | | [optional] **CompatibilityMode** | Pointer to **bool** | Enable compatibility mode, increases compatibility with password managers on mobile devices. | [optional] **Layout** | Pointer to [**LayoutEnum**](LayoutEnum.md) | | [optional] -**DeniedAction** | Pointer to [**NullableDeniedActionEnum**](DeniedActionEnum.md) | Configure what should happen when a flow denies access to a user. * `message_continue` - Message Continue * `message` - Message * `continue` - Continue | [optional] +**DeniedAction** | Pointer to [**DeniedActionEnum**](DeniedActionEnum.md) | | [optional] ## Methods ### NewFlowSetRequest -`func NewFlowSetRequest(name string, slug string, title string, designation NullableFlowDesignationEnum, ) *FlowSetRequest` +`func NewFlowSetRequest(name string, slug string, title string, designation FlowDesignationEnum, ) *FlowSetRequest` NewFlowSetRequest instantiates a new FlowSetRequest object This constructor will assign default values to properties that have it defined, @@ -112,16 +112,6 @@ and a boolean to check if the value has been set. SetDesignation sets Designation field to given value. -### SetDesignationNil - -`func (o *FlowSetRequest) SetDesignationNil(b bool)` - - SetDesignationNil sets the value for Designation to be an explicit nil - -### UnsetDesignation -`func (o *FlowSetRequest) UnsetDesignation()` - -UnsetDesignation ensures that no value is present for Designation, not even an explicit nil ### GetPolicyEngineMode `func (o *FlowSetRequest) GetPolicyEngineMode() PolicyEngineMode` @@ -222,16 +212,6 @@ SetDeniedAction sets DeniedAction field to given value. HasDeniedAction returns a boolean if a field has been set. -### SetDeniedActionNil - -`func (o *FlowSetRequest) SetDeniedActionNil(b bool)` - - SetDeniedActionNil sets the value for DeniedAction to be an explicit nil - -### UnsetDeniedAction -`func (o *FlowSetRequest) UnsetDeniedAction()` - -UnsetDeniedAction ensures that no value is present for DeniedAction, not even an explicit nil [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FlowStageBinding.md b/docs/FlowStageBinding.md index bae1919c0..92644dcb6 100644 --- a/docs/FlowStageBinding.md +++ b/docs/FlowStageBinding.md @@ -8,18 +8,18 @@ Name | Type | Description | Notes **PolicybindingmodelPtrId** | **string** | | [readonly] **Target** | **string** | | **Stage** | **string** | | -**StageObj** | [**FlowStageBindingStageObj**](FlowStageBindingStageObj.md) | | +**StageObj** | [**Stage**](Stage.md) | | [readonly] **EvaluateOnPlan** | Pointer to **bool** | Evaluate policies during the Flow planning process. | [optional] **ReEvaluatePolicies** | Pointer to **bool** | Evaluate policies when the Stage is present to the user. | [optional] **Order** | **int32** | | **PolicyEngineMode** | Pointer to [**PolicyEngineMode**](PolicyEngineMode.md) | | [optional] -**InvalidResponseAction** | Pointer to [**NullableInvalidResponseActionEnum**](InvalidResponseActionEnum.md) | Configure how the flow executor should handle an invalid response to a challenge. RETRY returns the error message and a similar challenge to the executor. RESTART restarts the flow from the beginning, and RESTART_WITH_CONTEXT restarts the flow while keeping the current context. * `retry` - Retry * `restart` - Restart * `restart_with_context` - Restart With Context | [optional] +**InvalidResponseAction** | Pointer to [**InvalidResponseActionEnum**](InvalidResponseActionEnum.md) | | [optional] ## Methods ### NewFlowStageBinding -`func NewFlowStageBinding(pk string, policybindingmodelPtrId string, target string, stage string, stageObj FlowStageBindingStageObj, order int32, ) *FlowStageBinding` +`func NewFlowStageBinding(pk string, policybindingmodelPtrId string, target string, stage string, stageObj Stage, order int32, ) *FlowStageBinding` NewFlowStageBinding instantiates a new FlowStageBinding object This constructor will assign default values to properties that have it defined, @@ -116,20 +116,20 @@ SetStage sets Stage field to given value. ### GetStageObj -`func (o *FlowStageBinding) GetStageObj() FlowStageBindingStageObj` +`func (o *FlowStageBinding) GetStageObj() Stage` GetStageObj returns the StageObj field if non-nil, zero value otherwise. ### GetStageObjOk -`func (o *FlowStageBinding) GetStageObjOk() (*FlowStageBindingStageObj, bool)` +`func (o *FlowStageBinding) GetStageObjOk() (*Stage, bool)` GetStageObjOk returns a tuple with the StageObj field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetStageObj -`func (o *FlowStageBinding) SetStageObj(v FlowStageBindingStageObj)` +`func (o *FlowStageBinding) SetStageObj(v Stage)` SetStageObj sets StageObj field to given value. @@ -254,16 +254,6 @@ SetInvalidResponseAction sets InvalidResponseAction field to given value. HasInvalidResponseAction returns a boolean if a field has been set. -### SetInvalidResponseActionNil - -`func (o *FlowStageBinding) SetInvalidResponseActionNil(b bool)` - - SetInvalidResponseActionNil sets the value for InvalidResponseAction to be an explicit nil - -### UnsetInvalidResponseAction -`func (o *FlowStageBinding) UnsetInvalidResponseAction()` - -UnsetInvalidResponseAction ensures that no value is present for InvalidResponseAction, not even an explicit nil [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FlowStageBindingRequest.md b/docs/FlowStageBindingRequest.md index 75d738aac..46910f5b9 100644 --- a/docs/FlowStageBindingRequest.md +++ b/docs/FlowStageBindingRequest.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **ReEvaluatePolicies** | Pointer to **bool** | Evaluate policies when the Stage is present to the user. | [optional] **Order** | **int32** | | **PolicyEngineMode** | Pointer to [**PolicyEngineMode**](PolicyEngineMode.md) | | [optional] -**InvalidResponseAction** | Pointer to [**NullableInvalidResponseActionEnum**](InvalidResponseActionEnum.md) | Configure how the flow executor should handle an invalid response to a challenge. RETRY returns the error message and a similar challenge to the executor. RESTART restarts the flow from the beginning, and RESTART_WITH_CONTEXT restarts the flow while keeping the current context. * `retry` - Retry * `restart` - Restart * `restart_with_context` - Restart With Context | [optional] +**InvalidResponseAction** | Pointer to [**InvalidResponseActionEnum**](InvalidResponseActionEnum.md) | | [optional] ## Methods @@ -191,16 +191,6 @@ SetInvalidResponseAction sets InvalidResponseAction field to given value. HasInvalidResponseAction returns a boolean if a field has been set. -### SetInvalidResponseActionNil - -`func (o *FlowStageBindingRequest) SetInvalidResponseActionNil(b bool)` - - SetInvalidResponseActionNil sets the value for InvalidResponseAction to be an explicit nil - -### UnsetInvalidResponseAction -`func (o *FlowStageBindingRequest) UnsetInvalidResponseAction()` - -UnsetInvalidResponseAction ensures that no value is present for InvalidResponseAction, not even an explicit nil [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FlowStageBindingStageObj.md b/docs/FlowStageBindingStageObj.md deleted file mode 100644 index 39374082e..000000000 --- a/docs/FlowStageBindingStageObj.md +++ /dev/null @@ -1,182 +0,0 @@ -# FlowStageBindingStageObj - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Pk** | **string** | | [readonly] -**Name** | **string** | | -**Component** | **string** | Get object type so that we know how to edit the object | [readonly] -**VerboseName** | **string** | Return object's verbose_name | [readonly] -**VerboseNamePlural** | **string** | Return object's plural verbose_name | [readonly] -**MetaModelName** | **string** | Return internal model name | [readonly] -**FlowSet** | Pointer to [**[]FlowSet**](FlowSet.md) | | [optional] - -## Methods - -### NewFlowStageBindingStageObj - -`func NewFlowStageBindingStageObj(pk string, name string, component string, verboseName string, verboseNamePlural string, metaModelName string, ) *FlowStageBindingStageObj` - -NewFlowStageBindingStageObj instantiates a new FlowStageBindingStageObj object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewFlowStageBindingStageObjWithDefaults - -`func NewFlowStageBindingStageObjWithDefaults() *FlowStageBindingStageObj` - -NewFlowStageBindingStageObjWithDefaults instantiates a new FlowStageBindingStageObj object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetPk - -`func (o *FlowStageBindingStageObj) GetPk() string` - -GetPk returns the Pk field if non-nil, zero value otherwise. - -### GetPkOk - -`func (o *FlowStageBindingStageObj) GetPkOk() (*string, bool)` - -GetPkOk returns a tuple with the Pk field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPk - -`func (o *FlowStageBindingStageObj) SetPk(v string)` - -SetPk sets Pk field to given value. - - -### GetName - -`func (o *FlowStageBindingStageObj) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *FlowStageBindingStageObj) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *FlowStageBindingStageObj) SetName(v string)` - -SetName sets Name field to given value. - - -### GetComponent - -`func (o *FlowStageBindingStageObj) GetComponent() string` - -GetComponent returns the Component field if non-nil, zero value otherwise. - -### GetComponentOk - -`func (o *FlowStageBindingStageObj) GetComponentOk() (*string, bool)` - -GetComponentOk returns a tuple with the Component field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetComponent - -`func (o *FlowStageBindingStageObj) SetComponent(v string)` - -SetComponent sets Component field to given value. - - -### GetVerboseName - -`func (o *FlowStageBindingStageObj) GetVerboseName() string` - -GetVerboseName returns the VerboseName field if non-nil, zero value otherwise. - -### GetVerboseNameOk - -`func (o *FlowStageBindingStageObj) GetVerboseNameOk() (*string, bool)` - -GetVerboseNameOk returns a tuple with the VerboseName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetVerboseName - -`func (o *FlowStageBindingStageObj) SetVerboseName(v string)` - -SetVerboseName sets VerboseName field to given value. - - -### GetVerboseNamePlural - -`func (o *FlowStageBindingStageObj) GetVerboseNamePlural() string` - -GetVerboseNamePlural returns the VerboseNamePlural field if non-nil, zero value otherwise. - -### GetVerboseNamePluralOk - -`func (o *FlowStageBindingStageObj) GetVerboseNamePluralOk() (*string, bool)` - -GetVerboseNamePluralOk returns a tuple with the VerboseNamePlural field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetVerboseNamePlural - -`func (o *FlowStageBindingStageObj) SetVerboseNamePlural(v string)` - -SetVerboseNamePlural sets VerboseNamePlural field to given value. - - -### GetMetaModelName - -`func (o *FlowStageBindingStageObj) GetMetaModelName() string` - -GetMetaModelName returns the MetaModelName field if non-nil, zero value otherwise. - -### GetMetaModelNameOk - -`func (o *FlowStageBindingStageObj) GetMetaModelNameOk() (*string, bool)` - -GetMetaModelNameOk returns a tuple with the MetaModelName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMetaModelName - -`func (o *FlowStageBindingStageObj) SetMetaModelName(v string)` - -SetMetaModelName sets MetaModelName field to given value. - - -### GetFlowSet - -`func (o *FlowStageBindingStageObj) GetFlowSet() []FlowSet` - -GetFlowSet returns the FlowSet field if non-nil, zero value otherwise. - -### GetFlowSetOk - -`func (o *FlowStageBindingStageObj) GetFlowSetOk() (*[]FlowSet, bool)` - -GetFlowSetOk returns a tuple with the FlowSet field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFlowSet - -`func (o *FlowStageBindingStageObj) SetFlowSet(v []FlowSet)` - -SetFlowSet sets FlowSet field to given value. - -### HasFlowSet - -`func (o *FlowStageBindingStageObj) HasFlowSet() bool` - -HasFlowSet returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/FlowsApi.md b/docs/FlowsApi.md index 88cd271e7..619c0709a 100644 --- a/docs/FlowsApi.md +++ b/docs/FlowsApi.md @@ -49,7 +49,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -115,7 +115,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -123,7 +123,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.FlowsApi.FlowsBindingsDestroy(context.Background(), fsbUuid).Execute() + r, err := apiClient.FlowsApi.FlowsBindingsDestroy(context.Background(), fsbUuid).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FlowsApi.FlowsBindingsDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -183,7 +183,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -275,7 +275,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -347,7 +347,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -417,7 +417,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -489,7 +489,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -559,7 +559,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -631,7 +631,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -705,7 +705,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -775,14 +775,14 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.FlowsApi.FlowsInstancesCacheClearCreate(context.Background()).Execute() + r, err := apiClient.FlowsApi.FlowsInstancesCacheClearCreate(context.Background()).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FlowsApi.FlowsInstancesCacheClearCreate``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -834,7 +834,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -895,11 +895,11 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { - flowRequest := *openapiclient.NewFlowRequest("Name_example", "Slug_example", "Title_example", "TODO") // FlowRequest | + flowRequest := *openapiclient.NewFlowRequest("Name_example", "Slug_example", "Title_example", openapiclient.FlowDesignationEnum("authentication")) // FlowRequest | configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) @@ -961,7 +961,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -969,7 +969,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.FlowsApi.FlowsInstancesDestroy(context.Background(), slug).Execute() + r, err := apiClient.FlowsApi.FlowsInstancesDestroy(context.Background(), slug).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FlowsApi.FlowsInstancesDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -1029,7 +1029,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1099,7 +1099,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1169,7 +1169,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1239,7 +1239,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1307,7 +1307,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1389,7 +1389,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1461,7 +1461,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1531,7 +1531,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1541,7 +1541,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.FlowsApi.FlowsInstancesSetBackgroundCreate(context.Background(), slug).File(file).Clear(clear).Execute() + r, err := apiClient.FlowsApi.FlowsInstancesSetBackgroundCreate(context.Background(), slug).File(file).Clear(clear).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FlowsApi.FlowsInstancesSetBackgroundCreate``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -1603,7 +1603,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1612,7 +1612,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.FlowsApi.FlowsInstancesSetBackgroundUrlCreate(context.Background(), slug).FilePathRequest(filePathRequest).Execute() + r, err := apiClient.FlowsApi.FlowsInstancesSetBackgroundUrlCreate(context.Background(), slug).FilePathRequest(filePathRequest).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FlowsApi.FlowsInstancesSetBackgroundUrlCreate``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -1673,12 +1673,12 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { slug := "slug_example" // string | - flowRequest := *openapiclient.NewFlowRequest("Name_example", "Slug_example", "Title_example", "TODO") // FlowRequest | + flowRequest := *openapiclient.NewFlowRequest("Name_example", "Slug_example", "Title_example", openapiclient.FlowDesignationEnum("authentication")) // FlowRequest | configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) @@ -1745,7 +1745,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { diff --git a/docs/Invitation.md b/docs/Invitation.md index 3c25dbdb9..499dc6082 100644 --- a/docs/Invitation.md +++ b/docs/Invitation.md @@ -8,16 +8,16 @@ Name | Type | Description | Notes **Name** | **string** | | **Expires** | Pointer to **time.Time** | | [optional] **FixedData** | Pointer to **map[string]interface{}** | | [optional] -**CreatedBy** | [**InvitationCreatedBy**](InvitationCreatedBy.md) | | +**CreatedBy** | [**GroupMember**](GroupMember.md) | | [readonly] **SingleUse** | Pointer to **bool** | When enabled, the invitation will be deleted after usage. | [optional] **Flow** | Pointer to **NullableString** | When set, only the configured flow can use this invitation. | [optional] -**FlowObj** | [**InvitationFlowObj**](InvitationFlowObj.md) | | +**FlowObj** | [**Flow**](Flow.md) | | [readonly] ## Methods ### NewInvitation -`func NewInvitation(pk string, name string, createdBy InvitationCreatedBy, flowObj InvitationFlowObj, ) *Invitation` +`func NewInvitation(pk string, name string, createdBy GroupMember, flowObj Flow, ) *Invitation` NewInvitation instantiates a new Invitation object This constructor will assign default values to properties that have it defined, @@ -124,20 +124,20 @@ HasFixedData returns a boolean if a field has been set. ### GetCreatedBy -`func (o *Invitation) GetCreatedBy() InvitationCreatedBy` +`func (o *Invitation) GetCreatedBy() GroupMember` GetCreatedBy returns the CreatedBy field if non-nil, zero value otherwise. ### GetCreatedByOk -`func (o *Invitation) GetCreatedByOk() (*InvitationCreatedBy, bool)` +`func (o *Invitation) GetCreatedByOk() (*GroupMember, bool)` GetCreatedByOk returns a tuple with the CreatedBy field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCreatedBy -`func (o *Invitation) SetCreatedBy(v InvitationCreatedBy)` +`func (o *Invitation) SetCreatedBy(v GroupMember)` SetCreatedBy sets CreatedBy field to given value. @@ -204,20 +204,20 @@ HasFlow returns a boolean if a field has been set. UnsetFlow ensures that no value is present for Flow, not even an explicit nil ### GetFlowObj -`func (o *Invitation) GetFlowObj() InvitationFlowObj` +`func (o *Invitation) GetFlowObj() Flow` GetFlowObj returns the FlowObj field if non-nil, zero value otherwise. ### GetFlowObjOk -`func (o *Invitation) GetFlowObjOk() (*InvitationFlowObj, bool)` +`func (o *Invitation) GetFlowObjOk() (*Flow, bool)` GetFlowObjOk returns a tuple with the FlowObj field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetFlowObj -`func (o *Invitation) SetFlowObj(v InvitationFlowObj)` +`func (o *Invitation) SetFlowObj(v Flow)` SetFlowObj sets FlowObj field to given value. diff --git a/docs/InvitationCreatedBy.md b/docs/InvitationCreatedBy.md deleted file mode 100644 index 42ac69d40..000000000 --- a/docs/InvitationCreatedBy.md +++ /dev/null @@ -1,228 +0,0 @@ -# InvitationCreatedBy - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Pk** | **int32** | | [readonly] -**Username** | **string** | Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. | -**Name** | **string** | User's display name. | -**IsActive** | Pointer to **bool** | Designates whether this user should be treated as active. Unselect this instead of deleting accounts. | [optional] -**LastLogin** | Pointer to **NullableTime** | | [optional] -**Email** | Pointer to **string** | | [optional] -**Attributes** | Pointer to **map[string]interface{}** | | [optional] -**Uid** | **string** | | [readonly] - -## Methods - -### NewInvitationCreatedBy - -`func NewInvitationCreatedBy(pk int32, username string, name string, uid string, ) *InvitationCreatedBy` - -NewInvitationCreatedBy instantiates a new InvitationCreatedBy object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewInvitationCreatedByWithDefaults - -`func NewInvitationCreatedByWithDefaults() *InvitationCreatedBy` - -NewInvitationCreatedByWithDefaults instantiates a new InvitationCreatedBy object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetPk - -`func (o *InvitationCreatedBy) GetPk() int32` - -GetPk returns the Pk field if non-nil, zero value otherwise. - -### GetPkOk - -`func (o *InvitationCreatedBy) GetPkOk() (*int32, bool)` - -GetPkOk returns a tuple with the Pk field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPk - -`func (o *InvitationCreatedBy) SetPk(v int32)` - -SetPk sets Pk field to given value. - - -### GetUsername - -`func (o *InvitationCreatedBy) GetUsername() string` - -GetUsername returns the Username field if non-nil, zero value otherwise. - -### GetUsernameOk - -`func (o *InvitationCreatedBy) GetUsernameOk() (*string, bool)` - -GetUsernameOk returns a tuple with the Username field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUsername - -`func (o *InvitationCreatedBy) SetUsername(v string)` - -SetUsername sets Username field to given value. - - -### GetName - -`func (o *InvitationCreatedBy) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *InvitationCreatedBy) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *InvitationCreatedBy) SetName(v string)` - -SetName sets Name field to given value. - - -### GetIsActive - -`func (o *InvitationCreatedBy) GetIsActive() bool` - -GetIsActive returns the IsActive field if non-nil, zero value otherwise. - -### GetIsActiveOk - -`func (o *InvitationCreatedBy) GetIsActiveOk() (*bool, bool)` - -GetIsActiveOk returns a tuple with the IsActive field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsActive - -`func (o *InvitationCreatedBy) SetIsActive(v bool)` - -SetIsActive sets IsActive field to given value. - -### HasIsActive - -`func (o *InvitationCreatedBy) HasIsActive() bool` - -HasIsActive returns a boolean if a field has been set. - -### GetLastLogin - -`func (o *InvitationCreatedBy) GetLastLogin() time.Time` - -GetLastLogin returns the LastLogin field if non-nil, zero value otherwise. - -### GetLastLoginOk - -`func (o *InvitationCreatedBy) GetLastLoginOk() (*time.Time, bool)` - -GetLastLoginOk returns a tuple with the LastLogin field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLastLogin - -`func (o *InvitationCreatedBy) SetLastLogin(v time.Time)` - -SetLastLogin sets LastLogin field to given value. - -### HasLastLogin - -`func (o *InvitationCreatedBy) HasLastLogin() bool` - -HasLastLogin returns a boolean if a field has been set. - -### SetLastLoginNil - -`func (o *InvitationCreatedBy) SetLastLoginNil(b bool)` - - SetLastLoginNil sets the value for LastLogin to be an explicit nil - -### UnsetLastLogin -`func (o *InvitationCreatedBy) UnsetLastLogin()` - -UnsetLastLogin ensures that no value is present for LastLogin, not even an explicit nil -### GetEmail - -`func (o *InvitationCreatedBy) GetEmail() string` - -GetEmail returns the Email field if non-nil, zero value otherwise. - -### GetEmailOk - -`func (o *InvitationCreatedBy) GetEmailOk() (*string, bool)` - -GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEmail - -`func (o *InvitationCreatedBy) SetEmail(v string)` - -SetEmail sets Email field to given value. - -### HasEmail - -`func (o *InvitationCreatedBy) HasEmail() bool` - -HasEmail returns a boolean if a field has been set. - -### GetAttributes - -`func (o *InvitationCreatedBy) GetAttributes() map[string]interface{}` - -GetAttributes returns the Attributes field if non-nil, zero value otherwise. - -### GetAttributesOk - -`func (o *InvitationCreatedBy) GetAttributesOk() (*map[string]interface{}, bool)` - -GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAttributes - -`func (o *InvitationCreatedBy) SetAttributes(v map[string]interface{})` - -SetAttributes sets Attributes field to given value. - -### HasAttributes - -`func (o *InvitationCreatedBy) HasAttributes() bool` - -HasAttributes returns a boolean if a field has been set. - -### GetUid - -`func (o *InvitationCreatedBy) GetUid() string` - -GetUid returns the Uid field if non-nil, zero value otherwise. - -### GetUidOk - -`func (o *InvitationCreatedBy) GetUidOk() (*string, bool)` - -GetUidOk returns a tuple with the Uid field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUid - -`func (o *InvitationCreatedBy) SetUid(v string)` - -SetUid sets Uid field to given value. - - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/InvitationFlowObj.md b/docs/InvitationFlowObj.md deleted file mode 100644 index b7ff0d3db..000000000 --- a/docs/InvitationFlowObj.md +++ /dev/null @@ -1,421 +0,0 @@ -# InvitationFlowObj - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Pk** | **string** | | [readonly] -**PolicybindingmodelPtrId** | **string** | | [readonly] -**Name** | **string** | | -**Slug** | **string** | Visible in the URL. | -**Title** | **string** | Shown as the Title in Flow pages. | -**Designation** | [**NullableFlowDesignationEnum**](FlowDesignationEnum.md) | Decides what this Flow is used for. For example, the Authentication flow is redirect to when an un-authenticated user visits authentik. * `authentication` - Authentication * `authorization` - Authorization * `invalidation` - Invalidation * `enrollment` - Enrollment * `unenrollment` - Unrenollment * `recovery` - Recovery * `stage_configuration` - Stage Configuration | -**Background** | **string** | Get the URL to the background image. If the name is /static or starts with http it is returned as-is | [readonly] -**Stages** | **[]string** | | [readonly] -**Policies** | **[]string** | | [readonly] -**CacheCount** | **int32** | Get count of cached flows | [readonly] -**PolicyEngineMode** | Pointer to [**PolicyEngineMode**](PolicyEngineMode.md) | | [optional] -**CompatibilityMode** | Pointer to **bool** | Enable compatibility mode, increases compatibility with password managers on mobile devices. | [optional] -**ExportUrl** | **string** | Get export URL for flow | [readonly] -**Layout** | Pointer to [**LayoutEnum**](LayoutEnum.md) | | [optional] -**DeniedAction** | Pointer to [**NullableDeniedActionEnum**](DeniedActionEnum.md) | Configure what should happen when a flow denies access to a user. * `message_continue` - Message Continue * `message` - Message * `continue` - Continue | [optional] -**Authentication** | Pointer to [**NullableAuthenticationEnum**](AuthenticationEnum.md) | Required level of authentication and authorization to access a flow. * `none` - None * `require_authenticated` - Require Authenticated * `require_unauthenticated` - Require Unauthenticated * `require_superuser` - Require Superuser | [optional] - -## Methods - -### NewInvitationFlowObj - -`func NewInvitationFlowObj(pk string, policybindingmodelPtrId string, name string, slug string, title string, designation NullableFlowDesignationEnum, background string, stages []string, policies []string, cacheCount int32, exportUrl string, ) *InvitationFlowObj` - -NewInvitationFlowObj instantiates a new InvitationFlowObj object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewInvitationFlowObjWithDefaults - -`func NewInvitationFlowObjWithDefaults() *InvitationFlowObj` - -NewInvitationFlowObjWithDefaults instantiates a new InvitationFlowObj object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetPk - -`func (o *InvitationFlowObj) GetPk() string` - -GetPk returns the Pk field if non-nil, zero value otherwise. - -### GetPkOk - -`func (o *InvitationFlowObj) GetPkOk() (*string, bool)` - -GetPkOk returns a tuple with the Pk field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPk - -`func (o *InvitationFlowObj) SetPk(v string)` - -SetPk sets Pk field to given value. - - -### GetPolicybindingmodelPtrId - -`func (o *InvitationFlowObj) GetPolicybindingmodelPtrId() string` - -GetPolicybindingmodelPtrId returns the PolicybindingmodelPtrId field if non-nil, zero value otherwise. - -### GetPolicybindingmodelPtrIdOk - -`func (o *InvitationFlowObj) GetPolicybindingmodelPtrIdOk() (*string, bool)` - -GetPolicybindingmodelPtrIdOk returns a tuple with the PolicybindingmodelPtrId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPolicybindingmodelPtrId - -`func (o *InvitationFlowObj) SetPolicybindingmodelPtrId(v string)` - -SetPolicybindingmodelPtrId sets PolicybindingmodelPtrId field to given value. - - -### GetName - -`func (o *InvitationFlowObj) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *InvitationFlowObj) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *InvitationFlowObj) SetName(v string)` - -SetName sets Name field to given value. - - -### GetSlug - -`func (o *InvitationFlowObj) GetSlug() string` - -GetSlug returns the Slug field if non-nil, zero value otherwise. - -### GetSlugOk - -`func (o *InvitationFlowObj) GetSlugOk() (*string, bool)` - -GetSlugOk returns a tuple with the Slug field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSlug - -`func (o *InvitationFlowObj) SetSlug(v string)` - -SetSlug sets Slug field to given value. - - -### GetTitle - -`func (o *InvitationFlowObj) GetTitle() string` - -GetTitle returns the Title field if non-nil, zero value otherwise. - -### GetTitleOk - -`func (o *InvitationFlowObj) GetTitleOk() (*string, bool)` - -GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTitle - -`func (o *InvitationFlowObj) SetTitle(v string)` - -SetTitle sets Title field to given value. - - -### GetDesignation - -`func (o *InvitationFlowObj) GetDesignation() FlowDesignationEnum` - -GetDesignation returns the Designation field if non-nil, zero value otherwise. - -### GetDesignationOk - -`func (o *InvitationFlowObj) GetDesignationOk() (*FlowDesignationEnum, bool)` - -GetDesignationOk returns a tuple with the Designation field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDesignation - -`func (o *InvitationFlowObj) SetDesignation(v FlowDesignationEnum)` - -SetDesignation sets Designation field to given value. - - -### SetDesignationNil - -`func (o *InvitationFlowObj) SetDesignationNil(b bool)` - - SetDesignationNil sets the value for Designation to be an explicit nil - -### UnsetDesignation -`func (o *InvitationFlowObj) UnsetDesignation()` - -UnsetDesignation ensures that no value is present for Designation, not even an explicit nil -### GetBackground - -`func (o *InvitationFlowObj) GetBackground() string` - -GetBackground returns the Background field if non-nil, zero value otherwise. - -### GetBackgroundOk - -`func (o *InvitationFlowObj) GetBackgroundOk() (*string, bool)` - -GetBackgroundOk returns a tuple with the Background field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetBackground - -`func (o *InvitationFlowObj) SetBackground(v string)` - -SetBackground sets Background field to given value. - - -### GetStages - -`func (o *InvitationFlowObj) GetStages() []string` - -GetStages returns the Stages field if non-nil, zero value otherwise. - -### GetStagesOk - -`func (o *InvitationFlowObj) GetStagesOk() (*[]string, bool)` - -GetStagesOk returns a tuple with the Stages field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStages - -`func (o *InvitationFlowObj) SetStages(v []string)` - -SetStages sets Stages field to given value. - - -### GetPolicies - -`func (o *InvitationFlowObj) GetPolicies() []string` - -GetPolicies returns the Policies field if non-nil, zero value otherwise. - -### GetPoliciesOk - -`func (o *InvitationFlowObj) GetPoliciesOk() (*[]string, bool)` - -GetPoliciesOk returns a tuple with the Policies field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPolicies - -`func (o *InvitationFlowObj) SetPolicies(v []string)` - -SetPolicies sets Policies field to given value. - - -### GetCacheCount - -`func (o *InvitationFlowObj) GetCacheCount() int32` - -GetCacheCount returns the CacheCount field if non-nil, zero value otherwise. - -### GetCacheCountOk - -`func (o *InvitationFlowObj) GetCacheCountOk() (*int32, bool)` - -GetCacheCountOk returns a tuple with the CacheCount field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCacheCount - -`func (o *InvitationFlowObj) SetCacheCount(v int32)` - -SetCacheCount sets CacheCount field to given value. - - -### GetPolicyEngineMode - -`func (o *InvitationFlowObj) GetPolicyEngineMode() PolicyEngineMode` - -GetPolicyEngineMode returns the PolicyEngineMode field if non-nil, zero value otherwise. - -### GetPolicyEngineModeOk - -`func (o *InvitationFlowObj) GetPolicyEngineModeOk() (*PolicyEngineMode, bool)` - -GetPolicyEngineModeOk returns a tuple with the PolicyEngineMode field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPolicyEngineMode - -`func (o *InvitationFlowObj) SetPolicyEngineMode(v PolicyEngineMode)` - -SetPolicyEngineMode sets PolicyEngineMode field to given value. - -### HasPolicyEngineMode - -`func (o *InvitationFlowObj) HasPolicyEngineMode() bool` - -HasPolicyEngineMode returns a boolean if a field has been set. - -### GetCompatibilityMode - -`func (o *InvitationFlowObj) GetCompatibilityMode() bool` - -GetCompatibilityMode returns the CompatibilityMode field if non-nil, zero value otherwise. - -### GetCompatibilityModeOk - -`func (o *InvitationFlowObj) GetCompatibilityModeOk() (*bool, bool)` - -GetCompatibilityModeOk returns a tuple with the CompatibilityMode field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCompatibilityMode - -`func (o *InvitationFlowObj) SetCompatibilityMode(v bool)` - -SetCompatibilityMode sets CompatibilityMode field to given value. - -### HasCompatibilityMode - -`func (o *InvitationFlowObj) HasCompatibilityMode() bool` - -HasCompatibilityMode returns a boolean if a field has been set. - -### GetExportUrl - -`func (o *InvitationFlowObj) GetExportUrl() string` - -GetExportUrl returns the ExportUrl field if non-nil, zero value otherwise. - -### GetExportUrlOk - -`func (o *InvitationFlowObj) GetExportUrlOk() (*string, bool)` - -GetExportUrlOk returns a tuple with the ExportUrl field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetExportUrl - -`func (o *InvitationFlowObj) SetExportUrl(v string)` - -SetExportUrl sets ExportUrl field to given value. - - -### GetLayout - -`func (o *InvitationFlowObj) GetLayout() LayoutEnum` - -GetLayout returns the Layout field if non-nil, zero value otherwise. - -### GetLayoutOk - -`func (o *InvitationFlowObj) GetLayoutOk() (*LayoutEnum, bool)` - -GetLayoutOk returns a tuple with the Layout field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLayout - -`func (o *InvitationFlowObj) SetLayout(v LayoutEnum)` - -SetLayout sets Layout field to given value. - -### HasLayout - -`func (o *InvitationFlowObj) HasLayout() bool` - -HasLayout returns a boolean if a field has been set. - -### GetDeniedAction - -`func (o *InvitationFlowObj) GetDeniedAction() DeniedActionEnum` - -GetDeniedAction returns the DeniedAction field if non-nil, zero value otherwise. - -### GetDeniedActionOk - -`func (o *InvitationFlowObj) GetDeniedActionOk() (*DeniedActionEnum, bool)` - -GetDeniedActionOk returns a tuple with the DeniedAction field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDeniedAction - -`func (o *InvitationFlowObj) SetDeniedAction(v DeniedActionEnum)` - -SetDeniedAction sets DeniedAction field to given value. - -### HasDeniedAction - -`func (o *InvitationFlowObj) HasDeniedAction() bool` - -HasDeniedAction returns a boolean if a field has been set. - -### SetDeniedActionNil - -`func (o *InvitationFlowObj) SetDeniedActionNil(b bool)` - - SetDeniedActionNil sets the value for DeniedAction to be an explicit nil - -### UnsetDeniedAction -`func (o *InvitationFlowObj) UnsetDeniedAction()` - -UnsetDeniedAction ensures that no value is present for DeniedAction, not even an explicit nil -### GetAuthentication - -`func (o *InvitationFlowObj) GetAuthentication() AuthenticationEnum` - -GetAuthentication returns the Authentication field if non-nil, zero value otherwise. - -### GetAuthenticationOk - -`func (o *InvitationFlowObj) GetAuthenticationOk() (*AuthenticationEnum, bool)` - -GetAuthenticationOk returns a tuple with the Authentication field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAuthentication - -`func (o *InvitationFlowObj) SetAuthentication(v AuthenticationEnum)` - -SetAuthentication sets Authentication field to given value. - -### HasAuthentication - -`func (o *InvitationFlowObj) HasAuthentication() bool` - -HasAuthentication returns a boolean if a field has been set. - -### SetAuthenticationNil - -`func (o *InvitationFlowObj) SetAuthenticationNil(b bool)` - - SetAuthenticationNil sets the value for Authentication to be an explicit nil - -### UnsetAuthentication -`func (o *InvitationFlowObj) UnsetAuthentication()` - -UnsetAuthentication ensures that no value is present for Authentication, not even an explicit nil - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/LDAPSource.md b/docs/LDAPSource.md index af8061a8a..8c2bc8b15 100644 --- a/docs/LDAPSource.md +++ b/docs/LDAPSource.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes **VerboseNamePlural** | **string** | Return object's plural verbose_name | [readonly] **MetaModelName** | **string** | Return internal model name | [readonly] **PolicyEngineMode** | Pointer to [**PolicyEngineMode**](PolicyEngineMode.md) | | [optional] -**UserMatchingMode** | Pointer to [**NullableUserMatchingModeEnum**](UserMatchingModeEnum.md) | How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. | [optional] +**UserMatchingMode** | Pointer to [**UserMatchingModeEnum**](UserMatchingModeEnum.md) | | [optional] **Managed** | **NullableString** | Objects which are managed by authentik. These objects are created and updated automatically. This is flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. | [readonly] **UserPathTemplate** | Pointer to **string** | | [optional] **Icon** | **NullableString** | Get the URL to the Icon. If the name is /static or starts with http it is returned as-is | [readonly] @@ -341,16 +341,6 @@ SetUserMatchingMode sets UserMatchingMode field to given value. HasUserMatchingMode returns a boolean if a field has been set. -### SetUserMatchingModeNil - -`func (o *LDAPSource) SetUserMatchingModeNil(b bool)` - - SetUserMatchingModeNil sets the value for UserMatchingMode to be an explicit nil - -### UnsetUserMatchingMode -`func (o *LDAPSource) UnsetUserMatchingMode()` - -UnsetUserMatchingMode ensures that no value is present for UserMatchingMode, not even an explicit nil ### GetManaged `func (o *LDAPSource) GetManaged() string` diff --git a/docs/LDAPSourceRequest.md b/docs/LDAPSourceRequest.md index 29d87a97f..69616b854 100644 --- a/docs/LDAPSourceRequest.md +++ b/docs/LDAPSourceRequest.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **AuthenticationFlow** | Pointer to **NullableString** | Flow to use when authenticating existing users. | [optional] **EnrollmentFlow** | Pointer to **NullableString** | Flow to use when enrolling new users. | [optional] **PolicyEngineMode** | Pointer to [**PolicyEngineMode**](PolicyEngineMode.md) | | [optional] -**UserMatchingMode** | Pointer to [**NullableUserMatchingModeEnum**](UserMatchingModeEnum.md) | How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. | [optional] +**UserMatchingMode** | Pointer to [**UserMatchingModeEnum**](UserMatchingModeEnum.md) | | [optional] **UserPathTemplate** | Pointer to **string** | | [optional] **ServerUri** | **string** | | **PeerCertificate** | Pointer to **NullableString** | Optionally verify the LDAP Server's Certificate against the CA Chain in this keypair. | [optional] @@ -235,16 +235,6 @@ SetUserMatchingMode sets UserMatchingMode field to given value. HasUserMatchingMode returns a boolean if a field has been set. -### SetUserMatchingModeNil - -`func (o *LDAPSourceRequest) SetUserMatchingModeNil(b bool)` - - SetUserMatchingModeNil sets the value for UserMatchingMode to be an explicit nil - -### UnsetUserMatchingMode -`func (o *LDAPSourceRequest) UnsetUserMatchingMode()` - -UnsetUserMatchingMode ensures that no value is present for UserMatchingMode, not even an explicit nil ### GetUserPathTemplate `func (o *LDAPSourceRequest) GetUserPathTemplate() string` diff --git a/docs/ManagedApi.md b/docs/ManagedApi.md index 33bcf3154..79847edb4 100644 --- a/docs/ManagedApi.md +++ b/docs/ManagedApi.md @@ -33,7 +33,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -103,7 +103,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -164,7 +164,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -230,7 +230,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -238,7 +238,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ManagedApi.ManagedBlueprintsDestroy(context.Background(), instanceUuid).Execute() + r, err := apiClient.ManagedApi.ManagedBlueprintsDestroy(context.Background(), instanceUuid).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ManagedApi.ManagedBlueprintsDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -298,7 +298,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -374,7 +374,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -446,7 +446,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -516,7 +516,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -588,7 +588,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { diff --git a/docs/Notification.md b/docs/Notification.md index a54dd090d..88057efec 100644 --- a/docs/Notification.md +++ b/docs/Notification.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Pk** | **string** | | [readonly] -**Severity** | [**NullableSeverityEnum**](SeverityEnum.md) | | [readonly] +**Severity** | [**SeverityEnum**](SeverityEnum.md) | | [readonly] **Body** | **string** | | [readonly] **Created** | **time.Time** | | [readonly] **Event** | Pointer to [**Event**](Event.md) | | [optional] @@ -15,7 +15,7 @@ Name | Type | Description | Notes ### NewNotification -`func NewNotification(pk string, severity NullableSeverityEnum, body string, created time.Time, ) *Notification` +`func NewNotification(pk string, severity SeverityEnum, body string, created time.Time, ) *Notification` NewNotification instantiates a new Notification object This constructor will assign default values to properties that have it defined, @@ -70,16 +70,6 @@ and a boolean to check if the value has been set. SetSeverity sets Severity field to given value. -### SetSeverityNil - -`func (o *Notification) SetSeverityNil(b bool)` - - SetSeverityNil sets the value for Severity to be an explicit nil - -### UnsetSeverity -`func (o *Notification) UnsetSeverity()` - -UnsetSeverity ensures that no value is present for Severity, not even an explicit nil ### GetBody `func (o *Notification) GetBody() string` diff --git a/docs/NotificationRule.md b/docs/NotificationRule.md index 125807cf0..bdec1eb0e 100644 --- a/docs/NotificationRule.md +++ b/docs/NotificationRule.md @@ -7,15 +7,15 @@ Name | Type | Description | Notes **Pk** | **string** | | [readonly] **Name** | **string** | | **Transports** | Pointer to **[]string** | Select which transports should be used to notify the user. If none are selected, the notification will only be shown in the authentik UI. | [optional] -**Severity** | Pointer to [**NullableSeverityEnum**](SeverityEnum.md) | Controls which severity level the created notifications will have. * `notice` - Notice * `warning` - Warning * `alert` - Alert | [optional] +**Severity** | Pointer to [**SeverityEnum**](SeverityEnum.md) | | [optional] **Group** | Pointer to **NullableString** | Define which group of users this notification should be sent and shown to. If left empty, Notification won't ben sent. | [optional] -**GroupObj** | [**NotificationRuleGroupObj**](NotificationRuleGroupObj.md) | | +**GroupObj** | [**Group**](Group.md) | | [readonly] ## Methods ### NewNotificationRule -`func NewNotificationRule(pk string, name string, groupObj NotificationRuleGroupObj, ) *NotificationRule` +`func NewNotificationRule(pk string, name string, groupObj Group, ) *NotificationRule` NewNotificationRule instantiates a new NotificationRule object This constructor will assign default values to properties that have it defined, @@ -120,16 +120,6 @@ SetSeverity sets Severity field to given value. HasSeverity returns a boolean if a field has been set. -### SetSeverityNil - -`func (o *NotificationRule) SetSeverityNil(b bool)` - - SetSeverityNil sets the value for Severity to be an explicit nil - -### UnsetSeverity -`func (o *NotificationRule) UnsetSeverity()` - -UnsetSeverity ensures that no value is present for Severity, not even an explicit nil ### GetGroup `func (o *NotificationRule) GetGroup() string` @@ -167,20 +157,20 @@ HasGroup returns a boolean if a field has been set. UnsetGroup ensures that no value is present for Group, not even an explicit nil ### GetGroupObj -`func (o *NotificationRule) GetGroupObj() NotificationRuleGroupObj` +`func (o *NotificationRule) GetGroupObj() Group` GetGroupObj returns the GroupObj field if non-nil, zero value otherwise. ### GetGroupObjOk -`func (o *NotificationRule) GetGroupObjOk() (*NotificationRuleGroupObj, bool)` +`func (o *NotificationRule) GetGroupObjOk() (*Group, bool)` GetGroupObjOk returns a tuple with the GroupObj field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetGroupObj -`func (o *NotificationRule) SetGroupObj(v NotificationRuleGroupObj)` +`func (o *NotificationRule) SetGroupObj(v Group)` SetGroupObj sets GroupObj field to given value. diff --git a/docs/NotificationRuleGroupObj.md b/docs/NotificationRuleGroupObj.md deleted file mode 100644 index 11c3a0982..000000000 --- a/docs/NotificationRuleGroupObj.md +++ /dev/null @@ -1,249 +0,0 @@ -# NotificationRuleGroupObj - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Pk** | **string** | | [readonly] -**NumPk** | **int32** | | [readonly] -**Name** | **string** | | -**IsSuperuser** | Pointer to **bool** | Users added to this group will be superusers. | [optional] -**Parent** | Pointer to **NullableString** | | [optional] -**ParentName** | **string** | | [readonly] -**Users** | Pointer to **[]int32** | | [optional] -**Attributes** | Pointer to **map[string]interface{}** | | [optional] -**UsersObj** | [**[]GroupMember**](GroupMember.md) | | [readonly] - -## Methods - -### NewNotificationRuleGroupObj - -`func NewNotificationRuleGroupObj(pk string, numPk int32, name string, parentName string, usersObj []GroupMember, ) *NotificationRuleGroupObj` - -NewNotificationRuleGroupObj instantiates a new NotificationRuleGroupObj object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewNotificationRuleGroupObjWithDefaults - -`func NewNotificationRuleGroupObjWithDefaults() *NotificationRuleGroupObj` - -NewNotificationRuleGroupObjWithDefaults instantiates a new NotificationRuleGroupObj object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetPk - -`func (o *NotificationRuleGroupObj) GetPk() string` - -GetPk returns the Pk field if non-nil, zero value otherwise. - -### GetPkOk - -`func (o *NotificationRuleGroupObj) GetPkOk() (*string, bool)` - -GetPkOk returns a tuple with the Pk field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPk - -`func (o *NotificationRuleGroupObj) SetPk(v string)` - -SetPk sets Pk field to given value. - - -### GetNumPk - -`func (o *NotificationRuleGroupObj) GetNumPk() int32` - -GetNumPk returns the NumPk field if non-nil, zero value otherwise. - -### GetNumPkOk - -`func (o *NotificationRuleGroupObj) GetNumPkOk() (*int32, bool)` - -GetNumPkOk returns a tuple with the NumPk field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetNumPk - -`func (o *NotificationRuleGroupObj) SetNumPk(v int32)` - -SetNumPk sets NumPk field to given value. - - -### GetName - -`func (o *NotificationRuleGroupObj) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *NotificationRuleGroupObj) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *NotificationRuleGroupObj) SetName(v string)` - -SetName sets Name field to given value. - - -### GetIsSuperuser - -`func (o *NotificationRuleGroupObj) GetIsSuperuser() bool` - -GetIsSuperuser returns the IsSuperuser field if non-nil, zero value otherwise. - -### GetIsSuperuserOk - -`func (o *NotificationRuleGroupObj) GetIsSuperuserOk() (*bool, bool)` - -GetIsSuperuserOk returns a tuple with the IsSuperuser field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsSuperuser - -`func (o *NotificationRuleGroupObj) SetIsSuperuser(v bool)` - -SetIsSuperuser sets IsSuperuser field to given value. - -### HasIsSuperuser - -`func (o *NotificationRuleGroupObj) HasIsSuperuser() bool` - -HasIsSuperuser returns a boolean if a field has been set. - -### GetParent - -`func (o *NotificationRuleGroupObj) GetParent() string` - -GetParent returns the Parent field if non-nil, zero value otherwise. - -### GetParentOk - -`func (o *NotificationRuleGroupObj) GetParentOk() (*string, bool)` - -GetParentOk returns a tuple with the Parent field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetParent - -`func (o *NotificationRuleGroupObj) SetParent(v string)` - -SetParent sets Parent field to given value. - -### HasParent - -`func (o *NotificationRuleGroupObj) HasParent() bool` - -HasParent returns a boolean if a field has been set. - -### SetParentNil - -`func (o *NotificationRuleGroupObj) SetParentNil(b bool)` - - SetParentNil sets the value for Parent to be an explicit nil - -### UnsetParent -`func (o *NotificationRuleGroupObj) UnsetParent()` - -UnsetParent ensures that no value is present for Parent, not even an explicit nil -### GetParentName - -`func (o *NotificationRuleGroupObj) GetParentName() string` - -GetParentName returns the ParentName field if non-nil, zero value otherwise. - -### GetParentNameOk - -`func (o *NotificationRuleGroupObj) GetParentNameOk() (*string, bool)` - -GetParentNameOk returns a tuple with the ParentName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetParentName - -`func (o *NotificationRuleGroupObj) SetParentName(v string)` - -SetParentName sets ParentName field to given value. - - -### GetUsers - -`func (o *NotificationRuleGroupObj) GetUsers() []int32` - -GetUsers returns the Users field if non-nil, zero value otherwise. - -### GetUsersOk - -`func (o *NotificationRuleGroupObj) GetUsersOk() (*[]int32, bool)` - -GetUsersOk returns a tuple with the Users field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUsers - -`func (o *NotificationRuleGroupObj) SetUsers(v []int32)` - -SetUsers sets Users field to given value. - -### HasUsers - -`func (o *NotificationRuleGroupObj) HasUsers() bool` - -HasUsers returns a boolean if a field has been set. - -### GetAttributes - -`func (o *NotificationRuleGroupObj) GetAttributes() map[string]interface{}` - -GetAttributes returns the Attributes field if non-nil, zero value otherwise. - -### GetAttributesOk - -`func (o *NotificationRuleGroupObj) GetAttributesOk() (*map[string]interface{}, bool)` - -GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAttributes - -`func (o *NotificationRuleGroupObj) SetAttributes(v map[string]interface{})` - -SetAttributes sets Attributes field to given value. - -### HasAttributes - -`func (o *NotificationRuleGroupObj) HasAttributes() bool` - -HasAttributes returns a boolean if a field has been set. - -### GetUsersObj - -`func (o *NotificationRuleGroupObj) GetUsersObj() []GroupMember` - -GetUsersObj returns the UsersObj field if non-nil, zero value otherwise. - -### GetUsersObjOk - -`func (o *NotificationRuleGroupObj) GetUsersObjOk() (*[]GroupMember, bool)` - -GetUsersObjOk returns a tuple with the UsersObj field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUsersObj - -`func (o *NotificationRuleGroupObj) SetUsersObj(v []GroupMember)` - -SetUsersObj sets UsersObj field to given value. - - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/NotificationRuleRequest.md b/docs/NotificationRuleRequest.md index 2300c6727..0bbbbcda5 100644 --- a/docs/NotificationRuleRequest.md +++ b/docs/NotificationRuleRequest.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Name** | **string** | | **Transports** | Pointer to **[]string** | Select which transports should be used to notify the user. If none are selected, the notification will only be shown in the authentik UI. | [optional] -**Severity** | Pointer to [**NullableSeverityEnum**](SeverityEnum.md) | Controls which severity level the created notifications will have. * `notice` - Notice * `warning` - Warning * `alert` - Alert | [optional] +**Severity** | Pointer to [**SeverityEnum**](SeverityEnum.md) | | [optional] **Group** | Pointer to **NullableString** | Define which group of users this notification should be sent and shown to. If left empty, Notification won't ben sent. | [optional] ## Methods @@ -98,16 +98,6 @@ SetSeverity sets Severity field to given value. HasSeverity returns a boolean if a field has been set. -### SetSeverityNil - -`func (o *NotificationRuleRequest) SetSeverityNil(b bool)` - - SetSeverityNil sets the value for Severity to be an explicit nil - -### UnsetSeverity -`func (o *NotificationRuleRequest) UnsetSeverity()` - -UnsetSeverity ensures that no value is present for Severity, not even an explicit nil ### GetGroup `func (o *NotificationRuleRequest) GetGroup() string` diff --git a/docs/OAuth2Provider.md b/docs/OAuth2Provider.md index 0aa40ee0b..fe83b6118 100644 --- a/docs/OAuth2Provider.md +++ b/docs/OAuth2Provider.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes **VerboseName** | **string** | Return object's verbose_name | [readonly] **VerboseNamePlural** | **string** | Return object's plural verbose_name | [readonly] **MetaModelName** | **string** | Return internal model name | [readonly] -**ClientType** | Pointer to [**NullableClientTypeEnum**](ClientTypeEnum.md) | Confidential clients are capable of maintaining the confidentiality of their credentials. Public clients are incapable * `confidential` - Confidential * `public` - Public | [optional] +**ClientType** | Pointer to [**ClientTypeEnum**](ClientTypeEnum.md) | | [optional] **ClientId** | Pointer to **string** | | [optional] **ClientSecret** | Pointer to **string** | | [optional] **AccessCodeValidity** | Pointer to **string** | Access codes not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). | [optional] @@ -24,8 +24,8 @@ Name | Type | Description | Notes **IncludeClaimsInIdToken** | Pointer to **bool** | Include User claims from scopes in the id_token, for applications that don't access the userinfo endpoint. | [optional] **SigningKey** | Pointer to **NullableString** | Key used to sign the tokens. Only required when JWT Algorithm is set to RS256. | [optional] **RedirectUris** | Pointer to **string** | Enter each URI on a new line. | [optional] -**SubMode** | Pointer to [**NullableSubModeEnum**](SubModeEnum.md) | Configure what data should be used as unique User Identifier. For most cases, the default should be fine. * `hashed_user_id` - Based on the Hashed User ID * `user_id` - Based on user ID * `user_username` - Based on the username * `user_email` - Based on the User's Email. This is recommended over the UPN method. * `user_upn` - Based on the User's UPN, only works if user has a 'upn' attribute set. Use this method only if you have different UPN and Mail domains. | [optional] -**IssuerMode** | Pointer to [**NullableIssuerModeEnum**](IssuerModeEnum.md) | Configure how the issuer field of the ID Token should be filled. * `global` - Same identifier is used for all providers * `per_provider` - Each provider has a different issuer, based on the application slug. | [optional] +**SubMode** | Pointer to [**SubModeEnum**](SubModeEnum.md) | | [optional] +**IssuerMode** | Pointer to [**IssuerModeEnum**](IssuerModeEnum.md) | | [optional] **JwksSources** | Pointer to **[]string** | | [optional] ## Methods @@ -312,16 +312,6 @@ SetClientType sets ClientType field to given value. HasClientType returns a boolean if a field has been set. -### SetClientTypeNil - -`func (o *OAuth2Provider) SetClientTypeNil(b bool)` - - SetClientTypeNil sets the value for ClientType to be an explicit nil - -### UnsetClientType -`func (o *OAuth2Provider) UnsetClientType()` - -UnsetClientType ensures that no value is present for ClientType, not even an explicit nil ### GetClientId `func (o *OAuth2Provider) GetClientId() string` @@ -557,16 +547,6 @@ SetSubMode sets SubMode field to given value. HasSubMode returns a boolean if a field has been set. -### SetSubModeNil - -`func (o *OAuth2Provider) SetSubModeNil(b bool)` - - SetSubModeNil sets the value for SubMode to be an explicit nil - -### UnsetSubMode -`func (o *OAuth2Provider) UnsetSubMode()` - -UnsetSubMode ensures that no value is present for SubMode, not even an explicit nil ### GetIssuerMode `func (o *OAuth2Provider) GetIssuerMode() IssuerModeEnum` @@ -592,16 +572,6 @@ SetIssuerMode sets IssuerMode field to given value. HasIssuerMode returns a boolean if a field has been set. -### SetIssuerModeNil - -`func (o *OAuth2Provider) SetIssuerModeNil(b bool)` - - SetIssuerModeNil sets the value for IssuerMode to be an explicit nil - -### UnsetIssuerMode -`func (o *OAuth2Provider) UnsetIssuerMode()` - -UnsetIssuerMode ensures that no value is present for IssuerMode, not even an explicit nil ### GetJwksSources `func (o *OAuth2Provider) GetJwksSources() []string` diff --git a/docs/OAuth2ProviderRequest.md b/docs/OAuth2ProviderRequest.md index c01f9bce5..0456be1af 100644 --- a/docs/OAuth2ProviderRequest.md +++ b/docs/OAuth2ProviderRequest.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **AuthenticationFlow** | Pointer to **NullableString** | Flow used for authentication when the associated application is accessed by an un-authenticated user. | [optional] **AuthorizationFlow** | **string** | Flow used when authorizing this provider. | **PropertyMappings** | Pointer to **[]string** | | [optional] -**ClientType** | Pointer to [**NullableClientTypeEnum**](ClientTypeEnum.md) | Confidential clients are capable of maintaining the confidentiality of their credentials. Public clients are incapable * `confidential` - Confidential * `public` - Public | [optional] +**ClientType** | Pointer to [**ClientTypeEnum**](ClientTypeEnum.md) | | [optional] **ClientId** | Pointer to **string** | | [optional] **ClientSecret** | Pointer to **string** | | [optional] **AccessCodeValidity** | Pointer to **string** | Access codes not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). | [optional] @@ -17,8 +17,8 @@ Name | Type | Description | Notes **IncludeClaimsInIdToken** | Pointer to **bool** | Include User claims from scopes in the id_token, for applications that don't access the userinfo endpoint. | [optional] **SigningKey** | Pointer to **NullableString** | Key used to sign the tokens. Only required when JWT Algorithm is set to RS256. | [optional] **RedirectUris** | Pointer to **string** | Enter each URI on a new line. | [optional] -**SubMode** | Pointer to [**NullableSubModeEnum**](SubModeEnum.md) | Configure what data should be used as unique User Identifier. For most cases, the default should be fine. * `hashed_user_id` - Based on the Hashed User ID * `user_id` - Based on user ID * `user_username` - Based on the username * `user_email` - Based on the User's Email. This is recommended over the UPN method. * `user_upn` - Based on the User's UPN, only works if user has a 'upn' attribute set. Use this method only if you have different UPN and Mail domains. | [optional] -**IssuerMode** | Pointer to [**NullableIssuerModeEnum**](IssuerModeEnum.md) | Configure how the issuer field of the ID Token should be filled. * `global` - Same identifier is used for all providers * `per_provider` - Each provider has a different issuer, based on the application slug. | [optional] +**SubMode** | Pointer to [**SubModeEnum**](SubModeEnum.md) | | [optional] +**IssuerMode** | Pointer to [**IssuerModeEnum**](IssuerModeEnum.md) | | [optional] **JwksSources** | Pointer to **[]string** | | [optional] ## Methods @@ -165,16 +165,6 @@ SetClientType sets ClientType field to given value. HasClientType returns a boolean if a field has been set. -### SetClientTypeNil - -`func (o *OAuth2ProviderRequest) SetClientTypeNil(b bool)` - - SetClientTypeNil sets the value for ClientType to be an explicit nil - -### UnsetClientType -`func (o *OAuth2ProviderRequest) UnsetClientType()` - -UnsetClientType ensures that no value is present for ClientType, not even an explicit nil ### GetClientId `func (o *OAuth2ProviderRequest) GetClientId() string` @@ -410,16 +400,6 @@ SetSubMode sets SubMode field to given value. HasSubMode returns a boolean if a field has been set. -### SetSubModeNil - -`func (o *OAuth2ProviderRequest) SetSubModeNil(b bool)` - - SetSubModeNil sets the value for SubMode to be an explicit nil - -### UnsetSubMode -`func (o *OAuth2ProviderRequest) UnsetSubMode()` - -UnsetSubMode ensures that no value is present for SubMode, not even an explicit nil ### GetIssuerMode `func (o *OAuth2ProviderRequest) GetIssuerMode() IssuerModeEnum` @@ -445,16 +425,6 @@ SetIssuerMode sets IssuerMode field to given value. HasIssuerMode returns a boolean if a field has been set. -### SetIssuerModeNil - -`func (o *OAuth2ProviderRequest) SetIssuerModeNil(b bool)` - - SetIssuerModeNil sets the value for IssuerMode to be an explicit nil - -### UnsetIssuerMode -`func (o *OAuth2ProviderRequest) UnsetIssuerMode()` - -UnsetIssuerMode ensures that no value is present for IssuerMode, not even an explicit nil ### GetJwksSources `func (o *OAuth2ProviderRequest) GetJwksSources() []string` diff --git a/docs/OAuthSource.md b/docs/OAuthSource.md index 078f72f19..ba380d08e 100644 --- a/docs/OAuthSource.md +++ b/docs/OAuthSource.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes **VerboseNamePlural** | **string** | Return object's plural verbose_name | [readonly] **MetaModelName** | **string** | Return internal model name | [readonly] **PolicyEngineMode** | Pointer to [**PolicyEngineMode**](PolicyEngineMode.md) | | [optional] -**UserMatchingMode** | Pointer to [**NullableUserMatchingModeEnum**](UserMatchingModeEnum.md) | How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. | [optional] +**UserMatchingMode** | Pointer to [**UserMatchingModeEnum**](UserMatchingModeEnum.md) | | [optional] **Managed** | **NullableString** | Objects which are managed by authentik. These objects are created and updated automatically. This is flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. | [readonly] **UserPathTemplate** | Pointer to **string** | | [optional] **Icon** | **NullableString** | Get the URL to the Icon. If the name is /static or starts with http it is returned as-is | [readonly] @@ -27,7 +27,7 @@ Name | Type | Description | Notes **ConsumerKey** | **string** | | **CallbackUrl** | **string** | Get OAuth Callback URL | [readonly] **AdditionalScopes** | Pointer to **string** | | [optional] -**Type** | [**OAuthSourceType**](OAuthSourceType.md) | | +**Type** | [**SourceType**](SourceType.md) | | [readonly] **OidcWellKnownUrl** | Pointer to **string** | | [optional] **OidcJwksUrl** | Pointer to **string** | | [optional] **OidcJwks** | Pointer to **map[string]interface{}** | | [optional] @@ -36,7 +36,7 @@ Name | Type | Description | Notes ### NewOAuthSource -`func NewOAuthSource(pk string, name string, slug string, component string, verboseName string, verboseNamePlural string, metaModelName string, managed NullableString, icon NullableString, providerType ProviderTypeEnum, consumerKey string, callbackUrl string, type_ OAuthSourceType, ) *OAuthSource` +`func NewOAuthSource(pk string, name string, slug string, component string, verboseName string, verboseNamePlural string, metaModelName string, managed NullableString, icon NullableString, providerType ProviderTypeEnum, consumerKey string, callbackUrl string, type_ SourceType, ) *OAuthSource` NewOAuthSource instantiates a new OAuthSource object This constructor will assign default values to properties that have it defined, @@ -336,16 +336,6 @@ SetUserMatchingMode sets UserMatchingMode field to given value. HasUserMatchingMode returns a boolean if a field has been set. -### SetUserMatchingModeNil - -`func (o *OAuthSource) SetUserMatchingModeNil(b bool)` - - SetUserMatchingModeNil sets the value for UserMatchingMode to be an explicit nil - -### UnsetUserMatchingMode -`func (o *OAuthSource) UnsetUserMatchingMode()` - -UnsetUserMatchingMode ensures that no value is present for UserMatchingMode, not even an explicit nil ### GetManaged `func (o *OAuthSource) GetManaged() string` @@ -658,20 +648,20 @@ HasAdditionalScopes returns a boolean if a field has been set. ### GetType -`func (o *OAuthSource) GetType() OAuthSourceType` +`func (o *OAuthSource) GetType() SourceType` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk -`func (o *OAuthSource) GetTypeOk() (*OAuthSourceType, bool)` +`func (o *OAuthSource) GetTypeOk() (*SourceType, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType -`func (o *OAuthSource) SetType(v OAuthSourceType)` +`func (o *OAuthSource) SetType(v SourceType)` SetType sets Type field to given value. diff --git a/docs/OAuthSourceRequest.md b/docs/OAuthSourceRequest.md index 1c4f3ff37..1931e9d11 100644 --- a/docs/OAuthSourceRequest.md +++ b/docs/OAuthSourceRequest.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **AuthenticationFlow** | Pointer to **NullableString** | Flow to use when authenticating existing users. | [optional] **EnrollmentFlow** | Pointer to **NullableString** | Flow to use when enrolling new users. | [optional] **PolicyEngineMode** | Pointer to [**PolicyEngineMode**](PolicyEngineMode.md) | | [optional] -**UserMatchingMode** | Pointer to [**NullableUserMatchingModeEnum**](UserMatchingModeEnum.md) | How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. | [optional] +**UserMatchingMode** | Pointer to [**UserMatchingModeEnum**](UserMatchingModeEnum.md) | | [optional] **UserPathTemplate** | Pointer to **string** | | [optional] **ProviderType** | [**ProviderTypeEnum**](ProviderTypeEnum.md) | | **RequestTokenUrl** | Pointer to **NullableString** | URL used to request the initial token. This URL is only required for OAuth 1. | [optional] @@ -228,16 +228,6 @@ SetUserMatchingMode sets UserMatchingMode field to given value. HasUserMatchingMode returns a boolean if a field has been set. -### SetUserMatchingModeNil - -`func (o *OAuthSourceRequest) SetUserMatchingModeNil(b bool)` - - SetUserMatchingModeNil sets the value for UserMatchingMode to be an explicit nil - -### UnsetUserMatchingMode -`func (o *OAuthSourceRequest) UnsetUserMatchingMode()` - -UnsetUserMatchingMode ensures that no value is present for UserMatchingMode, not even an explicit nil ### GetUserPathTemplate `func (o *OAuthSourceRequest) GetUserPathTemplate() string` diff --git a/docs/OAuthSourceType.md b/docs/OAuthSourceType.md deleted file mode 100644 index ddce63b0e..000000000 --- a/docs/OAuthSourceType.md +++ /dev/null @@ -1,217 +0,0 @@ -# OAuthSourceType - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | -**Slug** | **string** | | -**UrlsCustomizable** | **bool** | | -**RequestTokenUrl** | **NullableString** | | [readonly] -**AuthorizationUrl** | **NullableString** | | [readonly] -**AccessTokenUrl** | **NullableString** | | [readonly] -**ProfileUrl** | **NullableString** | | [readonly] - -## Methods - -### NewOAuthSourceType - -`func NewOAuthSourceType(name string, slug string, urlsCustomizable bool, requestTokenUrl NullableString, authorizationUrl NullableString, accessTokenUrl NullableString, profileUrl NullableString, ) *OAuthSourceType` - -NewOAuthSourceType instantiates a new OAuthSourceType object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewOAuthSourceTypeWithDefaults - -`func NewOAuthSourceTypeWithDefaults() *OAuthSourceType` - -NewOAuthSourceTypeWithDefaults instantiates a new OAuthSourceType object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetName - -`func (o *OAuthSourceType) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *OAuthSourceType) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *OAuthSourceType) SetName(v string)` - -SetName sets Name field to given value. - - -### GetSlug - -`func (o *OAuthSourceType) GetSlug() string` - -GetSlug returns the Slug field if non-nil, zero value otherwise. - -### GetSlugOk - -`func (o *OAuthSourceType) GetSlugOk() (*string, bool)` - -GetSlugOk returns a tuple with the Slug field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSlug - -`func (o *OAuthSourceType) SetSlug(v string)` - -SetSlug sets Slug field to given value. - - -### GetUrlsCustomizable - -`func (o *OAuthSourceType) GetUrlsCustomizable() bool` - -GetUrlsCustomizable returns the UrlsCustomizable field if non-nil, zero value otherwise. - -### GetUrlsCustomizableOk - -`func (o *OAuthSourceType) GetUrlsCustomizableOk() (*bool, bool)` - -GetUrlsCustomizableOk returns a tuple with the UrlsCustomizable field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUrlsCustomizable - -`func (o *OAuthSourceType) SetUrlsCustomizable(v bool)` - -SetUrlsCustomizable sets UrlsCustomizable field to given value. - - -### GetRequestTokenUrl - -`func (o *OAuthSourceType) GetRequestTokenUrl() string` - -GetRequestTokenUrl returns the RequestTokenUrl field if non-nil, zero value otherwise. - -### GetRequestTokenUrlOk - -`func (o *OAuthSourceType) GetRequestTokenUrlOk() (*string, bool)` - -GetRequestTokenUrlOk returns a tuple with the RequestTokenUrl field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRequestTokenUrl - -`func (o *OAuthSourceType) SetRequestTokenUrl(v string)` - -SetRequestTokenUrl sets RequestTokenUrl field to given value. - - -### SetRequestTokenUrlNil - -`func (o *OAuthSourceType) SetRequestTokenUrlNil(b bool)` - - SetRequestTokenUrlNil sets the value for RequestTokenUrl to be an explicit nil - -### UnsetRequestTokenUrl -`func (o *OAuthSourceType) UnsetRequestTokenUrl()` - -UnsetRequestTokenUrl ensures that no value is present for RequestTokenUrl, not even an explicit nil -### GetAuthorizationUrl - -`func (o *OAuthSourceType) GetAuthorizationUrl() string` - -GetAuthorizationUrl returns the AuthorizationUrl field if non-nil, zero value otherwise. - -### GetAuthorizationUrlOk - -`func (o *OAuthSourceType) GetAuthorizationUrlOk() (*string, bool)` - -GetAuthorizationUrlOk returns a tuple with the AuthorizationUrl field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAuthorizationUrl - -`func (o *OAuthSourceType) SetAuthorizationUrl(v string)` - -SetAuthorizationUrl sets AuthorizationUrl field to given value. - - -### SetAuthorizationUrlNil - -`func (o *OAuthSourceType) SetAuthorizationUrlNil(b bool)` - - SetAuthorizationUrlNil sets the value for AuthorizationUrl to be an explicit nil - -### UnsetAuthorizationUrl -`func (o *OAuthSourceType) UnsetAuthorizationUrl()` - -UnsetAuthorizationUrl ensures that no value is present for AuthorizationUrl, not even an explicit nil -### GetAccessTokenUrl - -`func (o *OAuthSourceType) GetAccessTokenUrl() string` - -GetAccessTokenUrl returns the AccessTokenUrl field if non-nil, zero value otherwise. - -### GetAccessTokenUrlOk - -`func (o *OAuthSourceType) GetAccessTokenUrlOk() (*string, bool)` - -GetAccessTokenUrlOk returns a tuple with the AccessTokenUrl field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAccessTokenUrl - -`func (o *OAuthSourceType) SetAccessTokenUrl(v string)` - -SetAccessTokenUrl sets AccessTokenUrl field to given value. - - -### SetAccessTokenUrlNil - -`func (o *OAuthSourceType) SetAccessTokenUrlNil(b bool)` - - SetAccessTokenUrlNil sets the value for AccessTokenUrl to be an explicit nil - -### UnsetAccessTokenUrl -`func (o *OAuthSourceType) UnsetAccessTokenUrl()` - -UnsetAccessTokenUrl ensures that no value is present for AccessTokenUrl, not even an explicit nil -### GetProfileUrl - -`func (o *OAuthSourceType) GetProfileUrl() string` - -GetProfileUrl returns the ProfileUrl field if non-nil, zero value otherwise. - -### GetProfileUrlOk - -`func (o *OAuthSourceType) GetProfileUrlOk() (*string, bool)` - -GetProfileUrlOk returns a tuple with the ProfileUrl field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetProfileUrl - -`func (o *OAuthSourceType) SetProfileUrl(v string)` - -SetProfileUrl sets ProfileUrl field to given value. - - -### SetProfileUrlNil - -`func (o *OAuthSourceType) SetProfileUrlNil(b bool)` - - SetProfileUrlNil sets the value for ProfileUrl to be an explicit nil - -### UnsetProfileUrl -`func (o *OAuthSourceType) UnsetProfileUrl()` - -UnsetProfileUrl ensures that no value is present for ProfileUrl, not even an explicit nil - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Oauth2Api.md b/docs/Oauth2Api.md index 72b4fd9b0..e66a4b943 100644 --- a/docs/Oauth2Api.md +++ b/docs/Oauth2Api.md @@ -36,7 +36,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -44,7 +44,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.Oauth2Api.Oauth2AccessTokensDestroy(context.Background(), id).Execute() + r, err := apiClient.Oauth2Api.Oauth2AccessTokensDestroy(context.Background(), id).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `Oauth2Api.Oauth2AccessTokensDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -104,7 +104,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -180,7 +180,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -250,7 +250,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -320,7 +320,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -328,7 +328,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.Oauth2Api.Oauth2AuthorizationCodesDestroy(context.Background(), id).Execute() + r, err := apiClient.Oauth2Api.Oauth2AuthorizationCodesDestroy(context.Background(), id).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `Oauth2Api.Oauth2AuthorizationCodesDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -388,7 +388,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -464,7 +464,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -534,7 +534,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -604,7 +604,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -612,7 +612,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.Oauth2Api.Oauth2RefreshTokensDestroy(context.Background(), id).Execute() + r, err := apiClient.Oauth2Api.Oauth2RefreshTokensDestroy(context.Background(), id).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `Oauth2Api.Oauth2RefreshTokensDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -672,7 +672,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -748,7 +748,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -818,7 +818,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { diff --git a/docs/Outpost.md b/docs/Outpost.md index e20a84d04..3985c9688 100644 --- a/docs/Outpost.md +++ b/docs/Outpost.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **Providers** | **[]int32** | | **ProvidersObj** | [**[]Provider**](Provider.md) | | [readonly] **ServiceConnection** | Pointer to **NullableString** | Select Service-Connection authentik should use to manage this outpost. Leave empty if authentik should not handle the deployment. | [optional] -**ServiceConnectionObj** | [**OutpostServiceConnectionObj**](OutpostServiceConnectionObj.md) | | +**ServiceConnectionObj** | [**ServiceConnection**](ServiceConnection.md) | | [readonly] **TokenIdentifier** | **string** | Get Token identifier | [readonly] **Config** | **map[string]interface{}** | | **Managed** | Pointer to **NullableString** | Objects which are managed by authentik. These objects are created and updated automatically. This is flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. | [optional] @@ -19,7 +19,7 @@ Name | Type | Description | Notes ### NewOutpost -`func NewOutpost(pk string, name string, type_ OutpostTypeEnum, providers []int32, providersObj []Provider, serviceConnectionObj OutpostServiceConnectionObj, tokenIdentifier string, config map[string]interface{}, ) *Outpost` +`func NewOutpost(pk string, name string, type_ OutpostTypeEnum, providers []int32, providersObj []Provider, serviceConnectionObj ServiceConnection, tokenIdentifier string, config map[string]interface{}, ) *Outpost` NewOutpost instantiates a new Outpost object This constructor will assign default values to properties that have it defined, @@ -171,20 +171,20 @@ HasServiceConnection returns a boolean if a field has been set. UnsetServiceConnection ensures that no value is present for ServiceConnection, not even an explicit nil ### GetServiceConnectionObj -`func (o *Outpost) GetServiceConnectionObj() OutpostServiceConnectionObj` +`func (o *Outpost) GetServiceConnectionObj() ServiceConnection` GetServiceConnectionObj returns the ServiceConnectionObj field if non-nil, zero value otherwise. ### GetServiceConnectionObjOk -`func (o *Outpost) GetServiceConnectionObjOk() (*OutpostServiceConnectionObj, bool)` +`func (o *Outpost) GetServiceConnectionObjOk() (*ServiceConnection, bool)` GetServiceConnectionObjOk returns a tuple with the ServiceConnectionObj field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetServiceConnectionObj -`func (o *Outpost) SetServiceConnectionObj(v OutpostServiceConnectionObj)` +`func (o *Outpost) SetServiceConnectionObj(v ServiceConnection)` SetServiceConnectionObj sets ServiceConnectionObj field to given value. diff --git a/docs/OutpostServiceConnectionObj.md b/docs/OutpostServiceConnectionObj.md deleted file mode 100644 index 7183a2abc..000000000 --- a/docs/OutpostServiceConnectionObj.md +++ /dev/null @@ -1,182 +0,0 @@ -# OutpostServiceConnectionObj - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Pk** | **string** | | [readonly] -**Name** | **string** | | -**Local** | Pointer to **bool** | If enabled, use the local connection. Required Docker socket/Kubernetes Integration | [optional] -**Component** | **string** | Return component used to edit this object | [readonly] -**VerboseName** | **string** | Return object's verbose_name | [readonly] -**VerboseNamePlural** | **string** | Return object's plural verbose_name | [readonly] -**MetaModelName** | **string** | Return internal model name | [readonly] - -## Methods - -### NewOutpostServiceConnectionObj - -`func NewOutpostServiceConnectionObj(pk string, name string, component string, verboseName string, verboseNamePlural string, metaModelName string, ) *OutpostServiceConnectionObj` - -NewOutpostServiceConnectionObj instantiates a new OutpostServiceConnectionObj object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewOutpostServiceConnectionObjWithDefaults - -`func NewOutpostServiceConnectionObjWithDefaults() *OutpostServiceConnectionObj` - -NewOutpostServiceConnectionObjWithDefaults instantiates a new OutpostServiceConnectionObj object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetPk - -`func (o *OutpostServiceConnectionObj) GetPk() string` - -GetPk returns the Pk field if non-nil, zero value otherwise. - -### GetPkOk - -`func (o *OutpostServiceConnectionObj) GetPkOk() (*string, bool)` - -GetPkOk returns a tuple with the Pk field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPk - -`func (o *OutpostServiceConnectionObj) SetPk(v string)` - -SetPk sets Pk field to given value. - - -### GetName - -`func (o *OutpostServiceConnectionObj) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *OutpostServiceConnectionObj) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *OutpostServiceConnectionObj) SetName(v string)` - -SetName sets Name field to given value. - - -### GetLocal - -`func (o *OutpostServiceConnectionObj) GetLocal() bool` - -GetLocal returns the Local field if non-nil, zero value otherwise. - -### GetLocalOk - -`func (o *OutpostServiceConnectionObj) GetLocalOk() (*bool, bool)` - -GetLocalOk returns a tuple with the Local field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLocal - -`func (o *OutpostServiceConnectionObj) SetLocal(v bool)` - -SetLocal sets Local field to given value. - -### HasLocal - -`func (o *OutpostServiceConnectionObj) HasLocal() bool` - -HasLocal returns a boolean if a field has been set. - -### GetComponent - -`func (o *OutpostServiceConnectionObj) GetComponent() string` - -GetComponent returns the Component field if non-nil, zero value otherwise. - -### GetComponentOk - -`func (o *OutpostServiceConnectionObj) GetComponentOk() (*string, bool)` - -GetComponentOk returns a tuple with the Component field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetComponent - -`func (o *OutpostServiceConnectionObj) SetComponent(v string)` - -SetComponent sets Component field to given value. - - -### GetVerboseName - -`func (o *OutpostServiceConnectionObj) GetVerboseName() string` - -GetVerboseName returns the VerboseName field if non-nil, zero value otherwise. - -### GetVerboseNameOk - -`func (o *OutpostServiceConnectionObj) GetVerboseNameOk() (*string, bool)` - -GetVerboseNameOk returns a tuple with the VerboseName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetVerboseName - -`func (o *OutpostServiceConnectionObj) SetVerboseName(v string)` - -SetVerboseName sets VerboseName field to given value. - - -### GetVerboseNamePlural - -`func (o *OutpostServiceConnectionObj) GetVerboseNamePlural() string` - -GetVerboseNamePlural returns the VerboseNamePlural field if non-nil, zero value otherwise. - -### GetVerboseNamePluralOk - -`func (o *OutpostServiceConnectionObj) GetVerboseNamePluralOk() (*string, bool)` - -GetVerboseNamePluralOk returns a tuple with the VerboseNamePlural field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetVerboseNamePlural - -`func (o *OutpostServiceConnectionObj) SetVerboseNamePlural(v string)` - -SetVerboseNamePlural sets VerboseNamePlural field to given value. - - -### GetMetaModelName - -`func (o *OutpostServiceConnectionObj) GetMetaModelName() string` - -GetMetaModelName returns the MetaModelName field if non-nil, zero value otherwise. - -### GetMetaModelNameOk - -`func (o *OutpostServiceConnectionObj) GetMetaModelNameOk() (*string, bool)` - -GetMetaModelNameOk returns a tuple with the MetaModelName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMetaModelName - -`func (o *OutpostServiceConnectionObj) SetMetaModelName(v string)` - -SetMetaModelName sets MetaModelName field to given value. - - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OutpostsApi.md b/docs/OutpostsApi.md index 5bfc9b175..f0d11d6dc 100644 --- a/docs/OutpostsApi.md +++ b/docs/OutpostsApi.md @@ -59,7 +59,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -125,7 +125,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -186,7 +186,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -194,7 +194,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OutpostsApi.OutpostsInstancesDestroy(context.Background(), uuid).Execute() + r, err := apiClient.OutpostsApi.OutpostsInstancesDestroy(context.Background(), uuid).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `OutpostsApi.OutpostsInstancesDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -254,7 +254,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -344,7 +344,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -432,7 +432,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -504,7 +504,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -574,7 +574,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -646,7 +646,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -716,7 +716,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -790,7 +790,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -860,7 +860,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -934,7 +934,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1004,7 +1004,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1078,7 +1078,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1148,7 +1148,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1156,7 +1156,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OutpostsApi.OutpostsServiceConnectionsAllDestroy(context.Background(), uuid).Execute() + r, err := apiClient.OutpostsApi.OutpostsServiceConnectionsAllDestroy(context.Background(), uuid).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `OutpostsApi.OutpostsServiceConnectionsAllDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -1216,7 +1216,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1290,7 +1290,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1360,7 +1360,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1430,7 +1430,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1491,7 +1491,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1561,7 +1561,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1627,7 +1627,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1635,7 +1635,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OutpostsApi.OutpostsServiceConnectionsDockerDestroy(context.Background(), uuid).Execute() + r, err := apiClient.OutpostsApi.OutpostsServiceConnectionsDockerDestroy(context.Background(), uuid).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `OutpostsApi.OutpostsServiceConnectionsDockerDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -1695,7 +1695,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1777,7 +1777,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1849,7 +1849,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1919,7 +1919,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1991,7 +1991,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2061,7 +2061,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2127,7 +2127,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2135,7 +2135,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OutpostsApi.OutpostsServiceConnectionsKubernetesDestroy(context.Background(), uuid).Execute() + r, err := apiClient.OutpostsApi.OutpostsServiceConnectionsKubernetesDestroy(context.Background(), uuid).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `OutpostsApi.OutpostsServiceConnectionsKubernetesDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -2195,7 +2195,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2271,7 +2271,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2343,7 +2343,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2413,7 +2413,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2485,7 +2485,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { diff --git a/docs/PatchedAuthenticatorTOTPStageRequest.md b/docs/PatchedAuthenticatorTOTPStageRequest.md index 942e67779..8afb430d2 100644 --- a/docs/PatchedAuthenticatorTOTPStageRequest.md +++ b/docs/PatchedAuthenticatorTOTPStageRequest.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **Name** | Pointer to **string** | | [optional] **FlowSet** | Pointer to [**[]FlowSetRequest**](FlowSetRequest.md) | | [optional] **ConfigureFlow** | Pointer to **NullableString** | Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. | [optional] -**Digits** | Pointer to [**NullableDigitsEnum**](DigitsEnum.md) | | [optional] +**Digits** | Pointer to [**DigitsEnum**](DigitsEnum.md) | | [optional] ## Methods @@ -138,16 +138,6 @@ SetDigits sets Digits field to given value. HasDigits returns a boolean if a field has been set. -### SetDigitsNil - -`func (o *PatchedAuthenticatorTOTPStageRequest) SetDigitsNil(b bool)` - - SetDigitsNil sets the value for Digits to be an explicit nil - -### UnsetDigits -`func (o *PatchedAuthenticatorTOTPStageRequest) UnsetDigits()` - -UnsetDigits ensures that no value is present for Digits, not even an explicit nil [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PatchedAuthenticatorValidateStageRequest.md b/docs/PatchedAuthenticatorValidateStageRequest.md index fd9b3727a..086aaa978 100644 --- a/docs/PatchedAuthenticatorValidateStageRequest.md +++ b/docs/PatchedAuthenticatorValidateStageRequest.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **DeviceClasses** | Pointer to [**[]DeviceClassesEnum**](DeviceClassesEnum.md) | Device classes which can be used to authenticate | [optional] **ConfigurationStages** | Pointer to **[]string** | Stages used to configure Authenticator when user doesn't have any compatible devices. After this configuration Stage passes, the user is not prompted again. | [optional] **LastAuthThreshold** | Pointer to **string** | If any of the user's device has been used within this threshold, this stage will be skipped | [optional] -**WebauthnUserVerification** | Pointer to [**NullableUserVerificationEnum**](UserVerificationEnum.md) | Enforce user verification for WebAuthn devices. * `required` - Required * `preferred` - Preferred * `discouraged` - Discouraged | [optional] +**WebauthnUserVerification** | Pointer to [**UserVerificationEnum**](UserVerificationEnum.md) | | [optional] ## Methods @@ -206,16 +206,6 @@ SetWebauthnUserVerification sets WebauthnUserVerification field to given value. HasWebauthnUserVerification returns a boolean if a field has been set. -### SetWebauthnUserVerificationNil - -`func (o *PatchedAuthenticatorValidateStageRequest) SetWebauthnUserVerificationNil(b bool)` - - SetWebauthnUserVerificationNil sets the value for WebauthnUserVerification to be an explicit nil - -### UnsetWebauthnUserVerification -`func (o *PatchedAuthenticatorValidateStageRequest) UnsetWebauthnUserVerification()` - -UnsetWebauthnUserVerification ensures that no value is present for WebauthnUserVerification, not even an explicit nil [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PatchedEventMatcherPolicyRequest.md b/docs/PatchedEventMatcherPolicyRequest.md index fae1ec642..7839df0a3 100644 --- a/docs/PatchedEventMatcherPolicyRequest.md +++ b/docs/PatchedEventMatcherPolicyRequest.md @@ -6,9 +6,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Name** | Pointer to **string** | | [optional] **ExecutionLogging** | Pointer to **bool** | When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. | [optional] -**Action** | Pointer to [**NullableEventActions**](EventActions.md) | Match created events with this action type. When left empty, all action types will be matched. * `login` - Login * `login_failed` - Login Failed * `logout` - Logout * `user_write` - User Write * `suspicious_request` - Suspicious Request * `password_set` - Password Set * `secret_view` - Secret View * `secret_rotate` - Secret Rotate * `invitation_used` - Invite Used * `authorize_application` - Authorize Application * `source_linked` - Source Linked * `impersonation_started` - Impersonation Started * `impersonation_ended` - Impersonation Ended * `flow_execution` - Flow Execution * `policy_execution` - Policy Execution * `policy_exception` - Policy Exception * `property_mapping_exception` - Property Mapping Exception * `system_task_execution` - System Task Execution * `system_task_exception` - System Task Exception * `system_exception` - System Exception * `configuration_error` - Configuration Error * `model_created` - Model Created * `model_updated` - Model Updated * `model_deleted` - Model Deleted * `email_sent` - Email Sent * `update_available` - Update Available * `custom_` - Custom Prefix | [optional] +**Action** | Pointer to [**EventActions**](EventActions.md) | | [optional] **ClientIp** | Pointer to **string** | Matches Event's Client IP (strict matching, for network matching use an Expression Policy) | [optional] -**App** | Pointer to [**NullableAppEnum**](AppEnum.md) | Match events created by selected application. When left empty, all applications are matched. * `authentik.admin` - authentik Admin * `authentik.api` - authentik API * `authentik.crypto` - authentik Crypto * `authentik.events` - authentik Events * `authentik.flows` - authentik Flows * `authentik.lib` - authentik lib * `authentik.outposts` - authentik Outpost * `authentik.policies.dummy` - authentik Policies.Dummy * `authentik.policies.event_matcher` - authentik Policies.Event Matcher * `authentik.policies.expiry` - authentik Policies.Expiry * `authentik.policies.expression` - authentik Policies.Expression * `authentik.policies.password` - authentik Policies.Password * `authentik.policies.reputation` - authentik Policies.Reputation * `authentik.policies` - authentik Policies * `authentik.providers.ldap` - authentik Providers.LDAP * `authentik.providers.oauth2` - authentik Providers.OAuth2 * `authentik.providers.proxy` - authentik Providers.Proxy * `authentik.providers.radius` - authentik Providers.Radius * `authentik.providers.saml` - authentik Providers.SAML * `authentik.providers.scim` - authentik Providers.SCIM * `authentik.recovery` - authentik Recovery * `authentik.sources.ldap` - authentik Sources.LDAP * `authentik.sources.oauth` - authentik Sources.OAuth * `authentik.sources.plex` - authentik Sources.Plex * `authentik.sources.saml` - authentik Sources.SAML * `authentik.stages.authenticator_duo` - authentik Stages.Authenticator.Duo * `authentik.stages.authenticator_sms` - authentik Stages.Authenticator.SMS * `authentik.stages.authenticator_static` - authentik Stages.Authenticator.Static * `authentik.stages.authenticator_totp` - authentik Stages.Authenticator.TOTP * `authentik.stages.authenticator_validate` - authentik Stages.Authenticator.Validate * `authentik.stages.authenticator_webauthn` - authentik Stages.Authenticator.WebAuthn * `authentik.stages.captcha` - authentik Stages.Captcha * `authentik.stages.consent` - authentik Stages.Consent * `authentik.stages.deny` - authentik Stages.Deny * `authentik.stages.dummy` - authentik Stages.Dummy * `authentik.stages.email` - authentik Stages.Email * `authentik.stages.identification` - authentik Stages.Identification * `authentik.stages.invitation` - authentik Stages.User Invitation * `authentik.stages.password` - authentik Stages.Password * `authentik.stages.prompt` - authentik Stages.Prompt * `authentik.stages.user_delete` - authentik Stages.User Delete * `authentik.stages.user_login` - authentik Stages.User Login * `authentik.stages.user_logout` - authentik Stages.User Logout * `authentik.stages.user_write` - authentik Stages.User Write * `authentik.tenants` - authentik Tenants * `authentik.blueprints` - authentik Blueprints * `authentik.core` - authentik Core | [optional] +**App** | Pointer to [**AppEnum**](AppEnum.md) | | [optional] ## Methods @@ -104,16 +104,6 @@ SetAction sets Action field to given value. HasAction returns a boolean if a field has been set. -### SetActionNil - -`func (o *PatchedEventMatcherPolicyRequest) SetActionNil(b bool)` - - SetActionNil sets the value for Action to be an explicit nil - -### UnsetAction -`func (o *PatchedEventMatcherPolicyRequest) UnsetAction()` - -UnsetAction ensures that no value is present for Action, not even an explicit nil ### GetClientIp `func (o *PatchedEventMatcherPolicyRequest) GetClientIp() string` @@ -164,16 +154,6 @@ SetApp sets App field to given value. HasApp returns a boolean if a field has been set. -### SetAppNil - -`func (o *PatchedEventMatcherPolicyRequest) SetAppNil(b bool)` - - SetAppNil sets the value for App to be an explicit nil - -### UnsetApp -`func (o *PatchedEventMatcherPolicyRequest) UnsetApp()` - -UnsetApp ensures that no value is present for App, not even an explicit nil [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PatchedFlowRequest.md b/docs/PatchedFlowRequest.md index 761a97b13..f5d884792 100644 --- a/docs/PatchedFlowRequest.md +++ b/docs/PatchedFlowRequest.md @@ -7,12 +7,12 @@ Name | Type | Description | Notes **Name** | Pointer to **string** | | [optional] **Slug** | Pointer to **string** | Visible in the URL. | [optional] **Title** | Pointer to **string** | Shown as the Title in Flow pages. | [optional] -**Designation** | Pointer to [**NullableFlowDesignationEnum**](FlowDesignationEnum.md) | Decides what this Flow is used for. For example, the Authentication flow is redirect to when an un-authenticated user visits authentik. * `authentication` - Authentication * `authorization` - Authorization * `invalidation` - Invalidation * `enrollment` - Enrollment * `unenrollment` - Unrenollment * `recovery` - Recovery * `stage_configuration` - Stage Configuration | [optional] +**Designation** | Pointer to [**FlowDesignationEnum**](FlowDesignationEnum.md) | | [optional] **PolicyEngineMode** | Pointer to [**PolicyEngineMode**](PolicyEngineMode.md) | | [optional] **CompatibilityMode** | Pointer to **bool** | Enable compatibility mode, increases compatibility with password managers on mobile devices. | [optional] **Layout** | Pointer to [**LayoutEnum**](LayoutEnum.md) | | [optional] -**DeniedAction** | Pointer to [**NullableDeniedActionEnum**](DeniedActionEnum.md) | Configure what should happen when a flow denies access to a user. * `message_continue` - Message Continue * `message` - Message * `continue` - Continue | [optional] -**Authentication** | Pointer to [**NullableAuthenticationEnum**](AuthenticationEnum.md) | Required level of authentication and authorization to access a flow. * `none` - None * `require_authenticated` - Require Authenticated * `require_unauthenticated` - Require Unauthenticated * `require_superuser` - Require Superuser | [optional] +**DeniedAction** | Pointer to [**DeniedActionEnum**](DeniedActionEnum.md) | | [optional] +**Authentication** | Pointer to [**AuthenticationEnum**](AuthenticationEnum.md) | | [optional] ## Methods @@ -133,16 +133,6 @@ SetDesignation sets Designation field to given value. HasDesignation returns a boolean if a field has been set. -### SetDesignationNil - -`func (o *PatchedFlowRequest) SetDesignationNil(b bool)` - - SetDesignationNil sets the value for Designation to be an explicit nil - -### UnsetDesignation -`func (o *PatchedFlowRequest) UnsetDesignation()` - -UnsetDesignation ensures that no value is present for Designation, not even an explicit nil ### GetPolicyEngineMode `func (o *PatchedFlowRequest) GetPolicyEngineMode() PolicyEngineMode` @@ -243,16 +233,6 @@ SetDeniedAction sets DeniedAction field to given value. HasDeniedAction returns a boolean if a field has been set. -### SetDeniedActionNil - -`func (o *PatchedFlowRequest) SetDeniedActionNil(b bool)` - - SetDeniedActionNil sets the value for DeniedAction to be an explicit nil - -### UnsetDeniedAction -`func (o *PatchedFlowRequest) UnsetDeniedAction()` - -UnsetDeniedAction ensures that no value is present for DeniedAction, not even an explicit nil ### GetAuthentication `func (o *PatchedFlowRequest) GetAuthentication() AuthenticationEnum` @@ -278,16 +258,6 @@ SetAuthentication sets Authentication field to given value. HasAuthentication returns a boolean if a field has been set. -### SetAuthenticationNil - -`func (o *PatchedFlowRequest) SetAuthenticationNil(b bool)` - - SetAuthenticationNil sets the value for Authentication to be an explicit nil - -### UnsetAuthentication -`func (o *PatchedFlowRequest) UnsetAuthentication()` - -UnsetAuthentication ensures that no value is present for Authentication, not even an explicit nil [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PatchedFlowStageBindingRequest.md b/docs/PatchedFlowStageBindingRequest.md index 33b84abd8..f913178e8 100644 --- a/docs/PatchedFlowStageBindingRequest.md +++ b/docs/PatchedFlowStageBindingRequest.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **ReEvaluatePolicies** | Pointer to **bool** | Evaluate policies when the Stage is present to the user. | [optional] **Order** | Pointer to **int32** | | [optional] **PolicyEngineMode** | Pointer to [**PolicyEngineMode**](PolicyEngineMode.md) | | [optional] -**InvalidResponseAction** | Pointer to [**NullableInvalidResponseActionEnum**](InvalidResponseActionEnum.md) | Configure how the flow executor should handle an invalid response to a challenge. RETRY returns the error message and a similar challenge to the executor. RESTART restarts the flow from the beginning, and RESTART_WITH_CONTEXT restarts the flow while keeping the current context. * `retry` - Retry * `restart` - Restart * `restart_with_context` - Restart With Context | [optional] +**InvalidResponseAction** | Pointer to [**InvalidResponseActionEnum**](InvalidResponseActionEnum.md) | | [optional] ## Methods @@ -206,16 +206,6 @@ SetInvalidResponseAction sets InvalidResponseAction field to given value. HasInvalidResponseAction returns a boolean if a field has been set. -### SetInvalidResponseActionNil - -`func (o *PatchedFlowStageBindingRequest) SetInvalidResponseActionNil(b bool)` - - SetInvalidResponseActionNil sets the value for InvalidResponseAction to be an explicit nil - -### UnsetInvalidResponseAction -`func (o *PatchedFlowStageBindingRequest) UnsetInvalidResponseAction()` - -UnsetInvalidResponseAction ensures that no value is present for InvalidResponseAction, not even an explicit nil [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PatchedLDAPSourceRequest.md b/docs/PatchedLDAPSourceRequest.md index 0ec14dc90..6f73c1eb2 100644 --- a/docs/PatchedLDAPSourceRequest.md +++ b/docs/PatchedLDAPSourceRequest.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **AuthenticationFlow** | Pointer to **NullableString** | Flow to use when authenticating existing users. | [optional] **EnrollmentFlow** | Pointer to **NullableString** | Flow to use when enrolling new users. | [optional] **PolicyEngineMode** | Pointer to [**PolicyEngineMode**](PolicyEngineMode.md) | | [optional] -**UserMatchingMode** | Pointer to [**NullableUserMatchingModeEnum**](UserMatchingModeEnum.md) | How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. | [optional] +**UserMatchingMode** | Pointer to [**UserMatchingModeEnum**](UserMatchingModeEnum.md) | | [optional] **UserPathTemplate** | Pointer to **string** | | [optional] **ServerUri** | Pointer to **string** | | [optional] **PeerCertificate** | Pointer to **NullableString** | Optionally verify the LDAP Server's Certificate against the CA Chain in this keypair. | [optional] @@ -245,16 +245,6 @@ SetUserMatchingMode sets UserMatchingMode field to given value. HasUserMatchingMode returns a boolean if a field has been set. -### SetUserMatchingModeNil - -`func (o *PatchedLDAPSourceRequest) SetUserMatchingModeNil(b bool)` - - SetUserMatchingModeNil sets the value for UserMatchingMode to be an explicit nil - -### UnsetUserMatchingMode -`func (o *PatchedLDAPSourceRequest) UnsetUserMatchingMode()` - -UnsetUserMatchingMode ensures that no value is present for UserMatchingMode, not even an explicit nil ### GetUserPathTemplate `func (o *PatchedLDAPSourceRequest) GetUserPathTemplate() string` diff --git a/docs/PatchedNotificationRuleRequest.md b/docs/PatchedNotificationRuleRequest.md index 3fc04dce5..4c6bddb36 100644 --- a/docs/PatchedNotificationRuleRequest.md +++ b/docs/PatchedNotificationRuleRequest.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Name** | Pointer to **string** | | [optional] **Transports** | Pointer to **[]string** | Select which transports should be used to notify the user. If none are selected, the notification will only be shown in the authentik UI. | [optional] -**Severity** | Pointer to [**NullableSeverityEnum**](SeverityEnum.md) | Controls which severity level the created notifications will have. * `notice` - Notice * `warning` - Warning * `alert` - Alert | [optional] +**Severity** | Pointer to [**SeverityEnum**](SeverityEnum.md) | | [optional] **Group** | Pointer to **NullableString** | Define which group of users this notification should be sent and shown to. If left empty, Notification won't ben sent. | [optional] ## Methods @@ -103,16 +103,6 @@ SetSeverity sets Severity field to given value. HasSeverity returns a boolean if a field has been set. -### SetSeverityNil - -`func (o *PatchedNotificationRuleRequest) SetSeverityNil(b bool)` - - SetSeverityNil sets the value for Severity to be an explicit nil - -### UnsetSeverity -`func (o *PatchedNotificationRuleRequest) UnsetSeverity()` - -UnsetSeverity ensures that no value is present for Severity, not even an explicit nil ### GetGroup `func (o *PatchedNotificationRuleRequest) GetGroup() string` diff --git a/docs/PatchedOAuth2ProviderRequest.md b/docs/PatchedOAuth2ProviderRequest.md index 41c2fa3bb..61da683e6 100644 --- a/docs/PatchedOAuth2ProviderRequest.md +++ b/docs/PatchedOAuth2ProviderRequest.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **AuthenticationFlow** | Pointer to **NullableString** | Flow used for authentication when the associated application is accessed by an un-authenticated user. | [optional] **AuthorizationFlow** | Pointer to **string** | Flow used when authorizing this provider. | [optional] **PropertyMappings** | Pointer to **[]string** | | [optional] -**ClientType** | Pointer to [**NullableClientTypeEnum**](ClientTypeEnum.md) | Confidential clients are capable of maintaining the confidentiality of their credentials. Public clients are incapable * `confidential` - Confidential * `public` - Public | [optional] +**ClientType** | Pointer to [**ClientTypeEnum**](ClientTypeEnum.md) | | [optional] **ClientId** | Pointer to **string** | | [optional] **ClientSecret** | Pointer to **string** | | [optional] **AccessCodeValidity** | Pointer to **string** | Access codes not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). | [optional] @@ -17,8 +17,8 @@ Name | Type | Description | Notes **IncludeClaimsInIdToken** | Pointer to **bool** | Include User claims from scopes in the id_token, for applications that don't access the userinfo endpoint. | [optional] **SigningKey** | Pointer to **NullableString** | Key used to sign the tokens. Only required when JWT Algorithm is set to RS256. | [optional] **RedirectUris** | Pointer to **string** | Enter each URI on a new line. | [optional] -**SubMode** | Pointer to [**NullableSubModeEnum**](SubModeEnum.md) | Configure what data should be used as unique User Identifier. For most cases, the default should be fine. * `hashed_user_id` - Based on the Hashed User ID * `user_id` - Based on user ID * `user_username` - Based on the username * `user_email` - Based on the User's Email. This is recommended over the UPN method. * `user_upn` - Based on the User's UPN, only works if user has a 'upn' attribute set. Use this method only if you have different UPN and Mail domains. | [optional] -**IssuerMode** | Pointer to [**NullableIssuerModeEnum**](IssuerModeEnum.md) | Configure how the issuer field of the ID Token should be filled. * `global` - Same identifier is used for all providers * `per_provider` - Each provider has a different issuer, based on the application slug. | [optional] +**SubMode** | Pointer to [**SubModeEnum**](SubModeEnum.md) | | [optional] +**IssuerMode** | Pointer to [**IssuerModeEnum**](IssuerModeEnum.md) | | [optional] **JwksSources** | Pointer to **[]string** | | [optional] ## Methods @@ -175,16 +175,6 @@ SetClientType sets ClientType field to given value. HasClientType returns a boolean if a field has been set. -### SetClientTypeNil - -`func (o *PatchedOAuth2ProviderRequest) SetClientTypeNil(b bool)` - - SetClientTypeNil sets the value for ClientType to be an explicit nil - -### UnsetClientType -`func (o *PatchedOAuth2ProviderRequest) UnsetClientType()` - -UnsetClientType ensures that no value is present for ClientType, not even an explicit nil ### GetClientId `func (o *PatchedOAuth2ProviderRequest) GetClientId() string` @@ -420,16 +410,6 @@ SetSubMode sets SubMode field to given value. HasSubMode returns a boolean if a field has been set. -### SetSubModeNil - -`func (o *PatchedOAuth2ProviderRequest) SetSubModeNil(b bool)` - - SetSubModeNil sets the value for SubMode to be an explicit nil - -### UnsetSubMode -`func (o *PatchedOAuth2ProviderRequest) UnsetSubMode()` - -UnsetSubMode ensures that no value is present for SubMode, not even an explicit nil ### GetIssuerMode `func (o *PatchedOAuth2ProviderRequest) GetIssuerMode() IssuerModeEnum` @@ -455,16 +435,6 @@ SetIssuerMode sets IssuerMode field to given value. HasIssuerMode returns a boolean if a field has been set. -### SetIssuerModeNil - -`func (o *PatchedOAuth2ProviderRequest) SetIssuerModeNil(b bool)` - - SetIssuerModeNil sets the value for IssuerMode to be an explicit nil - -### UnsetIssuerMode -`func (o *PatchedOAuth2ProviderRequest) UnsetIssuerMode()` - -UnsetIssuerMode ensures that no value is present for IssuerMode, not even an explicit nil ### GetJwksSources `func (o *PatchedOAuth2ProviderRequest) GetJwksSources() []string` diff --git a/docs/PatchedOAuthSourceRequest.md b/docs/PatchedOAuthSourceRequest.md index 6eb3ac341..7ded41ae2 100644 --- a/docs/PatchedOAuthSourceRequest.md +++ b/docs/PatchedOAuthSourceRequest.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **AuthenticationFlow** | Pointer to **NullableString** | Flow to use when authenticating existing users. | [optional] **EnrollmentFlow** | Pointer to **NullableString** | Flow to use when enrolling new users. | [optional] **PolicyEngineMode** | Pointer to [**PolicyEngineMode**](PolicyEngineMode.md) | | [optional] -**UserMatchingMode** | Pointer to [**NullableUserMatchingModeEnum**](UserMatchingModeEnum.md) | How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. | [optional] +**UserMatchingMode** | Pointer to [**UserMatchingModeEnum**](UserMatchingModeEnum.md) | | [optional] **UserPathTemplate** | Pointer to **string** | | [optional] **ProviderType** | Pointer to [**ProviderTypeEnum**](ProviderTypeEnum.md) | | [optional] **RequestTokenUrl** | Pointer to **NullableString** | URL used to request the initial token. This URL is only required for OAuth 1. | [optional] @@ -238,16 +238,6 @@ SetUserMatchingMode sets UserMatchingMode field to given value. HasUserMatchingMode returns a boolean if a field has been set. -### SetUserMatchingModeNil - -`func (o *PatchedOAuthSourceRequest) SetUserMatchingModeNil(b bool)` - - SetUserMatchingModeNil sets the value for UserMatchingMode to be an explicit nil - -### UnsetUserMatchingMode -`func (o *PatchedOAuthSourceRequest) UnsetUserMatchingMode()` - -UnsetUserMatchingMode ensures that no value is present for UserMatchingMode, not even an explicit nil ### GetUserPathTemplate `func (o *PatchedOAuthSourceRequest) GetUserPathTemplate() string` diff --git a/docs/PatchedPlexSourceRequest.md b/docs/PatchedPlexSourceRequest.md index 0a3cc5546..aa08a8619 100644 --- a/docs/PatchedPlexSourceRequest.md +++ b/docs/PatchedPlexSourceRequest.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **AuthenticationFlow** | Pointer to **NullableString** | Flow to use when authenticating existing users. | [optional] **EnrollmentFlow** | Pointer to **NullableString** | Flow to use when enrolling new users. | [optional] **PolicyEngineMode** | Pointer to [**PolicyEngineMode**](PolicyEngineMode.md) | | [optional] -**UserMatchingMode** | Pointer to [**NullableUserMatchingModeEnum**](UserMatchingModeEnum.md) | How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. | [optional] +**UserMatchingMode** | Pointer to [**UserMatchingModeEnum**](UserMatchingModeEnum.md) | | [optional] **UserPathTemplate** | Pointer to **string** | | [optional] **ClientId** | Pointer to **string** | Client identifier used to talk to Plex. | [optional] **AllowedServers** | Pointer to **[]string** | Which servers a user has to be a member of to be granted access. Empty list allows every server. | [optional] @@ -231,16 +231,6 @@ SetUserMatchingMode sets UserMatchingMode field to given value. HasUserMatchingMode returns a boolean if a field has been set. -### SetUserMatchingModeNil - -`func (o *PatchedPlexSourceRequest) SetUserMatchingModeNil(b bool)` - - SetUserMatchingModeNil sets the value for UserMatchingMode to be an explicit nil - -### UnsetUserMatchingMode -`func (o *PatchedPlexSourceRequest) UnsetUserMatchingMode()` - -UnsetUserMatchingMode ensures that no value is present for UserMatchingMode, not even an explicit nil ### GetUserPathTemplate `func (o *PatchedPlexSourceRequest) GetUserPathTemplate() string` diff --git a/docs/PatchedProxyProviderRequest.md b/docs/PatchedProxyProviderRequest.md index cfc8d6fa0..a93bf44a9 100644 --- a/docs/PatchedProxyProviderRequest.md +++ b/docs/PatchedProxyProviderRequest.md @@ -16,7 +16,7 @@ Name | Type | Description | Notes **BasicAuthEnabled** | Pointer to **bool** | Set a custom HTTP-Basic Authentication header based on values from authentik. | [optional] **BasicAuthPasswordAttribute** | Pointer to **string** | User/Group Attribute used for the password part of the HTTP-Basic Header. | [optional] **BasicAuthUserAttribute** | Pointer to **string** | User/Group Attribute used for the user part of the HTTP-Basic Header. If not set, the user's Email address is used. | [optional] -**Mode** | Pointer to [**NullableProxyMode**](ProxyMode.md) | Enable support for forwardAuth in traefik and nginx auth_request. Exclusive with internal_host. * `proxy` - Proxy * `forward_single` - Forward Single * `forward_domain` - Forward Domain | [optional] +**Mode** | Pointer to [**ProxyMode**](ProxyMode.md) | | [optional] **InterceptHeaderAuth** | Pointer to **bool** | When enabled, this provider will intercept the authorization header and authenticate requests based on its value. | [optional] **CookieDomain** | Pointer to **string** | | [optional] **JwksSources** | Pointer to **[]string** | | [optional] @@ -387,16 +387,6 @@ SetMode sets Mode field to given value. HasMode returns a boolean if a field has been set. -### SetModeNil - -`func (o *PatchedProxyProviderRequest) SetModeNil(b bool)` - - SetModeNil sets the value for Mode to be an explicit nil - -### UnsetMode -`func (o *PatchedProxyProviderRequest) UnsetMode()` - -UnsetMode ensures that no value is present for Mode, not even an explicit nil ### GetInterceptHeaderAuth `func (o *PatchedProxyProviderRequest) GetInterceptHeaderAuth() bool` diff --git a/docs/PatchedSAMLProviderRequest.md b/docs/PatchedSAMLProviderRequest.md index dabbf3cd7..5b1266d8d 100644 --- a/docs/PatchedSAMLProviderRequest.md +++ b/docs/PatchedSAMLProviderRequest.md @@ -19,7 +19,7 @@ Name | Type | Description | Notes **SignatureAlgorithm** | Pointer to [**SignatureAlgorithmEnum**](SignatureAlgorithmEnum.md) | | [optional] **SigningKp** | Pointer to **NullableString** | Keypair used to sign outgoing Responses going to the Service Provider. | [optional] **VerificationKp** | Pointer to **NullableString** | When selected, incoming assertion's Signatures will be validated against this certificate. To allow unsigned Requests, leave on default. | [optional] -**SpBinding** | Pointer to [**NullableSpBindingEnum**](SpBindingEnum.md) | This determines how authentik sends the response back to the Service Provider. * `redirect` - Redirect * `post` - Post | [optional] +**SpBinding** | Pointer to [**SpBindingEnum**](SpBindingEnum.md) | | [optional] ## Methods @@ -480,16 +480,6 @@ SetSpBinding sets SpBinding field to given value. HasSpBinding returns a boolean if a field has been set. -### SetSpBindingNil - -`func (o *PatchedSAMLProviderRequest) SetSpBindingNil(b bool)` - - SetSpBindingNil sets the value for SpBinding to be an explicit nil - -### UnsetSpBinding -`func (o *PatchedSAMLProviderRequest) UnsetSpBinding()` - -UnsetSpBinding ensures that no value is present for SpBinding, not even an explicit nil [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PatchedSAMLSourceRequest.md b/docs/PatchedSAMLSourceRequest.md index e020cde56..1940a7dec 100644 --- a/docs/PatchedSAMLSourceRequest.md +++ b/docs/PatchedSAMLSourceRequest.md @@ -10,14 +10,14 @@ Name | Type | Description | Notes **AuthenticationFlow** | Pointer to **NullableString** | Flow to use when authenticating existing users. | [optional] **EnrollmentFlow** | Pointer to **NullableString** | Flow to use when enrolling new users. | [optional] **PolicyEngineMode** | Pointer to [**PolicyEngineMode**](PolicyEngineMode.md) | | [optional] -**UserMatchingMode** | Pointer to [**NullableUserMatchingModeEnum**](UserMatchingModeEnum.md) | How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. | [optional] +**UserMatchingMode** | Pointer to [**UserMatchingModeEnum**](UserMatchingModeEnum.md) | | [optional] **UserPathTemplate** | Pointer to **string** | | [optional] **PreAuthenticationFlow** | Pointer to **string** | Flow used before authentication. | [optional] **Issuer** | Pointer to **string** | Also known as Entity ID. Defaults the Metadata URL. | [optional] **SsoUrl** | Pointer to **string** | URL that the initial Login request is sent to. | [optional] **SloUrl** | Pointer to **NullableString** | Optional URL if your IDP supports Single-Logout. | [optional] **AllowIdpInitiated** | Pointer to **bool** | Allows authentication flows initiated by the IdP. This can be a security risk, as no validation of the request ID is done. | [optional] -**NameIdPolicy** | Pointer to [**NullableNameIdPolicyEnum**](NameIdPolicyEnum.md) | NameID Policy sent to the IdP. Can be unset, in which case no Policy is sent. * `urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress` - Email * `urn:oasis:names:tc:SAML:2.0:nameid-format:persistent` - Persistent * `urn:oasis:names:tc:SAML:2.0:nameid-format:X509SubjectName` - X509 * `urn:oasis:names:tc:SAML:2.0:nameid-format:WindowsDomainQualifiedName` - Windows * `urn:oasis:names:tc:SAML:2.0:nameid-format:transient` - Transient | [optional] +**NameIdPolicy** | Pointer to [**NameIdPolicyEnum**](NameIdPolicyEnum.md) | | [optional] **BindingType** | Pointer to [**BindingTypeEnum**](BindingTypeEnum.md) | | [optional] **SigningKp** | Pointer to **NullableString** | Keypair which is used to sign outgoing requests. Leave empty to disable signing. | [optional] **DigestAlgorithm** | Pointer to [**DigestAlgorithmEnum**](DigestAlgorithmEnum.md) | | [optional] @@ -238,16 +238,6 @@ SetUserMatchingMode sets UserMatchingMode field to given value. HasUserMatchingMode returns a boolean if a field has been set. -### SetUserMatchingModeNil - -`func (o *PatchedSAMLSourceRequest) SetUserMatchingModeNil(b bool)` - - SetUserMatchingModeNil sets the value for UserMatchingMode to be an explicit nil - -### UnsetUserMatchingMode -`func (o *PatchedSAMLSourceRequest) UnsetUserMatchingMode()` - -UnsetUserMatchingMode ensures that no value is present for UserMatchingMode, not even an explicit nil ### GetUserPathTemplate `func (o *PatchedSAMLSourceRequest) GetUserPathTemplate() string` @@ -433,16 +423,6 @@ SetNameIdPolicy sets NameIdPolicy field to given value. HasNameIdPolicy returns a boolean if a field has been set. -### SetNameIdPolicyNil - -`func (o *PatchedSAMLSourceRequest) SetNameIdPolicyNil(b bool)` - - SetNameIdPolicyNil sets the value for NameIdPolicy to be an explicit nil - -### UnsetNameIdPolicy -`func (o *PatchedSAMLSourceRequest) UnsetNameIdPolicy()` - -UnsetNameIdPolicy ensures that no value is present for NameIdPolicy, not even an explicit nil ### GetBindingType `func (o *PatchedSAMLSourceRequest) GetBindingType() BindingTypeEnum` diff --git a/docs/PlexSource.md b/docs/PlexSource.md index a91e9bb5f..53991e58f 100644 --- a/docs/PlexSource.md +++ b/docs/PlexSource.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes **VerboseNamePlural** | **string** | Return object's plural verbose_name | [readonly] **MetaModelName** | **string** | Return internal model name | [readonly] **PolicyEngineMode** | Pointer to [**PolicyEngineMode**](PolicyEngineMode.md) | | [optional] -**UserMatchingMode** | Pointer to [**NullableUserMatchingModeEnum**](UserMatchingModeEnum.md) | How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. | [optional] +**UserMatchingMode** | Pointer to [**UserMatchingModeEnum**](UserMatchingModeEnum.md) | | [optional] **Managed** | **NullableString** | Objects which are managed by authentik. These objects are created and updated automatically. This is flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. | [readonly] **UserPathTemplate** | Pointer to **string** | | [optional] **Icon** | **NullableString** | Get the URL to the Icon. If the name is /static or starts with http it is returned as-is | [readonly] @@ -328,16 +328,6 @@ SetUserMatchingMode sets UserMatchingMode field to given value. HasUserMatchingMode returns a boolean if a field has been set. -### SetUserMatchingModeNil - -`func (o *PlexSource) SetUserMatchingModeNil(b bool)` - - SetUserMatchingModeNil sets the value for UserMatchingMode to be an explicit nil - -### UnsetUserMatchingMode -`func (o *PlexSource) UnsetUserMatchingMode()` - -UnsetUserMatchingMode ensures that no value is present for UserMatchingMode, not even an explicit nil ### GetManaged `func (o *PlexSource) GetManaged() string` diff --git a/docs/PlexSourceConnection.md b/docs/PlexSourceConnection.md index ea5f4597e..13590fc53 100644 --- a/docs/PlexSourceConnection.md +++ b/docs/PlexSourceConnection.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Pk** | **int32** | | [readonly] **User** | **int32** | | [readonly] -**Source** | [**PlexSourceConnectionSource**](PlexSourceConnectionSource.md) | | +**Source** | [**Source**](Source.md) | | [readonly] **Identifier** | **string** | | **PlexToken** | **string** | | @@ -14,7 +14,7 @@ Name | Type | Description | Notes ### NewPlexSourceConnection -`func NewPlexSourceConnection(pk int32, user int32, source PlexSourceConnectionSource, identifier string, plexToken string, ) *PlexSourceConnection` +`func NewPlexSourceConnection(pk int32, user int32, source Source, identifier string, plexToken string, ) *PlexSourceConnection` NewPlexSourceConnection instantiates a new PlexSourceConnection object This constructor will assign default values to properties that have it defined, @@ -71,20 +71,20 @@ SetUser sets User field to given value. ### GetSource -`func (o *PlexSourceConnection) GetSource() PlexSourceConnectionSource` +`func (o *PlexSourceConnection) GetSource() Source` GetSource returns the Source field if non-nil, zero value otherwise. ### GetSourceOk -`func (o *PlexSourceConnection) GetSourceOk() (*PlexSourceConnectionSource, bool)` +`func (o *PlexSourceConnection) GetSourceOk() (*Source, bool)` GetSourceOk returns a tuple with the Source field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSource -`func (o *PlexSourceConnection) SetSource(v PlexSourceConnectionSource)` +`func (o *PlexSourceConnection) SetSource(v Source)` SetSource sets Source field to given value. diff --git a/docs/PlexSourceConnectionSource.md b/docs/PlexSourceConnectionSource.md deleted file mode 100644 index 1a2202ca9..000000000 --- a/docs/PlexSourceConnectionSource.md +++ /dev/null @@ -1,425 +0,0 @@ -# PlexSourceConnectionSource - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Pk** | **string** | | [readonly] -**Name** | **string** | Source's display Name. | -**Slug** | **string** | Internal source name, used in URLs. | -**Enabled** | Pointer to **bool** | | [optional] -**AuthenticationFlow** | Pointer to **NullableString** | Flow to use when authenticating existing users. | [optional] -**EnrollmentFlow** | Pointer to **NullableString** | Flow to use when enrolling new users. | [optional] -**Component** | **string** | Get object component so that we know how to edit the object | [readonly] -**VerboseName** | **string** | Return object's verbose_name | [readonly] -**VerboseNamePlural** | **string** | Return object's plural verbose_name | [readonly] -**MetaModelName** | **string** | Return internal model name | [readonly] -**PolicyEngineMode** | Pointer to [**PolicyEngineMode**](PolicyEngineMode.md) | | [optional] -**UserMatchingMode** | Pointer to [**NullableUserMatchingModeEnum**](UserMatchingModeEnum.md) | How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. | [optional] -**Managed** | **NullableString** | Objects which are managed by authentik. These objects are created and updated automatically. This is flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. | [readonly] -**UserPathTemplate** | Pointer to **string** | | [optional] -**Icon** | **NullableString** | Get the URL to the Icon. If the name is /static or starts with http it is returned as-is | [readonly] - -## Methods - -### NewPlexSourceConnectionSource - -`func NewPlexSourceConnectionSource(pk string, name string, slug string, component string, verboseName string, verboseNamePlural string, metaModelName string, managed NullableString, icon NullableString, ) *PlexSourceConnectionSource` - -NewPlexSourceConnectionSource instantiates a new PlexSourceConnectionSource object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewPlexSourceConnectionSourceWithDefaults - -`func NewPlexSourceConnectionSourceWithDefaults() *PlexSourceConnectionSource` - -NewPlexSourceConnectionSourceWithDefaults instantiates a new PlexSourceConnectionSource object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetPk - -`func (o *PlexSourceConnectionSource) GetPk() string` - -GetPk returns the Pk field if non-nil, zero value otherwise. - -### GetPkOk - -`func (o *PlexSourceConnectionSource) GetPkOk() (*string, bool)` - -GetPkOk returns a tuple with the Pk field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPk - -`func (o *PlexSourceConnectionSource) SetPk(v string)` - -SetPk sets Pk field to given value. - - -### GetName - -`func (o *PlexSourceConnectionSource) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *PlexSourceConnectionSource) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *PlexSourceConnectionSource) SetName(v string)` - -SetName sets Name field to given value. - - -### GetSlug - -`func (o *PlexSourceConnectionSource) GetSlug() string` - -GetSlug returns the Slug field if non-nil, zero value otherwise. - -### GetSlugOk - -`func (o *PlexSourceConnectionSource) GetSlugOk() (*string, bool)` - -GetSlugOk returns a tuple with the Slug field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSlug - -`func (o *PlexSourceConnectionSource) SetSlug(v string)` - -SetSlug sets Slug field to given value. - - -### GetEnabled - -`func (o *PlexSourceConnectionSource) GetEnabled() bool` - -GetEnabled returns the Enabled field if non-nil, zero value otherwise. - -### GetEnabledOk - -`func (o *PlexSourceConnectionSource) GetEnabledOk() (*bool, bool)` - -GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEnabled - -`func (o *PlexSourceConnectionSource) SetEnabled(v bool)` - -SetEnabled sets Enabled field to given value. - -### HasEnabled - -`func (o *PlexSourceConnectionSource) HasEnabled() bool` - -HasEnabled returns a boolean if a field has been set. - -### GetAuthenticationFlow - -`func (o *PlexSourceConnectionSource) GetAuthenticationFlow() string` - -GetAuthenticationFlow returns the AuthenticationFlow field if non-nil, zero value otherwise. - -### GetAuthenticationFlowOk - -`func (o *PlexSourceConnectionSource) GetAuthenticationFlowOk() (*string, bool)` - -GetAuthenticationFlowOk returns a tuple with the AuthenticationFlow field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAuthenticationFlow - -`func (o *PlexSourceConnectionSource) SetAuthenticationFlow(v string)` - -SetAuthenticationFlow sets AuthenticationFlow field to given value. - -### HasAuthenticationFlow - -`func (o *PlexSourceConnectionSource) HasAuthenticationFlow() bool` - -HasAuthenticationFlow returns a boolean if a field has been set. - -### SetAuthenticationFlowNil - -`func (o *PlexSourceConnectionSource) SetAuthenticationFlowNil(b bool)` - - SetAuthenticationFlowNil sets the value for AuthenticationFlow to be an explicit nil - -### UnsetAuthenticationFlow -`func (o *PlexSourceConnectionSource) UnsetAuthenticationFlow()` - -UnsetAuthenticationFlow ensures that no value is present for AuthenticationFlow, not even an explicit nil -### GetEnrollmentFlow - -`func (o *PlexSourceConnectionSource) GetEnrollmentFlow() string` - -GetEnrollmentFlow returns the EnrollmentFlow field if non-nil, zero value otherwise. - -### GetEnrollmentFlowOk - -`func (o *PlexSourceConnectionSource) GetEnrollmentFlowOk() (*string, bool)` - -GetEnrollmentFlowOk returns a tuple with the EnrollmentFlow field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEnrollmentFlow - -`func (o *PlexSourceConnectionSource) SetEnrollmentFlow(v string)` - -SetEnrollmentFlow sets EnrollmentFlow field to given value. - -### HasEnrollmentFlow - -`func (o *PlexSourceConnectionSource) HasEnrollmentFlow() bool` - -HasEnrollmentFlow returns a boolean if a field has been set. - -### SetEnrollmentFlowNil - -`func (o *PlexSourceConnectionSource) SetEnrollmentFlowNil(b bool)` - - SetEnrollmentFlowNil sets the value for EnrollmentFlow to be an explicit nil - -### UnsetEnrollmentFlow -`func (o *PlexSourceConnectionSource) UnsetEnrollmentFlow()` - -UnsetEnrollmentFlow ensures that no value is present for EnrollmentFlow, not even an explicit nil -### GetComponent - -`func (o *PlexSourceConnectionSource) GetComponent() string` - -GetComponent returns the Component field if non-nil, zero value otherwise. - -### GetComponentOk - -`func (o *PlexSourceConnectionSource) GetComponentOk() (*string, bool)` - -GetComponentOk returns a tuple with the Component field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetComponent - -`func (o *PlexSourceConnectionSource) SetComponent(v string)` - -SetComponent sets Component field to given value. - - -### GetVerboseName - -`func (o *PlexSourceConnectionSource) GetVerboseName() string` - -GetVerboseName returns the VerboseName field if non-nil, zero value otherwise. - -### GetVerboseNameOk - -`func (o *PlexSourceConnectionSource) GetVerboseNameOk() (*string, bool)` - -GetVerboseNameOk returns a tuple with the VerboseName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetVerboseName - -`func (o *PlexSourceConnectionSource) SetVerboseName(v string)` - -SetVerboseName sets VerboseName field to given value. - - -### GetVerboseNamePlural - -`func (o *PlexSourceConnectionSource) GetVerboseNamePlural() string` - -GetVerboseNamePlural returns the VerboseNamePlural field if non-nil, zero value otherwise. - -### GetVerboseNamePluralOk - -`func (o *PlexSourceConnectionSource) GetVerboseNamePluralOk() (*string, bool)` - -GetVerboseNamePluralOk returns a tuple with the VerboseNamePlural field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetVerboseNamePlural - -`func (o *PlexSourceConnectionSource) SetVerboseNamePlural(v string)` - -SetVerboseNamePlural sets VerboseNamePlural field to given value. - - -### GetMetaModelName - -`func (o *PlexSourceConnectionSource) GetMetaModelName() string` - -GetMetaModelName returns the MetaModelName field if non-nil, zero value otherwise. - -### GetMetaModelNameOk - -`func (o *PlexSourceConnectionSource) GetMetaModelNameOk() (*string, bool)` - -GetMetaModelNameOk returns a tuple with the MetaModelName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMetaModelName - -`func (o *PlexSourceConnectionSource) SetMetaModelName(v string)` - -SetMetaModelName sets MetaModelName field to given value. - - -### GetPolicyEngineMode - -`func (o *PlexSourceConnectionSource) GetPolicyEngineMode() PolicyEngineMode` - -GetPolicyEngineMode returns the PolicyEngineMode field if non-nil, zero value otherwise. - -### GetPolicyEngineModeOk - -`func (o *PlexSourceConnectionSource) GetPolicyEngineModeOk() (*PolicyEngineMode, bool)` - -GetPolicyEngineModeOk returns a tuple with the PolicyEngineMode field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPolicyEngineMode - -`func (o *PlexSourceConnectionSource) SetPolicyEngineMode(v PolicyEngineMode)` - -SetPolicyEngineMode sets PolicyEngineMode field to given value. - -### HasPolicyEngineMode - -`func (o *PlexSourceConnectionSource) HasPolicyEngineMode() bool` - -HasPolicyEngineMode returns a boolean if a field has been set. - -### GetUserMatchingMode - -`func (o *PlexSourceConnectionSource) GetUserMatchingMode() UserMatchingModeEnum` - -GetUserMatchingMode returns the UserMatchingMode field if non-nil, zero value otherwise. - -### GetUserMatchingModeOk - -`func (o *PlexSourceConnectionSource) GetUserMatchingModeOk() (*UserMatchingModeEnum, bool)` - -GetUserMatchingModeOk returns a tuple with the UserMatchingMode field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUserMatchingMode - -`func (o *PlexSourceConnectionSource) SetUserMatchingMode(v UserMatchingModeEnum)` - -SetUserMatchingMode sets UserMatchingMode field to given value. - -### HasUserMatchingMode - -`func (o *PlexSourceConnectionSource) HasUserMatchingMode() bool` - -HasUserMatchingMode returns a boolean if a field has been set. - -### SetUserMatchingModeNil - -`func (o *PlexSourceConnectionSource) SetUserMatchingModeNil(b bool)` - - SetUserMatchingModeNil sets the value for UserMatchingMode to be an explicit nil - -### UnsetUserMatchingMode -`func (o *PlexSourceConnectionSource) UnsetUserMatchingMode()` - -UnsetUserMatchingMode ensures that no value is present for UserMatchingMode, not even an explicit nil -### GetManaged - -`func (o *PlexSourceConnectionSource) GetManaged() string` - -GetManaged returns the Managed field if non-nil, zero value otherwise. - -### GetManagedOk - -`func (o *PlexSourceConnectionSource) GetManagedOk() (*string, bool)` - -GetManagedOk returns a tuple with the Managed field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetManaged - -`func (o *PlexSourceConnectionSource) SetManaged(v string)` - -SetManaged sets Managed field to given value. - - -### SetManagedNil - -`func (o *PlexSourceConnectionSource) SetManagedNil(b bool)` - - SetManagedNil sets the value for Managed to be an explicit nil - -### UnsetManaged -`func (o *PlexSourceConnectionSource) UnsetManaged()` - -UnsetManaged ensures that no value is present for Managed, not even an explicit nil -### GetUserPathTemplate - -`func (o *PlexSourceConnectionSource) GetUserPathTemplate() string` - -GetUserPathTemplate returns the UserPathTemplate field if non-nil, zero value otherwise. - -### GetUserPathTemplateOk - -`func (o *PlexSourceConnectionSource) GetUserPathTemplateOk() (*string, bool)` - -GetUserPathTemplateOk returns a tuple with the UserPathTemplate field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUserPathTemplate - -`func (o *PlexSourceConnectionSource) SetUserPathTemplate(v string)` - -SetUserPathTemplate sets UserPathTemplate field to given value. - -### HasUserPathTemplate - -`func (o *PlexSourceConnectionSource) HasUserPathTemplate() bool` - -HasUserPathTemplate returns a boolean if a field has been set. - -### GetIcon - -`func (o *PlexSourceConnectionSource) GetIcon() string` - -GetIcon returns the Icon field if non-nil, zero value otherwise. - -### GetIconOk - -`func (o *PlexSourceConnectionSource) GetIconOk() (*string, bool)` - -GetIconOk returns a tuple with the Icon field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIcon - -`func (o *PlexSourceConnectionSource) SetIcon(v string)` - -SetIcon sets Icon field to given value. - - -### SetIconNil - -`func (o *PlexSourceConnectionSource) SetIconNil(b bool)` - - SetIconNil sets the value for Icon to be an explicit nil - -### UnsetIcon -`func (o *PlexSourceConnectionSource) UnsetIcon()` - -UnsetIcon ensures that no value is present for Icon, not even an explicit nil - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PlexSourceRequest.md b/docs/PlexSourceRequest.md index b198f18c5..d0fa985a5 100644 --- a/docs/PlexSourceRequest.md +++ b/docs/PlexSourceRequest.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **AuthenticationFlow** | Pointer to **NullableString** | Flow to use when authenticating existing users. | [optional] **EnrollmentFlow** | Pointer to **NullableString** | Flow to use when enrolling new users. | [optional] **PolicyEngineMode** | Pointer to [**PolicyEngineMode**](PolicyEngineMode.md) | | [optional] -**UserMatchingMode** | Pointer to [**NullableUserMatchingModeEnum**](UserMatchingModeEnum.md) | How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. | [optional] +**UserMatchingMode** | Pointer to [**UserMatchingModeEnum**](UserMatchingModeEnum.md) | | [optional] **UserPathTemplate** | Pointer to **string** | | [optional] **ClientId** | Pointer to **string** | Client identifier used to talk to Plex. | [optional] **AllowedServers** | Pointer to **[]string** | Which servers a user has to be a member of to be granted access. Empty list allows every server. | [optional] @@ -221,16 +221,6 @@ SetUserMatchingMode sets UserMatchingMode field to given value. HasUserMatchingMode returns a boolean if a field has been set. -### SetUserMatchingModeNil - -`func (o *PlexSourceRequest) SetUserMatchingModeNil(b bool)` - - SetUserMatchingModeNil sets the value for UserMatchingMode to be an explicit nil - -### UnsetUserMatchingMode -`func (o *PlexSourceRequest) UnsetUserMatchingMode()` - -UnsetUserMatchingMode ensures that no value is present for UserMatchingMode, not even an explicit nil ### GetUserPathTemplate `func (o *PlexSourceRequest) GetUserPathTemplate() string` diff --git a/docs/PoliciesApi.md b/docs/PoliciesApi.md index 456db0bc0..8bc4821a2 100644 --- a/docs/PoliciesApi.md +++ b/docs/PoliciesApi.md @@ -85,14 +85,14 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PoliciesApi.PoliciesAllCacheClearCreate(context.Background()).Execute() + r, err := apiClient.PoliciesApi.PoliciesAllCacheClearCreate(context.Background()).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PoliciesApi.PoliciesAllCacheClearCreate``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -144,7 +144,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -205,7 +205,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -213,7 +213,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PoliciesApi.PoliciesAllDestroy(context.Background(), policyUuid).Execute() + r, err := apiClient.PoliciesApi.PoliciesAllDestroy(context.Background(), policyUuid).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PoliciesApi.PoliciesAllDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -273,7 +273,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -349,7 +349,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -419,7 +419,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -491,7 +491,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -552,7 +552,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -622,7 +622,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -688,7 +688,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -696,7 +696,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PoliciesApi.PoliciesBindingsDestroy(context.Background(), policyBindingUuid).Execute() + r, err := apiClient.PoliciesApi.PoliciesBindingsDestroy(context.Background(), policyBindingUuid).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PoliciesApi.PoliciesBindingsDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -756,7 +756,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -842,7 +842,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -914,7 +914,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -984,7 +984,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1056,7 +1056,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1126,7 +1126,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1192,7 +1192,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1200,7 +1200,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PoliciesApi.PoliciesDummyDestroy(context.Background(), policyUuid).Execute() + r, err := apiClient.PoliciesApi.PoliciesDummyDestroy(context.Background(), policyUuid).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PoliciesApi.PoliciesDummyDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -1261,7 +1261,7 @@ import ( "fmt" "os" "time" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1349,7 +1349,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1421,7 +1421,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1491,7 +1491,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1563,7 +1563,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1633,7 +1633,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1699,7 +1699,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1707,7 +1707,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PoliciesApi.PoliciesEventMatcherDestroy(context.Background(), policyUuid).Execute() + r, err := apiClient.PoliciesApi.PoliciesEventMatcherDestroy(context.Background(), policyUuid).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PoliciesApi.PoliciesEventMatcherDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -1768,7 +1768,7 @@ import ( "fmt" "os" "time" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1856,7 +1856,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1928,7 +1928,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1998,7 +1998,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2070,7 +2070,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2140,7 +2140,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2206,7 +2206,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2214,7 +2214,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PoliciesApi.PoliciesExpressionDestroy(context.Background(), policyUuid).Execute() + r, err := apiClient.PoliciesApi.PoliciesExpressionDestroy(context.Background(), policyUuid).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PoliciesApi.PoliciesExpressionDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -2275,7 +2275,7 @@ import ( "fmt" "os" "time" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2359,7 +2359,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2431,7 +2431,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2501,7 +2501,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2573,7 +2573,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2643,7 +2643,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2709,7 +2709,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2717,7 +2717,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PoliciesApi.PoliciesPasswordDestroy(context.Background(), policyUuid).Execute() + r, err := apiClient.PoliciesApi.PoliciesPasswordDestroy(context.Background(), policyUuid).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PoliciesApi.PoliciesPasswordDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -2777,7 +2777,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2843,7 +2843,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2851,7 +2851,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PoliciesApi.PoliciesPasswordExpiryDestroy(context.Background(), policyUuid).Execute() + r, err := apiClient.PoliciesApi.PoliciesPasswordExpiryDestroy(context.Background(), policyUuid).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PoliciesApi.PoliciesPasswordExpiryDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -2912,7 +2912,7 @@ import ( "fmt" "os" "time" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2998,7 +2998,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3070,7 +3070,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3140,7 +3140,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3212,7 +3212,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3283,7 +3283,7 @@ import ( "fmt" "os" "time" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3391,7 +3391,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3463,7 +3463,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3533,7 +3533,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3605,7 +3605,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3675,7 +3675,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3741,7 +3741,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3749,7 +3749,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PoliciesApi.PoliciesReputationDestroy(context.Background(), policyUuid).Execute() + r, err := apiClient.PoliciesApi.PoliciesReputationDestroy(context.Background(), policyUuid).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PoliciesApi.PoliciesReputationDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -3810,7 +3810,7 @@ import ( "fmt" "os" "time" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3898,7 +3898,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3970,7 +3970,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -4040,7 +4040,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -4048,7 +4048,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PoliciesApi.PoliciesReputationScoresDestroy(context.Background(), reputationUuid).Execute() + r, err := apiClient.PoliciesApi.PoliciesReputationScoresDestroy(context.Background(), reputationUuid).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PoliciesApi.PoliciesReputationScoresDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -4108,7 +4108,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -4186,7 +4186,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -4256,7 +4256,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -4326,7 +4326,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -4398,7 +4398,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { diff --git a/docs/PolicyBinding.md b/docs/PolicyBinding.md index 584573952..d9ded2aec 100644 --- a/docs/PolicyBinding.md +++ b/docs/PolicyBinding.md @@ -8,9 +8,9 @@ Name | Type | Description | Notes **Policy** | Pointer to **NullableString** | | [optional] **Group** | Pointer to **NullableString** | | [optional] **User** | Pointer to **NullableInt32** | | [optional] -**PolicyObj** | [**PolicyBindingPolicyObj**](PolicyBindingPolicyObj.md) | | -**GroupObj** | [**NotificationRuleGroupObj**](NotificationRuleGroupObj.md) | | -**UserObj** | [**PolicyBindingUserObj**](PolicyBindingUserObj.md) | | +**PolicyObj** | [**Policy**](Policy.md) | | [readonly] +**GroupObj** | [**Group**](Group.md) | | [readonly] +**UserObj** | [**User**](User.md) | | [readonly] **Target** | **string** | | **Negate** | Pointer to **bool** | Negates the outcome of the policy. Messages are unaffected. | [optional] **Enabled** | Pointer to **bool** | | [optional] @@ -21,7 +21,7 @@ Name | Type | Description | Notes ### NewPolicyBinding -`func NewPolicyBinding(pk string, policyObj PolicyBindingPolicyObj, groupObj NotificationRuleGroupObj, userObj PolicyBindingUserObj, target string, order int32, ) *PolicyBinding` +`func NewPolicyBinding(pk string, policyObj Policy, groupObj Group, userObj User, target string, order int32, ) *PolicyBinding` NewPolicyBinding instantiates a new PolicyBinding object This constructor will assign default values to properties that have it defined, @@ -163,60 +163,60 @@ HasUser returns a boolean if a field has been set. UnsetUser ensures that no value is present for User, not even an explicit nil ### GetPolicyObj -`func (o *PolicyBinding) GetPolicyObj() PolicyBindingPolicyObj` +`func (o *PolicyBinding) GetPolicyObj() Policy` GetPolicyObj returns the PolicyObj field if non-nil, zero value otherwise. ### GetPolicyObjOk -`func (o *PolicyBinding) GetPolicyObjOk() (*PolicyBindingPolicyObj, bool)` +`func (o *PolicyBinding) GetPolicyObjOk() (*Policy, bool)` GetPolicyObjOk returns a tuple with the PolicyObj field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetPolicyObj -`func (o *PolicyBinding) SetPolicyObj(v PolicyBindingPolicyObj)` +`func (o *PolicyBinding) SetPolicyObj(v Policy)` SetPolicyObj sets PolicyObj field to given value. ### GetGroupObj -`func (o *PolicyBinding) GetGroupObj() NotificationRuleGroupObj` +`func (o *PolicyBinding) GetGroupObj() Group` GetGroupObj returns the GroupObj field if non-nil, zero value otherwise. ### GetGroupObjOk -`func (o *PolicyBinding) GetGroupObjOk() (*NotificationRuleGroupObj, bool)` +`func (o *PolicyBinding) GetGroupObjOk() (*Group, bool)` GetGroupObjOk returns a tuple with the GroupObj field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetGroupObj -`func (o *PolicyBinding) SetGroupObj(v NotificationRuleGroupObj)` +`func (o *PolicyBinding) SetGroupObj(v Group)` SetGroupObj sets GroupObj field to given value. ### GetUserObj -`func (o *PolicyBinding) GetUserObj() PolicyBindingUserObj` +`func (o *PolicyBinding) GetUserObj() User` GetUserObj returns the UserObj field if non-nil, zero value otherwise. ### GetUserObjOk -`func (o *PolicyBinding) GetUserObjOk() (*PolicyBindingUserObj, bool)` +`func (o *PolicyBinding) GetUserObjOk() (*User, bool)` GetUserObjOk returns a tuple with the UserObj field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetUserObj -`func (o *PolicyBinding) SetUserObj(v PolicyBindingUserObj)` +`func (o *PolicyBinding) SetUserObj(v User)` SetUserObj sets UserObj field to given value. diff --git a/docs/PolicyBindingPolicyObj.md b/docs/PolicyBindingPolicyObj.md deleted file mode 100644 index daf9a9134..000000000 --- a/docs/PolicyBindingPolicyObj.md +++ /dev/null @@ -1,203 +0,0 @@ -# PolicyBindingPolicyObj - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Pk** | **string** | | [readonly] -**Name** | **string** | | -**ExecutionLogging** | Pointer to **bool** | When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. | [optional] -**Component** | **string** | Get object component so that we know how to edit the object | [readonly] -**VerboseName** | **string** | Return object's verbose_name | [readonly] -**VerboseNamePlural** | **string** | Return object's plural verbose_name | [readonly] -**MetaModelName** | **string** | Return internal model name | [readonly] -**BoundTo** | **int32** | Return objects policy is bound to | [readonly] - -## Methods - -### NewPolicyBindingPolicyObj - -`func NewPolicyBindingPolicyObj(pk string, name string, component string, verboseName string, verboseNamePlural string, metaModelName string, boundTo int32, ) *PolicyBindingPolicyObj` - -NewPolicyBindingPolicyObj instantiates a new PolicyBindingPolicyObj object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewPolicyBindingPolicyObjWithDefaults - -`func NewPolicyBindingPolicyObjWithDefaults() *PolicyBindingPolicyObj` - -NewPolicyBindingPolicyObjWithDefaults instantiates a new PolicyBindingPolicyObj object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetPk - -`func (o *PolicyBindingPolicyObj) GetPk() string` - -GetPk returns the Pk field if non-nil, zero value otherwise. - -### GetPkOk - -`func (o *PolicyBindingPolicyObj) GetPkOk() (*string, bool)` - -GetPkOk returns a tuple with the Pk field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPk - -`func (o *PolicyBindingPolicyObj) SetPk(v string)` - -SetPk sets Pk field to given value. - - -### GetName - -`func (o *PolicyBindingPolicyObj) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *PolicyBindingPolicyObj) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *PolicyBindingPolicyObj) SetName(v string)` - -SetName sets Name field to given value. - - -### GetExecutionLogging - -`func (o *PolicyBindingPolicyObj) GetExecutionLogging() bool` - -GetExecutionLogging returns the ExecutionLogging field if non-nil, zero value otherwise. - -### GetExecutionLoggingOk - -`func (o *PolicyBindingPolicyObj) GetExecutionLoggingOk() (*bool, bool)` - -GetExecutionLoggingOk returns a tuple with the ExecutionLogging field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetExecutionLogging - -`func (o *PolicyBindingPolicyObj) SetExecutionLogging(v bool)` - -SetExecutionLogging sets ExecutionLogging field to given value. - -### HasExecutionLogging - -`func (o *PolicyBindingPolicyObj) HasExecutionLogging() bool` - -HasExecutionLogging returns a boolean if a field has been set. - -### GetComponent - -`func (o *PolicyBindingPolicyObj) GetComponent() string` - -GetComponent returns the Component field if non-nil, zero value otherwise. - -### GetComponentOk - -`func (o *PolicyBindingPolicyObj) GetComponentOk() (*string, bool)` - -GetComponentOk returns a tuple with the Component field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetComponent - -`func (o *PolicyBindingPolicyObj) SetComponent(v string)` - -SetComponent sets Component field to given value. - - -### GetVerboseName - -`func (o *PolicyBindingPolicyObj) GetVerboseName() string` - -GetVerboseName returns the VerboseName field if non-nil, zero value otherwise. - -### GetVerboseNameOk - -`func (o *PolicyBindingPolicyObj) GetVerboseNameOk() (*string, bool)` - -GetVerboseNameOk returns a tuple with the VerboseName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetVerboseName - -`func (o *PolicyBindingPolicyObj) SetVerboseName(v string)` - -SetVerboseName sets VerboseName field to given value. - - -### GetVerboseNamePlural - -`func (o *PolicyBindingPolicyObj) GetVerboseNamePlural() string` - -GetVerboseNamePlural returns the VerboseNamePlural field if non-nil, zero value otherwise. - -### GetVerboseNamePluralOk - -`func (o *PolicyBindingPolicyObj) GetVerboseNamePluralOk() (*string, bool)` - -GetVerboseNamePluralOk returns a tuple with the VerboseNamePlural field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetVerboseNamePlural - -`func (o *PolicyBindingPolicyObj) SetVerboseNamePlural(v string)` - -SetVerboseNamePlural sets VerboseNamePlural field to given value. - - -### GetMetaModelName - -`func (o *PolicyBindingPolicyObj) GetMetaModelName() string` - -GetMetaModelName returns the MetaModelName field if non-nil, zero value otherwise. - -### GetMetaModelNameOk - -`func (o *PolicyBindingPolicyObj) GetMetaModelNameOk() (*string, bool)` - -GetMetaModelNameOk returns a tuple with the MetaModelName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMetaModelName - -`func (o *PolicyBindingPolicyObj) SetMetaModelName(v string)` - -SetMetaModelName sets MetaModelName field to given value. - - -### GetBoundTo - -`func (o *PolicyBindingPolicyObj) GetBoundTo() int32` - -GetBoundTo returns the BoundTo field if non-nil, zero value otherwise. - -### GetBoundToOk - -`func (o *PolicyBindingPolicyObj) GetBoundToOk() (*int32, bool)` - -GetBoundToOk returns a tuple with the BoundTo field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetBoundTo - -`func (o *PolicyBindingPolicyObj) SetBoundTo(v int32)` - -SetBoundTo sets BoundTo field to given value. - - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PolicyBindingUserObj.md b/docs/PolicyBindingUserObj.md deleted file mode 100644 index 7fab38f40..000000000 --- a/docs/PolicyBindingUserObj.md +++ /dev/null @@ -1,338 +0,0 @@ -# PolicyBindingUserObj - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Pk** | **int32** | | [readonly] -**Username** | **string** | | -**Name** | **string** | User's display name. | -**IsActive** | Pointer to **bool** | Designates whether this user should be treated as active. Unselect this instead of deleting accounts. | [optional] -**LastLogin** | Pointer to **NullableTime** | | [optional] -**IsSuperuser** | **bool** | | [readonly] -**Groups** | **[]string** | | -**GroupsObj** | [**[]UserGroup**](UserGroup.md) | | [readonly] -**Email** | Pointer to **string** | | [optional] -**Avatar** | **string** | | [readonly] -**Attributes** | Pointer to **map[string]interface{}** | | [optional] -**Uid** | **string** | | [readonly] -**Path** | Pointer to **string** | | [optional] - -## Methods - -### NewPolicyBindingUserObj - -`func NewPolicyBindingUserObj(pk int32, username string, name string, isSuperuser bool, groups []string, groupsObj []UserGroup, avatar string, uid string, ) *PolicyBindingUserObj` - -NewPolicyBindingUserObj instantiates a new PolicyBindingUserObj object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewPolicyBindingUserObjWithDefaults - -`func NewPolicyBindingUserObjWithDefaults() *PolicyBindingUserObj` - -NewPolicyBindingUserObjWithDefaults instantiates a new PolicyBindingUserObj object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetPk - -`func (o *PolicyBindingUserObj) GetPk() int32` - -GetPk returns the Pk field if non-nil, zero value otherwise. - -### GetPkOk - -`func (o *PolicyBindingUserObj) GetPkOk() (*int32, bool)` - -GetPkOk returns a tuple with the Pk field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPk - -`func (o *PolicyBindingUserObj) SetPk(v int32)` - -SetPk sets Pk field to given value. - - -### GetUsername - -`func (o *PolicyBindingUserObj) GetUsername() string` - -GetUsername returns the Username field if non-nil, zero value otherwise. - -### GetUsernameOk - -`func (o *PolicyBindingUserObj) GetUsernameOk() (*string, bool)` - -GetUsernameOk returns a tuple with the Username field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUsername - -`func (o *PolicyBindingUserObj) SetUsername(v string)` - -SetUsername sets Username field to given value. - - -### GetName - -`func (o *PolicyBindingUserObj) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *PolicyBindingUserObj) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *PolicyBindingUserObj) SetName(v string)` - -SetName sets Name field to given value. - - -### GetIsActive - -`func (o *PolicyBindingUserObj) GetIsActive() bool` - -GetIsActive returns the IsActive field if non-nil, zero value otherwise. - -### GetIsActiveOk - -`func (o *PolicyBindingUserObj) GetIsActiveOk() (*bool, bool)` - -GetIsActiveOk returns a tuple with the IsActive field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsActive - -`func (o *PolicyBindingUserObj) SetIsActive(v bool)` - -SetIsActive sets IsActive field to given value. - -### HasIsActive - -`func (o *PolicyBindingUserObj) HasIsActive() bool` - -HasIsActive returns a boolean if a field has been set. - -### GetLastLogin - -`func (o *PolicyBindingUserObj) GetLastLogin() time.Time` - -GetLastLogin returns the LastLogin field if non-nil, zero value otherwise. - -### GetLastLoginOk - -`func (o *PolicyBindingUserObj) GetLastLoginOk() (*time.Time, bool)` - -GetLastLoginOk returns a tuple with the LastLogin field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLastLogin - -`func (o *PolicyBindingUserObj) SetLastLogin(v time.Time)` - -SetLastLogin sets LastLogin field to given value. - -### HasLastLogin - -`func (o *PolicyBindingUserObj) HasLastLogin() bool` - -HasLastLogin returns a boolean if a field has been set. - -### SetLastLoginNil - -`func (o *PolicyBindingUserObj) SetLastLoginNil(b bool)` - - SetLastLoginNil sets the value for LastLogin to be an explicit nil - -### UnsetLastLogin -`func (o *PolicyBindingUserObj) UnsetLastLogin()` - -UnsetLastLogin ensures that no value is present for LastLogin, not even an explicit nil -### GetIsSuperuser - -`func (o *PolicyBindingUserObj) GetIsSuperuser() bool` - -GetIsSuperuser returns the IsSuperuser field if non-nil, zero value otherwise. - -### GetIsSuperuserOk - -`func (o *PolicyBindingUserObj) GetIsSuperuserOk() (*bool, bool)` - -GetIsSuperuserOk returns a tuple with the IsSuperuser field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsSuperuser - -`func (o *PolicyBindingUserObj) SetIsSuperuser(v bool)` - -SetIsSuperuser sets IsSuperuser field to given value. - - -### GetGroups - -`func (o *PolicyBindingUserObj) GetGroups() []string` - -GetGroups returns the Groups field if non-nil, zero value otherwise. - -### GetGroupsOk - -`func (o *PolicyBindingUserObj) GetGroupsOk() (*[]string, bool)` - -GetGroupsOk returns a tuple with the Groups field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetGroups - -`func (o *PolicyBindingUserObj) SetGroups(v []string)` - -SetGroups sets Groups field to given value. - - -### GetGroupsObj - -`func (o *PolicyBindingUserObj) GetGroupsObj() []UserGroup` - -GetGroupsObj returns the GroupsObj field if non-nil, zero value otherwise. - -### GetGroupsObjOk - -`func (o *PolicyBindingUserObj) GetGroupsObjOk() (*[]UserGroup, bool)` - -GetGroupsObjOk returns a tuple with the GroupsObj field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetGroupsObj - -`func (o *PolicyBindingUserObj) SetGroupsObj(v []UserGroup)` - -SetGroupsObj sets GroupsObj field to given value. - - -### GetEmail - -`func (o *PolicyBindingUserObj) GetEmail() string` - -GetEmail returns the Email field if non-nil, zero value otherwise. - -### GetEmailOk - -`func (o *PolicyBindingUserObj) GetEmailOk() (*string, bool)` - -GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEmail - -`func (o *PolicyBindingUserObj) SetEmail(v string)` - -SetEmail sets Email field to given value. - -### HasEmail - -`func (o *PolicyBindingUserObj) HasEmail() bool` - -HasEmail returns a boolean if a field has been set. - -### GetAvatar - -`func (o *PolicyBindingUserObj) GetAvatar() string` - -GetAvatar returns the Avatar field if non-nil, zero value otherwise. - -### GetAvatarOk - -`func (o *PolicyBindingUserObj) GetAvatarOk() (*string, bool)` - -GetAvatarOk returns a tuple with the Avatar field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAvatar - -`func (o *PolicyBindingUserObj) SetAvatar(v string)` - -SetAvatar sets Avatar field to given value. - - -### GetAttributes - -`func (o *PolicyBindingUserObj) GetAttributes() map[string]interface{}` - -GetAttributes returns the Attributes field if non-nil, zero value otherwise. - -### GetAttributesOk - -`func (o *PolicyBindingUserObj) GetAttributesOk() (*map[string]interface{}, bool)` - -GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAttributes - -`func (o *PolicyBindingUserObj) SetAttributes(v map[string]interface{})` - -SetAttributes sets Attributes field to given value. - -### HasAttributes - -`func (o *PolicyBindingUserObj) HasAttributes() bool` - -HasAttributes returns a boolean if a field has been set. - -### GetUid - -`func (o *PolicyBindingUserObj) GetUid() string` - -GetUid returns the Uid field if non-nil, zero value otherwise. - -### GetUidOk - -`func (o *PolicyBindingUserObj) GetUidOk() (*string, bool)` - -GetUidOk returns a tuple with the Uid field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUid - -`func (o *PolicyBindingUserObj) SetUid(v string)` - -SetUid sets Uid field to given value. - - -### GetPath - -`func (o *PolicyBindingUserObj) GetPath() string` - -GetPath returns the Path field if non-nil, zero value otherwise. - -### GetPathOk - -`func (o *PolicyBindingUserObj) GetPathOk() (*string, bool)` - -GetPathOk returns a tuple with the Path field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPath - -`func (o *PolicyBindingUserObj) SetPath(v string)` - -SetPath sets Path field to given value. - -### HasPath - -`func (o *PolicyBindingUserObj) HasPath() bool` - -HasPath returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PropertymappingsApi.md b/docs/PropertymappingsApi.md index 36eb03814..4cf1c2746 100644 --- a/docs/PropertymappingsApi.md +++ b/docs/PropertymappingsApi.md @@ -65,7 +65,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -73,7 +73,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PropertymappingsApi.PropertymappingsAllDestroy(context.Background(), pmUuid).Execute() + r, err := apiClient.PropertymappingsApi.PropertymappingsAllDestroy(context.Background(), pmUuid).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PropertymappingsApi.PropertymappingsAllDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -133,7 +133,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -207,7 +207,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -277,7 +277,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -351,7 +351,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -412,7 +412,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -482,7 +482,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -548,7 +548,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -556,7 +556,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PropertymappingsApi.PropertymappingsLdapDestroy(context.Background(), pmUuid).Execute() + r, err := apiClient.PropertymappingsApi.PropertymappingsLdapDestroy(context.Background(), pmUuid).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PropertymappingsApi.PropertymappingsLdapDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -616,7 +616,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -698,7 +698,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -770,7 +770,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -840,7 +840,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -912,7 +912,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -982,7 +982,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1048,7 +1048,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1056,7 +1056,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PropertymappingsApi.PropertymappingsNotificationDestroy(context.Background(), pmUuid).Execute() + r, err := apiClient.PropertymappingsApi.PropertymappingsNotificationDestroy(context.Background(), pmUuid).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PropertymappingsApi.PropertymappingsNotificationDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -1116,7 +1116,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1190,7 +1190,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1262,7 +1262,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1332,7 +1332,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1404,7 +1404,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1474,7 +1474,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1540,7 +1540,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1548,7 +1548,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PropertymappingsApi.PropertymappingsSamlDestroy(context.Background(), pmUuid).Execute() + r, err := apiClient.PropertymappingsApi.PropertymappingsSamlDestroy(context.Background(), pmUuid).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PropertymappingsApi.PropertymappingsSamlDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -1608,7 +1608,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1692,7 +1692,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1764,7 +1764,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1834,7 +1834,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1906,7 +1906,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1976,7 +1976,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2042,7 +2042,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2050,7 +2050,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PropertymappingsApi.PropertymappingsScimDestroy(context.Background(), pmUuid).Execute() + r, err := apiClient.PropertymappingsApi.PropertymappingsScimDestroy(context.Background(), pmUuid).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PropertymappingsApi.PropertymappingsScimDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -2110,7 +2110,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2190,7 +2190,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2262,7 +2262,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2332,7 +2332,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2404,7 +2404,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2474,7 +2474,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2540,7 +2540,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2548,7 +2548,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PropertymappingsApi.PropertymappingsScopeDestroy(context.Background(), pmUuid).Execute() + r, err := apiClient.PropertymappingsApi.PropertymappingsScopeDestroy(context.Background(), pmUuid).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PropertymappingsApi.PropertymappingsScopeDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -2608,7 +2608,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2686,7 +2686,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2758,7 +2758,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2828,7 +2828,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2900,7 +2900,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { diff --git a/docs/ProvidersApi.md b/docs/ProvidersApi.md index 342cff22d..389c7a5bf 100644 --- a/docs/ProvidersApi.md +++ b/docs/ProvidersApi.md @@ -77,7 +77,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -85,7 +85,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ProvidersApi.ProvidersAllDestroy(context.Background(), id).Execute() + r, err := apiClient.ProvidersApi.ProvidersAllDestroy(context.Background(), id).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ProvidersApi.ProvidersAllDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -145,7 +145,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -219,7 +219,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -289,7 +289,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -350,7 +350,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -420,7 +420,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -486,7 +486,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -494,7 +494,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ProvidersApi.ProvidersLdapDestroy(context.Background(), id).Execute() + r, err := apiClient.ProvidersApi.ProvidersLdapDestroy(context.Background(), id).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ProvidersApi.ProvidersLdapDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -554,7 +554,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -648,7 +648,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -720,7 +720,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -790,7 +790,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -862,7 +862,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -932,7 +932,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -998,7 +998,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1006,7 +1006,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ProvidersApi.ProvidersOauth2Destroy(context.Background(), id).Execute() + r, err := apiClient.ProvidersApi.ProvidersOauth2Destroy(context.Background(), id).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ProvidersApi.ProvidersOauth2Destroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -1066,7 +1066,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1166,7 +1166,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1238,7 +1238,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1308,7 +1308,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1378,7 +1378,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1448,7 +1448,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1520,7 +1520,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1590,7 +1590,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1656,7 +1656,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1664,7 +1664,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ProvidersApi.ProvidersProxyDestroy(context.Background(), id).Execute() + r, err := apiClient.ProvidersApi.ProvidersProxyDestroy(context.Background(), id).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ProvidersApi.ProvidersProxyDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -1724,7 +1724,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1828,7 +1828,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1900,7 +1900,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1970,7 +1970,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2042,7 +2042,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2112,7 +2112,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2178,7 +2178,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2186,7 +2186,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ProvidersApi.ProvidersRadiusDestroy(context.Background(), id).Execute() + r, err := apiClient.ProvidersApi.ProvidersRadiusDestroy(context.Background(), id).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ProvidersApi.ProvidersRadiusDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -2246,7 +2246,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2326,7 +2326,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2398,7 +2398,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2468,7 +2468,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2540,7 +2540,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2610,7 +2610,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2676,7 +2676,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2684,7 +2684,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ProvidersApi.ProvidersSamlDestroy(context.Background(), id).Execute() + r, err := apiClient.ProvidersApi.ProvidersSamlDestroy(context.Background(), id).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ProvidersApi.ProvidersSamlDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -2744,7 +2744,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2754,7 +2754,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ProvidersApi.ProvidersSamlImportMetadataCreate(context.Background()).Name(name).AuthorizationFlow(authorizationFlow).File(file).Execute() + r, err := apiClient.ProvidersApi.ProvidersSamlImportMetadataCreate(context.Background()).Name(name).AuthorizationFlow(authorizationFlow).File(file).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ProvidersApi.ProvidersSamlImportMetadataCreate``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -2812,7 +2812,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2916,7 +2916,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2990,7 +2990,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3062,7 +3062,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3132,7 +3132,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3202,7 +3202,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3274,7 +3274,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3344,7 +3344,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3410,7 +3410,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3418,7 +3418,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ProvidersApi.ProvidersScimDestroy(context.Background(), id).Execute() + r, err := apiClient.ProvidersApi.ProvidersScimDestroy(context.Background(), id).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ProvidersApi.ProvidersScimDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -3478,7 +3478,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3558,7 +3558,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3630,7 +3630,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3700,7 +3700,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3770,7 +3770,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3842,7 +3842,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { diff --git a/docs/ProxyOutpostConfig.md b/docs/ProxyOutpostConfig.md index 81e52801f..f298b743e 100644 --- a/docs/ProxyOutpostConfig.md +++ b/docs/ProxyOutpostConfig.md @@ -11,14 +11,14 @@ Name | Type | Description | Notes **InternalHostSslValidation** | Pointer to **bool** | Validate SSL Certificates of upstream servers | [optional] **ClientId** | Pointer to **string** | | [optional] **ClientSecret** | Pointer to **string** | | [optional] -**OidcConfiguration** | [**ProxyOutpostConfigOidcConfiguration**](ProxyOutpostConfigOidcConfiguration.md) | | +**OidcConfiguration** | [**OpenIDConnectConfiguration**](OpenIDConnectConfiguration.md) | | [readonly] **CookieSecret** | Pointer to **string** | | [optional] **Certificate** | Pointer to **NullableString** | | [optional] **SkipPathRegex** | Pointer to **string** | Regular expressions for which authentication is not required. Each new line is interpreted as a new Regular Expression. | [optional] **BasicAuthEnabled** | Pointer to **bool** | Set a custom HTTP-Basic Authentication header based on values from authentik. | [optional] **BasicAuthPasswordAttribute** | Pointer to **string** | User/Group Attribute used for the password part of the HTTP-Basic Header. | [optional] **BasicAuthUserAttribute** | Pointer to **string** | User/Group Attribute used for the user part of the HTTP-Basic Header. If not set, the user's Email address is used. | [optional] -**Mode** | Pointer to [**NullableProxyMode**](ProxyMode.md) | Enable support for forwardAuth in traefik and nginx auth_request. Exclusive with internal_host. * `proxy` - Proxy * `forward_single` - Forward Single * `forward_domain` - Forward Domain | [optional] +**Mode** | Pointer to [**ProxyMode**](ProxyMode.md) | | [optional] **CookieDomain** | Pointer to **string** | | [optional] **AccessTokenValidity** | **NullableFloat64** | Get token validity as second count | [readonly] **InterceptHeaderAuth** | Pointer to **bool** | When enabled, this provider will intercept the authorization header and authenticate requests based on its value. | [optional] @@ -30,7 +30,7 @@ Name | Type | Description | Notes ### NewProxyOutpostConfig -`func NewProxyOutpostConfig(pk int32, name string, externalHost string, oidcConfiguration ProxyOutpostConfigOidcConfiguration, accessTokenValidity NullableFloat64, scopesToRequest []string, assignedApplicationSlug string, assignedApplicationName string, ) *ProxyOutpostConfig` +`func NewProxyOutpostConfig(pk int32, name string, externalHost string, oidcConfiguration OpenIDConnectConfiguration, accessTokenValidity NullableFloat64, scopesToRequest []string, assignedApplicationSlug string, assignedApplicationName string, ) *ProxyOutpostConfig` NewProxyOutpostConfig instantiates a new ProxyOutpostConfig object This constructor will assign default values to properties that have it defined, @@ -207,20 +207,20 @@ HasClientSecret returns a boolean if a field has been set. ### GetOidcConfiguration -`func (o *ProxyOutpostConfig) GetOidcConfiguration() ProxyOutpostConfigOidcConfiguration` +`func (o *ProxyOutpostConfig) GetOidcConfiguration() OpenIDConnectConfiguration` GetOidcConfiguration returns the OidcConfiguration field if non-nil, zero value otherwise. ### GetOidcConfigurationOk -`func (o *ProxyOutpostConfig) GetOidcConfigurationOk() (*ProxyOutpostConfigOidcConfiguration, bool)` +`func (o *ProxyOutpostConfig) GetOidcConfigurationOk() (*OpenIDConnectConfiguration, bool)` GetOidcConfigurationOk returns a tuple with the OidcConfiguration field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetOidcConfiguration -`func (o *ProxyOutpostConfig) SetOidcConfiguration(v ProxyOutpostConfigOidcConfiguration)` +`func (o *ProxyOutpostConfig) SetOidcConfiguration(v OpenIDConnectConfiguration)` SetOidcConfiguration sets OidcConfiguration field to given value. @@ -410,16 +410,6 @@ SetMode sets Mode field to given value. HasMode returns a boolean if a field has been set. -### SetModeNil - -`func (o *ProxyOutpostConfig) SetModeNil(b bool)` - - SetModeNil sets the value for Mode to be an explicit nil - -### UnsetMode -`func (o *ProxyOutpostConfig) UnsetMode()` - -UnsetMode ensures that no value is present for Mode, not even an explicit nil ### GetCookieDomain `func (o *ProxyOutpostConfig) GetCookieDomain() string` diff --git a/docs/ProxyOutpostConfigOidcConfiguration.md b/docs/ProxyOutpostConfigOidcConfiguration.md deleted file mode 100644 index de4599d89..000000000 --- a/docs/ProxyOutpostConfigOidcConfiguration.md +++ /dev/null @@ -1,261 +0,0 @@ -# ProxyOutpostConfigOidcConfiguration - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Issuer** | **string** | | -**AuthorizationEndpoint** | **string** | | -**TokenEndpoint** | **string** | | -**UserinfoEndpoint** | **string** | | -**EndSessionEndpoint** | **string** | | -**IntrospectionEndpoint** | **string** | | -**JwksUri** | **string** | | -**ResponseTypesSupported** | **[]string** | | -**IdTokenSigningAlgValuesSupported** | **[]string** | | -**SubjectTypesSupported** | **[]string** | | -**TokenEndpointAuthMethodsSupported** | **[]string** | | - -## Methods - -### NewProxyOutpostConfigOidcConfiguration - -`func NewProxyOutpostConfigOidcConfiguration(issuer string, authorizationEndpoint string, tokenEndpoint string, userinfoEndpoint string, endSessionEndpoint string, introspectionEndpoint string, jwksUri string, responseTypesSupported []string, idTokenSigningAlgValuesSupported []string, subjectTypesSupported []string, tokenEndpointAuthMethodsSupported []string, ) *ProxyOutpostConfigOidcConfiguration` - -NewProxyOutpostConfigOidcConfiguration instantiates a new ProxyOutpostConfigOidcConfiguration object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewProxyOutpostConfigOidcConfigurationWithDefaults - -`func NewProxyOutpostConfigOidcConfigurationWithDefaults() *ProxyOutpostConfigOidcConfiguration` - -NewProxyOutpostConfigOidcConfigurationWithDefaults instantiates a new ProxyOutpostConfigOidcConfiguration object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetIssuer - -`func (o *ProxyOutpostConfigOidcConfiguration) GetIssuer() string` - -GetIssuer returns the Issuer field if non-nil, zero value otherwise. - -### GetIssuerOk - -`func (o *ProxyOutpostConfigOidcConfiguration) GetIssuerOk() (*string, bool)` - -GetIssuerOk returns a tuple with the Issuer field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIssuer - -`func (o *ProxyOutpostConfigOidcConfiguration) SetIssuer(v string)` - -SetIssuer sets Issuer field to given value. - - -### GetAuthorizationEndpoint - -`func (o *ProxyOutpostConfigOidcConfiguration) GetAuthorizationEndpoint() string` - -GetAuthorizationEndpoint returns the AuthorizationEndpoint field if non-nil, zero value otherwise. - -### GetAuthorizationEndpointOk - -`func (o *ProxyOutpostConfigOidcConfiguration) GetAuthorizationEndpointOk() (*string, bool)` - -GetAuthorizationEndpointOk returns a tuple with the AuthorizationEndpoint field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAuthorizationEndpoint - -`func (o *ProxyOutpostConfigOidcConfiguration) SetAuthorizationEndpoint(v string)` - -SetAuthorizationEndpoint sets AuthorizationEndpoint field to given value. - - -### GetTokenEndpoint - -`func (o *ProxyOutpostConfigOidcConfiguration) GetTokenEndpoint() string` - -GetTokenEndpoint returns the TokenEndpoint field if non-nil, zero value otherwise. - -### GetTokenEndpointOk - -`func (o *ProxyOutpostConfigOidcConfiguration) GetTokenEndpointOk() (*string, bool)` - -GetTokenEndpointOk returns a tuple with the TokenEndpoint field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTokenEndpoint - -`func (o *ProxyOutpostConfigOidcConfiguration) SetTokenEndpoint(v string)` - -SetTokenEndpoint sets TokenEndpoint field to given value. - - -### GetUserinfoEndpoint - -`func (o *ProxyOutpostConfigOidcConfiguration) GetUserinfoEndpoint() string` - -GetUserinfoEndpoint returns the UserinfoEndpoint field if non-nil, zero value otherwise. - -### GetUserinfoEndpointOk - -`func (o *ProxyOutpostConfigOidcConfiguration) GetUserinfoEndpointOk() (*string, bool)` - -GetUserinfoEndpointOk returns a tuple with the UserinfoEndpoint field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUserinfoEndpoint - -`func (o *ProxyOutpostConfigOidcConfiguration) SetUserinfoEndpoint(v string)` - -SetUserinfoEndpoint sets UserinfoEndpoint field to given value. - - -### GetEndSessionEndpoint - -`func (o *ProxyOutpostConfigOidcConfiguration) GetEndSessionEndpoint() string` - -GetEndSessionEndpoint returns the EndSessionEndpoint field if non-nil, zero value otherwise. - -### GetEndSessionEndpointOk - -`func (o *ProxyOutpostConfigOidcConfiguration) GetEndSessionEndpointOk() (*string, bool)` - -GetEndSessionEndpointOk returns a tuple with the EndSessionEndpoint field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEndSessionEndpoint - -`func (o *ProxyOutpostConfigOidcConfiguration) SetEndSessionEndpoint(v string)` - -SetEndSessionEndpoint sets EndSessionEndpoint field to given value. - - -### GetIntrospectionEndpoint - -`func (o *ProxyOutpostConfigOidcConfiguration) GetIntrospectionEndpoint() string` - -GetIntrospectionEndpoint returns the IntrospectionEndpoint field if non-nil, zero value otherwise. - -### GetIntrospectionEndpointOk - -`func (o *ProxyOutpostConfigOidcConfiguration) GetIntrospectionEndpointOk() (*string, bool)` - -GetIntrospectionEndpointOk returns a tuple with the IntrospectionEndpoint field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIntrospectionEndpoint - -`func (o *ProxyOutpostConfigOidcConfiguration) SetIntrospectionEndpoint(v string)` - -SetIntrospectionEndpoint sets IntrospectionEndpoint field to given value. - - -### GetJwksUri - -`func (o *ProxyOutpostConfigOidcConfiguration) GetJwksUri() string` - -GetJwksUri returns the JwksUri field if non-nil, zero value otherwise. - -### GetJwksUriOk - -`func (o *ProxyOutpostConfigOidcConfiguration) GetJwksUriOk() (*string, bool)` - -GetJwksUriOk returns a tuple with the JwksUri field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetJwksUri - -`func (o *ProxyOutpostConfigOidcConfiguration) SetJwksUri(v string)` - -SetJwksUri sets JwksUri field to given value. - - -### GetResponseTypesSupported - -`func (o *ProxyOutpostConfigOidcConfiguration) GetResponseTypesSupported() []string` - -GetResponseTypesSupported returns the ResponseTypesSupported field if non-nil, zero value otherwise. - -### GetResponseTypesSupportedOk - -`func (o *ProxyOutpostConfigOidcConfiguration) GetResponseTypesSupportedOk() (*[]string, bool)` - -GetResponseTypesSupportedOk returns a tuple with the ResponseTypesSupported field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetResponseTypesSupported - -`func (o *ProxyOutpostConfigOidcConfiguration) SetResponseTypesSupported(v []string)` - -SetResponseTypesSupported sets ResponseTypesSupported field to given value. - - -### GetIdTokenSigningAlgValuesSupported - -`func (o *ProxyOutpostConfigOidcConfiguration) GetIdTokenSigningAlgValuesSupported() []string` - -GetIdTokenSigningAlgValuesSupported returns the IdTokenSigningAlgValuesSupported field if non-nil, zero value otherwise. - -### GetIdTokenSigningAlgValuesSupportedOk - -`func (o *ProxyOutpostConfigOidcConfiguration) GetIdTokenSigningAlgValuesSupportedOk() (*[]string, bool)` - -GetIdTokenSigningAlgValuesSupportedOk returns a tuple with the IdTokenSigningAlgValuesSupported field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIdTokenSigningAlgValuesSupported - -`func (o *ProxyOutpostConfigOidcConfiguration) SetIdTokenSigningAlgValuesSupported(v []string)` - -SetIdTokenSigningAlgValuesSupported sets IdTokenSigningAlgValuesSupported field to given value. - - -### GetSubjectTypesSupported - -`func (o *ProxyOutpostConfigOidcConfiguration) GetSubjectTypesSupported() []string` - -GetSubjectTypesSupported returns the SubjectTypesSupported field if non-nil, zero value otherwise. - -### GetSubjectTypesSupportedOk - -`func (o *ProxyOutpostConfigOidcConfiguration) GetSubjectTypesSupportedOk() (*[]string, bool)` - -GetSubjectTypesSupportedOk returns a tuple with the SubjectTypesSupported field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSubjectTypesSupported - -`func (o *ProxyOutpostConfigOidcConfiguration) SetSubjectTypesSupported(v []string)` - -SetSubjectTypesSupported sets SubjectTypesSupported field to given value. - - -### GetTokenEndpointAuthMethodsSupported - -`func (o *ProxyOutpostConfigOidcConfiguration) GetTokenEndpointAuthMethodsSupported() []string` - -GetTokenEndpointAuthMethodsSupported returns the TokenEndpointAuthMethodsSupported field if non-nil, zero value otherwise. - -### GetTokenEndpointAuthMethodsSupportedOk - -`func (o *ProxyOutpostConfigOidcConfiguration) GetTokenEndpointAuthMethodsSupportedOk() (*[]string, bool)` - -GetTokenEndpointAuthMethodsSupportedOk returns a tuple with the TokenEndpointAuthMethodsSupported field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTokenEndpointAuthMethodsSupported - -`func (o *ProxyOutpostConfigOidcConfiguration) SetTokenEndpointAuthMethodsSupported(v []string)` - -SetTokenEndpointAuthMethodsSupported sets TokenEndpointAuthMethodsSupported field to given value. - - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ProxyProvider.md b/docs/ProxyProvider.md index 3597773e5..cfc8ff9f0 100644 --- a/docs/ProxyProvider.md +++ b/docs/ProxyProvider.md @@ -24,7 +24,7 @@ Name | Type | Description | Notes **BasicAuthEnabled** | Pointer to **bool** | Set a custom HTTP-Basic Authentication header based on values from authentik. | [optional] **BasicAuthPasswordAttribute** | Pointer to **string** | User/Group Attribute used for the password part of the HTTP-Basic Header. | [optional] **BasicAuthUserAttribute** | Pointer to **string** | User/Group Attribute used for the user part of the HTTP-Basic Header. If not set, the user's Email address is used. | [optional] -**Mode** | Pointer to [**NullableProxyMode**](ProxyMode.md) | Enable support for forwardAuth in traefik and nginx auth_request. Exclusive with internal_host. * `proxy` - Proxy * `forward_single` - Forward Single * `forward_domain` - Forward Domain | [optional] +**Mode** | Pointer to [**ProxyMode**](ProxyMode.md) | | [optional] **InterceptHeaderAuth** | Pointer to **bool** | When enabled, this provider will intercept the authorization header and authenticate requests based on its value. | [optional] **RedirectUris** | **string** | | [readonly] **CookieDomain** | Pointer to **string** | | [optional] @@ -542,16 +542,6 @@ SetMode sets Mode field to given value. HasMode returns a boolean if a field has been set. -### SetModeNil - -`func (o *ProxyProvider) SetModeNil(b bool)` - - SetModeNil sets the value for Mode to be an explicit nil - -### UnsetMode -`func (o *ProxyProvider) UnsetMode()` - -UnsetMode ensures that no value is present for Mode, not even an explicit nil ### GetInterceptHeaderAuth `func (o *ProxyProvider) GetInterceptHeaderAuth() bool` diff --git a/docs/ProxyProviderRequest.md b/docs/ProxyProviderRequest.md index 19b75c388..55f8de278 100644 --- a/docs/ProxyProviderRequest.md +++ b/docs/ProxyProviderRequest.md @@ -16,7 +16,7 @@ Name | Type | Description | Notes **BasicAuthEnabled** | Pointer to **bool** | Set a custom HTTP-Basic Authentication header based on values from authentik. | [optional] **BasicAuthPasswordAttribute** | Pointer to **string** | User/Group Attribute used for the password part of the HTTP-Basic Header. | [optional] **BasicAuthUserAttribute** | Pointer to **string** | User/Group Attribute used for the user part of the HTTP-Basic Header. If not set, the user's Email address is used. | [optional] -**Mode** | Pointer to [**NullableProxyMode**](ProxyMode.md) | Enable support for forwardAuth in traefik and nginx auth_request. Exclusive with internal_host. * `proxy` - Proxy * `forward_single` - Forward Single * `forward_domain` - Forward Domain | [optional] +**Mode** | Pointer to [**ProxyMode**](ProxyMode.md) | | [optional] **InterceptHeaderAuth** | Pointer to **bool** | When enabled, this provider will intercept the authorization header and authenticate requests based on its value. | [optional] **CookieDomain** | Pointer to **string** | | [optional] **JwksSources** | Pointer to **[]string** | | [optional] @@ -372,16 +372,6 @@ SetMode sets Mode field to given value. HasMode returns a boolean if a field has been set. -### SetModeNil - -`func (o *ProxyProviderRequest) SetModeNil(b bool)` - - SetModeNil sets the value for Mode to be an explicit nil - -### UnsetMode -`func (o *ProxyProviderRequest) UnsetMode()` - -UnsetMode ensures that no value is present for Mode, not even an explicit nil ### GetInterceptHeaderAuth `func (o *ProxyProviderRequest) GetInterceptHeaderAuth() bool` diff --git a/docs/RootApi.md b/docs/RootApi.md index 35f5aad72..93603f2c2 100644 --- a/docs/RootApi.md +++ b/docs/RootApi.md @@ -25,7 +25,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { diff --git a/docs/SAMLProvider.md b/docs/SAMLProvider.md index 2abc8ee16..2fa86f182 100644 --- a/docs/SAMLProvider.md +++ b/docs/SAMLProvider.md @@ -26,7 +26,7 @@ Name | Type | Description | Notes **SignatureAlgorithm** | Pointer to [**SignatureAlgorithmEnum**](SignatureAlgorithmEnum.md) | | [optional] **SigningKp** | Pointer to **NullableString** | Keypair used to sign outgoing Responses going to the Service Provider. | [optional] **VerificationKp** | Pointer to **NullableString** | When selected, incoming assertion's Signatures will be validated against this certificate. To allow unsigned Requests, leave on default. | [optional] -**SpBinding** | Pointer to [**NullableSpBindingEnum**](SpBindingEnum.md) | This determines how authentik sends the response back to the Service Provider. * `redirect` - Redirect * `post` - Post | [optional] +**SpBinding** | Pointer to [**SpBindingEnum**](SpBindingEnum.md) | | [optional] **UrlDownloadMetadata** | **string** | Get metadata download URL | [readonly] **UrlSsoPost** | **string** | Get SSO Post URL | [readonly] **UrlSsoRedirect** | **string** | Get SSO Redirect URL | [readonly] @@ -618,16 +618,6 @@ SetSpBinding sets SpBinding field to given value. HasSpBinding returns a boolean if a field has been set. -### SetSpBindingNil - -`func (o *SAMLProvider) SetSpBindingNil(b bool)` - - SetSpBindingNil sets the value for SpBinding to be an explicit nil - -### UnsetSpBinding -`func (o *SAMLProvider) UnsetSpBinding()` - -UnsetSpBinding ensures that no value is present for SpBinding, not even an explicit nil ### GetUrlDownloadMetadata `func (o *SAMLProvider) GetUrlDownloadMetadata() string` diff --git a/docs/SAMLProviderRequest.md b/docs/SAMLProviderRequest.md index d458f86a7..65512fcbc 100644 --- a/docs/SAMLProviderRequest.md +++ b/docs/SAMLProviderRequest.md @@ -19,7 +19,7 @@ Name | Type | Description | Notes **SignatureAlgorithm** | Pointer to [**SignatureAlgorithmEnum**](SignatureAlgorithmEnum.md) | | [optional] **SigningKp** | Pointer to **NullableString** | Keypair used to sign outgoing Responses going to the Service Provider. | [optional] **VerificationKp** | Pointer to **NullableString** | When selected, incoming assertion's Signatures will be validated against this certificate. To allow unsigned Requests, leave on default. | [optional] -**SpBinding** | Pointer to [**NullableSpBindingEnum**](SpBindingEnum.md) | This determines how authentik sends the response back to the Service Provider. * `redirect` - Redirect * `post` - Post | [optional] +**SpBinding** | Pointer to [**SpBindingEnum**](SpBindingEnum.md) | | [optional] ## Methods @@ -465,16 +465,6 @@ SetSpBinding sets SpBinding field to given value. HasSpBinding returns a boolean if a field has been set. -### SetSpBindingNil - -`func (o *SAMLProviderRequest) SetSpBindingNil(b bool)` - - SetSpBindingNil sets the value for SpBinding to be an explicit nil - -### UnsetSpBinding -`func (o *SAMLProviderRequest) UnsetSpBinding()` - -UnsetSpBinding ensures that no value is present for SpBinding, not even an explicit nil [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SAMLSource.md b/docs/SAMLSource.md index 480392864..87bf8a644 100644 --- a/docs/SAMLSource.md +++ b/docs/SAMLSource.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes **VerboseNamePlural** | **string** | Return object's plural verbose_name | [readonly] **MetaModelName** | **string** | Return internal model name | [readonly] **PolicyEngineMode** | Pointer to [**PolicyEngineMode**](PolicyEngineMode.md) | | [optional] -**UserMatchingMode** | Pointer to [**NullableUserMatchingModeEnum**](UserMatchingModeEnum.md) | How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. | [optional] +**UserMatchingMode** | Pointer to [**UserMatchingModeEnum**](UserMatchingModeEnum.md) | | [optional] **Managed** | **NullableString** | Objects which are managed by authentik. These objects are created and updated automatically. This is flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. | [readonly] **UserPathTemplate** | Pointer to **string** | | [optional] **Icon** | **NullableString** | Get the URL to the Icon. If the name is /static or starts with http it is returned as-is | [readonly] @@ -24,7 +24,7 @@ Name | Type | Description | Notes **SsoUrl** | **string** | URL that the initial Login request is sent to. | **SloUrl** | Pointer to **NullableString** | Optional URL if your IDP supports Single-Logout. | [optional] **AllowIdpInitiated** | Pointer to **bool** | Allows authentication flows initiated by the IdP. This can be a security risk, as no validation of the request ID is done. | [optional] -**NameIdPolicy** | Pointer to [**NullableNameIdPolicyEnum**](NameIdPolicyEnum.md) | NameID Policy sent to the IdP. Can be unset, in which case no Policy is sent. * `urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress` - Email * `urn:oasis:names:tc:SAML:2.0:nameid-format:persistent` - Persistent * `urn:oasis:names:tc:SAML:2.0:nameid-format:X509SubjectName` - X509 * `urn:oasis:names:tc:SAML:2.0:nameid-format:WindowsDomainQualifiedName` - Windows * `urn:oasis:names:tc:SAML:2.0:nameid-format:transient` - Transient | [optional] +**NameIdPolicy** | Pointer to [**NameIdPolicyEnum**](NameIdPolicyEnum.md) | | [optional] **BindingType** | Pointer to [**BindingTypeEnum**](BindingTypeEnum.md) | | [optional] **SigningKp** | Pointer to **NullableString** | Keypair which is used to sign outgoing requests. Leave empty to disable signing. | [optional] **DigestAlgorithm** | Pointer to [**DigestAlgorithmEnum**](DigestAlgorithmEnum.md) | | [optional] @@ -335,16 +335,6 @@ SetUserMatchingMode sets UserMatchingMode field to given value. HasUserMatchingMode returns a boolean if a field has been set. -### SetUserMatchingModeNil - -`func (o *SAMLSource) SetUserMatchingModeNil(b bool)` - - SetUserMatchingModeNil sets the value for UserMatchingMode to be an explicit nil - -### UnsetUserMatchingMode -`func (o *SAMLSource) UnsetUserMatchingMode()` - -UnsetUserMatchingMode ensures that no value is present for UserMatchingMode, not even an explicit nil ### GetManaged `func (o *SAMLSource) GetManaged() string` @@ -580,16 +570,6 @@ SetNameIdPolicy sets NameIdPolicy field to given value. HasNameIdPolicy returns a boolean if a field has been set. -### SetNameIdPolicyNil - -`func (o *SAMLSource) SetNameIdPolicyNil(b bool)` - - SetNameIdPolicyNil sets the value for NameIdPolicy to be an explicit nil - -### UnsetNameIdPolicy -`func (o *SAMLSource) UnsetNameIdPolicy()` - -UnsetNameIdPolicy ensures that no value is present for NameIdPolicy, not even an explicit nil ### GetBindingType `func (o *SAMLSource) GetBindingType() BindingTypeEnum` diff --git a/docs/SAMLSourceRequest.md b/docs/SAMLSourceRequest.md index 174d6290f..284cc3d7d 100644 --- a/docs/SAMLSourceRequest.md +++ b/docs/SAMLSourceRequest.md @@ -10,14 +10,14 @@ Name | Type | Description | Notes **AuthenticationFlow** | Pointer to **NullableString** | Flow to use when authenticating existing users. | [optional] **EnrollmentFlow** | Pointer to **NullableString** | Flow to use when enrolling new users. | [optional] **PolicyEngineMode** | Pointer to [**PolicyEngineMode**](PolicyEngineMode.md) | | [optional] -**UserMatchingMode** | Pointer to [**NullableUserMatchingModeEnum**](UserMatchingModeEnum.md) | How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. | [optional] +**UserMatchingMode** | Pointer to [**UserMatchingModeEnum**](UserMatchingModeEnum.md) | | [optional] **UserPathTemplate** | Pointer to **string** | | [optional] **PreAuthenticationFlow** | **string** | Flow used before authentication. | **Issuer** | Pointer to **string** | Also known as Entity ID. Defaults the Metadata URL. | [optional] **SsoUrl** | **string** | URL that the initial Login request is sent to. | **SloUrl** | Pointer to **NullableString** | Optional URL if your IDP supports Single-Logout. | [optional] **AllowIdpInitiated** | Pointer to **bool** | Allows authentication flows initiated by the IdP. This can be a security risk, as no validation of the request ID is done. | [optional] -**NameIdPolicy** | Pointer to [**NullableNameIdPolicyEnum**](NameIdPolicyEnum.md) | NameID Policy sent to the IdP. Can be unset, in which case no Policy is sent. * `urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress` - Email * `urn:oasis:names:tc:SAML:2.0:nameid-format:persistent` - Persistent * `urn:oasis:names:tc:SAML:2.0:nameid-format:X509SubjectName` - X509 * `urn:oasis:names:tc:SAML:2.0:nameid-format:WindowsDomainQualifiedName` - Windows * `urn:oasis:names:tc:SAML:2.0:nameid-format:transient` - Transient | [optional] +**NameIdPolicy** | Pointer to [**NameIdPolicyEnum**](NameIdPolicyEnum.md) | | [optional] **BindingType** | Pointer to [**BindingTypeEnum**](BindingTypeEnum.md) | | [optional] **SigningKp** | Pointer to **NullableString** | Keypair which is used to sign outgoing requests. Leave empty to disable signing. | [optional] **DigestAlgorithm** | Pointer to [**DigestAlgorithmEnum**](DigestAlgorithmEnum.md) | | [optional] @@ -228,16 +228,6 @@ SetUserMatchingMode sets UserMatchingMode field to given value. HasUserMatchingMode returns a boolean if a field has been set. -### SetUserMatchingModeNil - -`func (o *SAMLSourceRequest) SetUserMatchingModeNil(b bool)` - - SetUserMatchingModeNil sets the value for UserMatchingMode to be an explicit nil - -### UnsetUserMatchingMode -`func (o *SAMLSourceRequest) UnsetUserMatchingMode()` - -UnsetUserMatchingMode ensures that no value is present for UserMatchingMode, not even an explicit nil ### GetUserPathTemplate `func (o *SAMLSourceRequest) GetUserPathTemplate() string` @@ -413,16 +403,6 @@ SetNameIdPolicy sets NameIdPolicy field to given value. HasNameIdPolicy returns a boolean if a field has been set. -### SetNameIdPolicyNil - -`func (o *SAMLSourceRequest) SetNameIdPolicyNil(b bool)` - - SetNameIdPolicyNil sets the value for NameIdPolicy to be an explicit nil - -### UnsetNameIdPolicy -`func (o *SAMLSourceRequest) UnsetNameIdPolicy()` - -UnsetNameIdPolicy ensures that no value is present for NameIdPolicy, not even an explicit nil ### GetBindingType `func (o *SAMLSourceRequest) GetBindingType() BindingTypeEnum` diff --git a/docs/SchemaApi.md b/docs/SchemaApi.md index 53f97cd3e..be26fa276 100644 --- a/docs/SchemaApi.md +++ b/docs/SchemaApi.md @@ -25,7 +25,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { diff --git a/docs/Source.md b/docs/Source.md index d73b1e68d..9385185c0 100644 --- a/docs/Source.md +++ b/docs/Source.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes **VerboseNamePlural** | **string** | Return object's plural verbose_name | [readonly] **MetaModelName** | **string** | Return internal model name | [readonly] **PolicyEngineMode** | Pointer to [**PolicyEngineMode**](PolicyEngineMode.md) | | [optional] -**UserMatchingMode** | Pointer to [**NullableUserMatchingModeEnum**](UserMatchingModeEnum.md) | How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. | [optional] +**UserMatchingMode** | Pointer to [**UserMatchingModeEnum**](UserMatchingModeEnum.md) | | [optional] **Managed** | **NullableString** | Objects which are managed by authentik. These objects are created and updated automatically. This is flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. | [readonly] **UserPathTemplate** | Pointer to **string** | | [optional] **Icon** | **NullableString** | Get the URL to the Icon. If the name is /static or starts with http it is returned as-is | [readonly] @@ -324,16 +324,6 @@ SetUserMatchingMode sets UserMatchingMode field to given value. HasUserMatchingMode returns a boolean if a field has been set. -### SetUserMatchingModeNil - -`func (o *Source) SetUserMatchingModeNil(b bool)` - - SetUserMatchingModeNil sets the value for UserMatchingMode to be an explicit nil - -### UnsetUserMatchingMode -`func (o *Source) UnsetUserMatchingMode()` - -UnsetUserMatchingMode ensures that no value is present for UserMatchingMode, not even an explicit nil ### GetManaged `func (o *Source) GetManaged() string` diff --git a/docs/SourceRequest.md b/docs/SourceRequest.md index 486ba02ec..2200ed217 100644 --- a/docs/SourceRequest.md +++ b/docs/SourceRequest.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **AuthenticationFlow** | Pointer to **NullableString** | Flow to use when authenticating existing users. | [optional] **EnrollmentFlow** | Pointer to **NullableString** | Flow to use when enrolling new users. | [optional] **PolicyEngineMode** | Pointer to [**PolicyEngineMode**](PolicyEngineMode.md) | | [optional] -**UserMatchingMode** | Pointer to [**NullableUserMatchingModeEnum**](UserMatchingModeEnum.md) | How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. | [optional] +**UserMatchingMode** | Pointer to [**UserMatchingModeEnum**](UserMatchingModeEnum.md) | | [optional] **UserPathTemplate** | Pointer to **string** | | [optional] ## Methods @@ -217,16 +217,6 @@ SetUserMatchingMode sets UserMatchingMode field to given value. HasUserMatchingMode returns a boolean if a field has been set. -### SetUserMatchingModeNil - -`func (o *SourceRequest) SetUserMatchingModeNil(b bool)` - - SetUserMatchingModeNil sets the value for UserMatchingMode to be an explicit nil - -### UnsetUserMatchingMode -`func (o *SourceRequest) UnsetUserMatchingMode()` - -UnsetUserMatchingMode ensures that no value is present for UserMatchingMode, not even an explicit nil ### GetUserPathTemplate `func (o *SourceRequest) GetUserPathTemplate() string` diff --git a/docs/SourcesApi.md b/docs/SourcesApi.md index f13355ded..b02db96f6 100644 --- a/docs/SourcesApi.md +++ b/docs/SourcesApi.md @@ -93,7 +93,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -101,7 +101,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SourcesApi.SourcesAllDestroy(context.Background(), slug).Execute() + r, err := apiClient.SourcesApi.SourcesAllDestroy(context.Background(), slug).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `SourcesApi.SourcesAllDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -161,7 +161,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -239,7 +239,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -309,7 +309,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -319,7 +319,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SourcesApi.SourcesAllSetIconCreate(context.Background(), slug).File(file).Clear(clear).Execute() + r, err := apiClient.SourcesApi.SourcesAllSetIconCreate(context.Background(), slug).File(file).Clear(clear).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `SourcesApi.SourcesAllSetIconCreate``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -381,7 +381,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -390,7 +390,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SourcesApi.SourcesAllSetIconUrlCreate(context.Background(), slug).FilePathRequest(filePathRequest).Execute() + r, err := apiClient.SourcesApi.SourcesAllSetIconUrlCreate(context.Background(), slug).FilePathRequest(filePathRequest).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `SourcesApi.SourcesAllSetIconUrlCreate``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -451,7 +451,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -512,7 +512,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -582,7 +582,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -643,7 +643,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -709,7 +709,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -779,7 +779,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -787,7 +787,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SourcesApi.SourcesLdapDestroy(context.Background(), slug).Execute() + r, err := apiClient.SourcesApi.SourcesLdapDestroy(context.Background(), slug).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `SourcesApi.SourcesLdapDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -847,7 +847,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -959,7 +959,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1031,7 +1031,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1101,7 +1101,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1171,7 +1171,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1243,7 +1243,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1313,7 +1313,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1379,7 +1379,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1387,7 +1387,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SourcesApi.SourcesOauthDestroy(context.Background(), slug).Execute() + r, err := apiClient.SourcesApi.SourcesOauthDestroy(context.Background(), slug).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `SourcesApi.SourcesOauthDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -1447,7 +1447,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1549,7 +1549,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1621,7 +1621,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1691,7 +1691,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1757,7 +1757,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1829,7 +1829,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1899,7 +1899,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1965,7 +1965,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1973,7 +1973,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SourcesApi.SourcesPlexDestroy(context.Background(), slug).Execute() + r, err := apiClient.SourcesApi.SourcesPlexDestroy(context.Background(), slug).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `SourcesApi.SourcesPlexDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -2033,7 +2033,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2123,7 +2123,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2195,7 +2195,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2204,7 +2204,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SourcesApi.SourcesPlexRedeemTokenAuthenticatedCreate(context.Background()).PlexTokenRedeemRequest(plexTokenRedeemRequest).Slug(slug).Execute() + r, err := apiClient.SourcesApi.SourcesPlexRedeemTokenAuthenticatedCreate(context.Background()).PlexTokenRedeemRequest(plexTokenRedeemRequest).Slug(slug).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `SourcesApi.SourcesPlexRedeemTokenAuthenticatedCreate``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -2261,7 +2261,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2329,7 +2329,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2399,7 +2399,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2471,7 +2471,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2541,7 +2541,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2607,7 +2607,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2615,7 +2615,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SourcesApi.SourcesSamlDestroy(context.Background(), slug).Execute() + r, err := apiClient.SourcesApi.SourcesSamlDestroy(context.Background(), slug).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `SourcesApi.SourcesSamlDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -2675,7 +2675,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2785,7 +2785,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2855,7 +2855,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2927,7 +2927,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2997,7 +2997,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3069,7 +3069,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3139,7 +3139,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3147,7 +3147,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SourcesApi.SourcesUserConnectionsAllDestroy(context.Background(), id).Execute() + r, err := apiClient.SourcesApi.SourcesUserConnectionsAllDestroy(context.Background(), id).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `SourcesApi.SourcesUserConnectionsAllDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -3207,7 +3207,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3281,7 +3281,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3351,7 +3351,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3421,7 +3421,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3491,7 +3491,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3561,7 +3561,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3627,7 +3627,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3635,7 +3635,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SourcesApi.SourcesUserConnectionsOauthDestroy(context.Background(), id).Execute() + r, err := apiClient.SourcesApi.SourcesUserConnectionsOauthDestroy(context.Background(), id).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `SourcesApi.SourcesUserConnectionsOauthDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -3695,7 +3695,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3769,7 +3769,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3841,7 +3841,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3911,7 +3911,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3983,7 +3983,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -4053,7 +4053,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -4119,7 +4119,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -4127,7 +4127,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SourcesApi.SourcesUserConnectionsPlexDestroy(context.Background(), id).Execute() + r, err := apiClient.SourcesApi.SourcesUserConnectionsPlexDestroy(context.Background(), id).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `SourcesApi.SourcesUserConnectionsPlexDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -4187,7 +4187,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -4261,7 +4261,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -4333,7 +4333,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -4403,7 +4403,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -4475,7 +4475,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -4545,7 +4545,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -4611,7 +4611,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -4619,7 +4619,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SourcesApi.SourcesUserConnectionsSamlDestroy(context.Background(), id).Execute() + r, err := apiClient.SourcesApi.SourcesUserConnectionsSamlDestroy(context.Background(), id).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `SourcesApi.SourcesUserConnectionsSamlDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -4679,7 +4679,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -4753,7 +4753,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -4825,7 +4825,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -4895,7 +4895,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -4967,7 +4967,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { diff --git a/docs/StagesApi.md b/docs/StagesApi.md index f1eedc0e8..bbd5f6502 100644 --- a/docs/StagesApi.md +++ b/docs/StagesApi.md @@ -182,7 +182,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -190,7 +190,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.StagesApi.StagesAllDestroy(context.Background(), stageUuid).Execute() + r, err := apiClient.StagesApi.StagesAllDestroy(context.Background(), stageUuid).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `StagesApi.StagesAllDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -250,7 +250,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -324,7 +324,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -394,7 +394,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -455,7 +455,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -525,7 +525,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -586,7 +586,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -652,7 +652,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -660,7 +660,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.StagesApi.StagesAuthenticatorDuoDestroy(context.Background(), stageUuid).Execute() + r, err := apiClient.StagesApi.StagesAuthenticatorDuoDestroy(context.Background(), stageUuid).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `StagesApi.StagesAuthenticatorDuoDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -720,7 +720,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -790,7 +790,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -799,7 +799,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.StagesApi.StagesAuthenticatorDuoImportDeviceManualCreate(context.Background(), stageUuid).AuthenticatorDuoStageManualDeviceImportRequest(authenticatorDuoStageManualDeviceImportRequest).Execute() + r, err := apiClient.StagesApi.StagesAuthenticatorDuoImportDeviceManualCreate(context.Background(), stageUuid).AuthenticatorDuoStageManualDeviceImportRequest(authenticatorDuoStageManualDeviceImportRequest).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `StagesApi.StagesAuthenticatorDuoImportDeviceManualCreate``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -860,7 +860,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -930,7 +930,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1010,7 +1010,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1082,7 +1082,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1152,7 +1152,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1224,7 +1224,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1294,7 +1294,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1360,7 +1360,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1368,7 +1368,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.StagesApi.StagesAuthenticatorSmsDestroy(context.Background(), stageUuid).Execute() + r, err := apiClient.StagesApi.StagesAuthenticatorSmsDestroy(context.Background(), stageUuid).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `StagesApi.StagesAuthenticatorSmsDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -1428,7 +1428,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1522,7 +1522,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1594,7 +1594,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1664,7 +1664,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1736,7 +1736,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1806,7 +1806,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1872,7 +1872,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -1880,7 +1880,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.StagesApi.StagesAuthenticatorStaticDestroy(context.Background(), stageUuid).Execute() + r, err := apiClient.StagesApi.StagesAuthenticatorStaticDestroy(context.Background(), stageUuid).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `StagesApi.StagesAuthenticatorStaticDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -1940,7 +1940,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2020,7 +2020,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2092,7 +2092,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2162,7 +2162,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2234,7 +2234,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2304,11 +2304,11 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { - authenticatorTOTPStageRequest := *openapiclient.NewAuthenticatorTOTPStageRequest("Name_example", "TODO") // AuthenticatorTOTPStageRequest | + authenticatorTOTPStageRequest := *openapiclient.NewAuthenticatorTOTPStageRequest("Name_example", openapiclient.DigitsEnum(6)) // AuthenticatorTOTPStageRequest | configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) @@ -2370,7 +2370,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2378,7 +2378,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.StagesApi.StagesAuthenticatorTotpDestroy(context.Background(), stageUuid).Execute() + r, err := apiClient.StagesApi.StagesAuthenticatorTotpDestroy(context.Background(), stageUuid).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `StagesApi.StagesAuthenticatorTotpDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -2438,7 +2438,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2518,7 +2518,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2590,7 +2590,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2660,12 +2660,12 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { stageUuid := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this TOTP Authenticator Setup Stage. - authenticatorTOTPStageRequest := *openapiclient.NewAuthenticatorTOTPStageRequest("Name_example", "TODO") // AuthenticatorTOTPStageRequest | + authenticatorTOTPStageRequest := *openapiclient.NewAuthenticatorTOTPStageRequest("Name_example", openapiclient.DigitsEnum(6)) // AuthenticatorTOTPStageRequest | configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) @@ -2732,7 +2732,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2802,7 +2802,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2868,7 +2868,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -2876,7 +2876,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.StagesApi.StagesAuthenticatorValidateDestroy(context.Background(), stageUuid).Execute() + r, err := apiClient.StagesApi.StagesAuthenticatorValidateDestroy(context.Background(), stageUuid).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `StagesApi.StagesAuthenticatorValidateDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -2936,7 +2936,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3014,7 +3014,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3086,7 +3086,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3156,7 +3156,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3228,7 +3228,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3298,7 +3298,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3364,7 +3364,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3372,7 +3372,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.StagesApi.StagesAuthenticatorWebauthnDestroy(context.Background(), stageUuid).Execute() + r, err := apiClient.StagesApi.StagesAuthenticatorWebauthnDestroy(context.Background(), stageUuid).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `StagesApi.StagesAuthenticatorWebauthnDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -3432,7 +3432,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3516,7 +3516,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3588,7 +3588,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3658,7 +3658,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3730,7 +3730,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3800,7 +3800,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3866,7 +3866,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -3874,7 +3874,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.StagesApi.StagesCaptchaDestroy(context.Background(), stageUuid).Execute() + r, err := apiClient.StagesApi.StagesCaptchaDestroy(context.Background(), stageUuid).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `StagesApi.StagesCaptchaDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -3934,7 +3934,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -4010,7 +4010,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -4082,7 +4082,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -4152,7 +4152,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -4224,7 +4224,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -4294,7 +4294,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -4360,7 +4360,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -4368,7 +4368,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.StagesApi.StagesConsentDestroy(context.Background(), stageUuid).Execute() + r, err := apiClient.StagesApi.StagesConsentDestroy(context.Background(), stageUuid).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `StagesApi.StagesConsentDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -4428,7 +4428,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -4508,7 +4508,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -4580,7 +4580,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -4650,7 +4650,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -4722,7 +4722,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -4792,7 +4792,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -4858,7 +4858,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -4866,7 +4866,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.StagesApi.StagesDenyDestroy(context.Background(), stageUuid).Execute() + r, err := apiClient.StagesApi.StagesDenyDestroy(context.Background(), stageUuid).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `StagesApi.StagesDenyDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -4926,7 +4926,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -5002,7 +5002,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -5074,7 +5074,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -5144,7 +5144,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -5216,7 +5216,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -5286,7 +5286,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -5352,7 +5352,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -5360,7 +5360,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.StagesApi.StagesDummyDestroy(context.Background(), stageUuid).Execute() + r, err := apiClient.StagesApi.StagesDummyDestroy(context.Background(), stageUuid).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `StagesApi.StagesDummyDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -5420,7 +5420,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -5498,7 +5498,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -5570,7 +5570,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -5640,7 +5640,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -5712,7 +5712,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -5782,7 +5782,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -5848,7 +5848,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -5856,7 +5856,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.StagesApi.StagesEmailDestroy(context.Background(), stageUuid).Execute() + r, err := apiClient.StagesApi.StagesEmailDestroy(context.Background(), stageUuid).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `StagesApi.StagesEmailDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -5916,7 +5916,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -6014,7 +6014,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -6086,7 +6086,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -6156,7 +6156,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -6217,7 +6217,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -6289,7 +6289,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -6359,7 +6359,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -6425,7 +6425,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -6433,7 +6433,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.StagesApi.StagesIdentificationDestroy(context.Background(), stageUuid).Execute() + r, err := apiClient.StagesApi.StagesIdentificationDestroy(context.Background(), stageUuid).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `StagesApi.StagesIdentificationDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -6493,7 +6493,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -6581,7 +6581,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -6653,7 +6653,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -6723,7 +6723,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -6795,7 +6795,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -6865,7 +6865,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -6931,7 +6931,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -6939,7 +6939,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.StagesApi.StagesInvitationInvitationsDestroy(context.Background(), inviteUuid).Execute() + r, err := apiClient.StagesApi.StagesInvitationInvitationsDestroy(context.Background(), inviteUuid).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `StagesApi.StagesInvitationInvitationsDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -7000,7 +7000,7 @@ import ( "fmt" "os" "time" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -7080,7 +7080,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -7152,7 +7152,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -7222,7 +7222,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -7294,7 +7294,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -7364,7 +7364,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -7430,7 +7430,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -7438,7 +7438,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.StagesApi.StagesInvitationStagesDestroy(context.Background(), stageUuid).Execute() + r, err := apiClient.StagesApi.StagesInvitationStagesDestroy(context.Background(), stageUuid).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `StagesApi.StagesInvitationStagesDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -7498,7 +7498,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -7578,7 +7578,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -7650,7 +7650,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -7720,7 +7720,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -7792,7 +7792,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -7862,7 +7862,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -7928,7 +7928,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -7936,7 +7936,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.StagesApi.StagesPasswordDestroy(context.Background(), stageUuid).Execute() + r, err := apiClient.StagesApi.StagesPasswordDestroy(context.Background(), stageUuid).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `StagesApi.StagesPasswordDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -7996,7 +7996,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -8074,7 +8074,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -8146,7 +8146,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -8216,7 +8216,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -8288,7 +8288,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -8358,7 +8358,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -8424,7 +8424,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -8432,7 +8432,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.StagesApi.StagesPromptPromptsDestroy(context.Background(), promptUuid).Execute() + r, err := apiClient.StagesApi.StagesPromptPromptsDestroy(context.Background(), promptUuid).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `StagesApi.StagesPromptPromptsDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -8492,7 +8492,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -8574,7 +8574,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -8646,7 +8646,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -8712,7 +8712,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -8782,7 +8782,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -8854,7 +8854,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -8924,7 +8924,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -8990,7 +8990,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -8998,7 +8998,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.StagesApi.StagesPromptStagesDestroy(context.Background(), stageUuid).Execute() + r, err := apiClient.StagesApi.StagesPromptStagesDestroy(context.Background(), stageUuid).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `StagesApi.StagesPromptStagesDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -9058,7 +9058,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -9138,7 +9138,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -9210,7 +9210,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -9280,7 +9280,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -9352,7 +9352,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -9422,7 +9422,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -9488,7 +9488,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -9496,7 +9496,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.StagesApi.StagesUserDeleteDestroy(context.Background(), stageUuid).Execute() + r, err := apiClient.StagesApi.StagesUserDeleteDestroy(context.Background(), stageUuid).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `StagesApi.StagesUserDeleteDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -9556,7 +9556,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -9632,7 +9632,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -9704,7 +9704,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -9774,7 +9774,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -9846,7 +9846,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -9916,7 +9916,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -9982,7 +9982,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -9990,7 +9990,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.StagesApi.StagesUserLoginDestroy(context.Background(), stageUuid).Execute() + r, err := apiClient.StagesApi.StagesUserLoginDestroy(context.Background(), stageUuid).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `StagesApi.StagesUserLoginDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -10050,7 +10050,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -10132,7 +10132,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -10204,7 +10204,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -10274,7 +10274,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -10346,7 +10346,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -10416,7 +10416,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -10482,7 +10482,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -10490,7 +10490,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.StagesApi.StagesUserLogoutDestroy(context.Background(), stageUuid).Execute() + r, err := apiClient.StagesApi.StagesUserLogoutDestroy(context.Background(), stageUuid).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `StagesApi.StagesUserLogoutDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -10550,7 +10550,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -10626,7 +10626,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -10698,7 +10698,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -10768,7 +10768,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -10840,7 +10840,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -10910,7 +10910,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -10976,7 +10976,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -10984,7 +10984,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.StagesApi.StagesUserWriteDestroy(context.Background(), stageUuid).Execute() + r, err := apiClient.StagesApi.StagesUserWriteDestroy(context.Background(), stageUuid).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `StagesApi.StagesUserWriteDestroy``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -11044,7 +11044,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -11128,7 +11128,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -11200,7 +11200,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -11270,7 +11270,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { @@ -11342,7 +11342,7 @@ import ( "context" "fmt" "os" - openapiclient "./openapi" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func main() { diff --git a/docs/Token.md b/docs/Token.md index 076035c00..c0495d3cf 100644 --- a/docs/Token.md +++ b/docs/Token.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **Identifier** | **string** | | **Intent** | Pointer to [**IntentEnum**](IntentEnum.md) | | [optional] **User** | Pointer to **int32** | | [optional] -**UserObj** | [**PolicyBindingUserObj**](PolicyBindingUserObj.md) | | +**UserObj** | [**User**](User.md) | | [readonly] **Description** | Pointer to **string** | | [optional] **Expires** | Pointer to **time.Time** | | [optional] **Expiring** | Pointer to **bool** | | [optional] @@ -18,7 +18,7 @@ Name | Type | Description | Notes ### NewToken -`func NewToken(pk string, identifier string, userObj PolicyBindingUserObj, ) *Token` +`func NewToken(pk string, identifier string, userObj User, ) *Token` NewToken instantiates a new Token object This constructor will assign default values to properties that have it defined, @@ -160,20 +160,20 @@ HasUser returns a boolean if a field has been set. ### GetUserObj -`func (o *Token) GetUserObj() PolicyBindingUserObj` +`func (o *Token) GetUserObj() User` GetUserObj returns the UserObj field if non-nil, zero value otherwise. ### GetUserObjOk -`func (o *Token) GetUserObjOk() (*PolicyBindingUserObj, bool)` +`func (o *Token) GetUserObjOk() (*User, bool)` GetUserObjOk returns a tuple with the UserObj field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetUserObj -`func (o *Token) SetUserObj(v PolicyBindingUserObj)` +`func (o *Token) SetUserObj(v User)` SetUserObj sets UserObj field to given value. diff --git a/docs/UserOAuthSourceConnection.md b/docs/UserOAuthSourceConnection.md index 6e0ea5cd9..cdb3a625b 100644 --- a/docs/UserOAuthSourceConnection.md +++ b/docs/UserOAuthSourceConnection.md @@ -6,14 +6,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Pk** | **int32** | | [readonly] **User** | **int32** | | -**Source** | [**PlexSourceConnectionSource**](PlexSourceConnectionSource.md) | | +**Source** | [**Source**](Source.md) | | [readonly] **Identifier** | **string** | | ## Methods ### NewUserOAuthSourceConnection -`func NewUserOAuthSourceConnection(pk int32, user int32, source PlexSourceConnectionSource, identifier string, ) *UserOAuthSourceConnection` +`func NewUserOAuthSourceConnection(pk int32, user int32, source Source, identifier string, ) *UserOAuthSourceConnection` NewUserOAuthSourceConnection instantiates a new UserOAuthSourceConnection object This constructor will assign default values to properties that have it defined, @@ -70,20 +70,20 @@ SetUser sets User field to given value. ### GetSource -`func (o *UserOAuthSourceConnection) GetSource() PlexSourceConnectionSource` +`func (o *UserOAuthSourceConnection) GetSource() Source` GetSource returns the Source field if non-nil, zero value otherwise. ### GetSourceOk -`func (o *UserOAuthSourceConnection) GetSourceOk() (*PlexSourceConnectionSource, bool)` +`func (o *UserOAuthSourceConnection) GetSourceOk() (*Source, bool)` GetSourceOk returns a tuple with the Source field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSource -`func (o *UserOAuthSourceConnection) SetSource(v PlexSourceConnectionSource)` +`func (o *UserOAuthSourceConnection) SetSource(v Source)` SetSource sets Source field to given value. diff --git a/docs/UserSAMLSourceConnection.md b/docs/UserSAMLSourceConnection.md index a601d8b2c..c4756e10f 100644 --- a/docs/UserSAMLSourceConnection.md +++ b/docs/UserSAMLSourceConnection.md @@ -6,14 +6,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Pk** | **int32** | | [readonly] **User** | **int32** | | -**Source** | [**PlexSourceConnectionSource**](PlexSourceConnectionSource.md) | | +**Source** | [**Source**](Source.md) | | [readonly] **Identifier** | **string** | | ## Methods ### NewUserSAMLSourceConnection -`func NewUserSAMLSourceConnection(pk int32, user int32, source PlexSourceConnectionSource, identifier string, ) *UserSAMLSourceConnection` +`func NewUserSAMLSourceConnection(pk int32, user int32, source Source, identifier string, ) *UserSAMLSourceConnection` NewUserSAMLSourceConnection instantiates a new UserSAMLSourceConnection object This constructor will assign default values to properties that have it defined, @@ -70,20 +70,20 @@ SetUser sets User field to given value. ### GetSource -`func (o *UserSAMLSourceConnection) GetSource() PlexSourceConnectionSource` +`func (o *UserSAMLSourceConnection) GetSource() Source` GetSource returns the Source field if non-nil, zero value otherwise. ### GetSourceOk -`func (o *UserSAMLSourceConnection) GetSourceOk() (*PlexSourceConnectionSource, bool)` +`func (o *UserSAMLSourceConnection) GetSourceOk() (*Source, bool)` GetSourceOk returns a tuple with the Source field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSource -`func (o *UserSAMLSourceConnection) SetSource(v PlexSourceConnectionSource)` +`func (o *UserSAMLSourceConnection) SetSource(v Source)` SetSource sets Source field to given value. diff --git a/docs/UserSourceConnection.md b/docs/UserSourceConnection.md index a42e61bb4..338aecda0 100644 --- a/docs/UserSourceConnection.md +++ b/docs/UserSourceConnection.md @@ -6,14 +6,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Pk** | **int32** | | [readonly] **User** | **int32** | | [readonly] -**Source** | [**PlexSourceConnectionSource**](PlexSourceConnectionSource.md) | | +**Source** | [**Source**](Source.md) | | [readonly] **Created** | **time.Time** | | [readonly] ## Methods ### NewUserSourceConnection -`func NewUserSourceConnection(pk int32, user int32, source PlexSourceConnectionSource, created time.Time, ) *UserSourceConnection` +`func NewUserSourceConnection(pk int32, user int32, source Source, created time.Time, ) *UserSourceConnection` NewUserSourceConnection instantiates a new UserSourceConnection object This constructor will assign default values to properties that have it defined, @@ -70,20 +70,20 @@ SetUser sets User field to given value. ### GetSource -`func (o *UserSourceConnection) GetSource() PlexSourceConnectionSource` +`func (o *UserSourceConnection) GetSource() Source` GetSource returns the Source field if non-nil, zero value otherwise. ### GetSourceOk -`func (o *UserSourceConnection) GetSourceOk() (*PlexSourceConnectionSource, bool)` +`func (o *UserSourceConnection) GetSourceOk() (*Source, bool)` GetSourceOk returns a tuple with the Source field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSource -`func (o *UserSourceConnection) SetSource(v PlexSourceConnectionSource)` +`func (o *UserSourceConnection) SetSource(v Source)` SetSource sets Source field to given value. diff --git a/go.mod b/go.mod index 8d1fe58cb..05ccbf3f1 100644 --- a/go.mod +++ b/go.mod @@ -1,10 +1,3 @@ module goauthentik.io/api/v3 go 1.15 - -require ( - cloud.google.com/go v0.65.0 // indirect - github.com/golang/protobuf v1.5.3 // indirect - golang.org/x/oauth2 v0.6.0 - google.golang.org/protobuf v1.30.0 // indirect -) diff --git a/go.sum b/go.sum index 2e581ec8b..e69de29bb 100644 --- a/go.sum +++ b/go.sum @@ -1,404 +0,0 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202 h1:VvcQYSHwXgi7W+TpUR6A9g6Up98WAHf3f/ulnJ62IyA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= -golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99 h1:5vD4XjIc0X5+kHZjx4UecYdjA6mJo+XXNoaW0EjU5Os= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.6.0 h1:Lh8GPgSKBfWSwFvtuWOfeI3aAAnbXTSutYxJiOJFgIw= -golang.org/x/oauth2 v0.6.0/go.mod h1:ycmewcwgD4Rpr3eZJLSB4Kyyljb3qDh40vJ8STE5HKw= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6 h1:lMO5rYAqUxkmaj76jAkRUvt5JZgFymx/+Q5Mzfivuhc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/model_access_denied_challenge.go b/model_access_denied_challenge.go index 99ddcf043..416c887a3 100644 --- a/model_access_denied_challenge.go +++ b/model_access_denied_challenge.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the AccessDeniedChallenge type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AccessDeniedChallenge{} + // AccessDeniedChallenge Challenge when a flow's active stage calls `stage_invalid()`. type AccessDeniedChallenge struct { Type ChallengeChoices `json:"type"` @@ -76,7 +79,7 @@ func (o *AccessDeniedChallenge) SetType(v ChallengeChoices) { // GetFlowInfo returns the FlowInfo field value if set, zero value otherwise. func (o *AccessDeniedChallenge) GetFlowInfo() ContextualFlowInfo { - if o == nil || o.FlowInfo == nil { + if o == nil || IsNil(o.FlowInfo) { var ret ContextualFlowInfo return ret } @@ -86,7 +89,7 @@ func (o *AccessDeniedChallenge) GetFlowInfo() ContextualFlowInfo { // GetFlowInfoOk returns a tuple with the FlowInfo field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AccessDeniedChallenge) GetFlowInfoOk() (*ContextualFlowInfo, bool) { - if o == nil || o.FlowInfo == nil { + if o == nil || IsNil(o.FlowInfo) { return nil, false } return o.FlowInfo, true @@ -94,7 +97,7 @@ func (o *AccessDeniedChallenge) GetFlowInfoOk() (*ContextualFlowInfo, bool) { // HasFlowInfo returns a boolean if a field has been set. func (o *AccessDeniedChallenge) HasFlowInfo() bool { - if o != nil && o.FlowInfo != nil { + if o != nil && !IsNil(o.FlowInfo) { return true } @@ -108,7 +111,7 @@ func (o *AccessDeniedChallenge) SetFlowInfo(v ContextualFlowInfo) { // GetComponent returns the Component field value if set, zero value otherwise. func (o *AccessDeniedChallenge) GetComponent() string { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { var ret string return ret } @@ -118,7 +121,7 @@ func (o *AccessDeniedChallenge) GetComponent() string { // GetComponentOk returns a tuple with the Component field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AccessDeniedChallenge) GetComponentOk() (*string, bool) { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { return nil, false } return o.Component, true @@ -126,7 +129,7 @@ func (o *AccessDeniedChallenge) GetComponentOk() (*string, bool) { // HasComponent returns a boolean if a field has been set. func (o *AccessDeniedChallenge) HasComponent() bool { - if o != nil && o.Component != nil { + if o != nil && !IsNil(o.Component) { return true } @@ -140,7 +143,7 @@ func (o *AccessDeniedChallenge) SetComponent(v string) { // GetResponseErrors returns the ResponseErrors field value if set, zero value otherwise. func (o *AccessDeniedChallenge) GetResponseErrors() map[string][]ErrorDetail { - if o == nil || o.ResponseErrors == nil { + if o == nil || IsNil(o.ResponseErrors) { var ret map[string][]ErrorDetail return ret } @@ -150,7 +153,7 @@ func (o *AccessDeniedChallenge) GetResponseErrors() map[string][]ErrorDetail { // GetResponseErrorsOk returns a tuple with the ResponseErrors field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AccessDeniedChallenge) GetResponseErrorsOk() (*map[string][]ErrorDetail, bool) { - if o == nil || o.ResponseErrors == nil { + if o == nil || IsNil(o.ResponseErrors) { return nil, false } return o.ResponseErrors, true @@ -158,7 +161,7 @@ func (o *AccessDeniedChallenge) GetResponseErrorsOk() (*map[string][]ErrorDetail // HasResponseErrors returns a boolean if a field has been set. func (o *AccessDeniedChallenge) HasResponseErrors() bool { - if o != nil && o.ResponseErrors != nil { + if o != nil && !IsNil(o.ResponseErrors) { return true } @@ -220,7 +223,7 @@ func (o *AccessDeniedChallenge) SetPendingUserAvatar(v string) { // GetErrorMessage returns the ErrorMessage field value if set, zero value otherwise. func (o *AccessDeniedChallenge) GetErrorMessage() string { - if o == nil || o.ErrorMessage == nil { + if o == nil || IsNil(o.ErrorMessage) { var ret string return ret } @@ -230,7 +233,7 @@ func (o *AccessDeniedChallenge) GetErrorMessage() string { // GetErrorMessageOk returns a tuple with the ErrorMessage field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AccessDeniedChallenge) GetErrorMessageOk() (*string, bool) { - if o == nil || o.ErrorMessage == nil { + if o == nil || IsNil(o.ErrorMessage) { return nil, false } return o.ErrorMessage, true @@ -238,7 +241,7 @@ func (o *AccessDeniedChallenge) GetErrorMessageOk() (*string, bool) { // HasErrorMessage returns a boolean if a field has been set. func (o *AccessDeniedChallenge) HasErrorMessage() bool { - if o != nil && o.ErrorMessage != nil { + if o != nil && !IsNil(o.ErrorMessage) { return true } @@ -251,29 +254,31 @@ func (o *AccessDeniedChallenge) SetErrorMessage(v string) { } func (o AccessDeniedChallenge) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["type"] = o.Type + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.FlowInfo != nil { + return json.Marshal(toSerialize) +} + +func (o AccessDeniedChallenge) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + if !IsNil(o.FlowInfo) { toSerialize["flow_info"] = o.FlowInfo } - if o.Component != nil { + if !IsNil(o.Component) { toSerialize["component"] = o.Component } - if o.ResponseErrors != nil { + if !IsNil(o.ResponseErrors) { toSerialize["response_errors"] = o.ResponseErrors } - if true { - toSerialize["pending_user"] = o.PendingUser - } - if true { - toSerialize["pending_user_avatar"] = o.PendingUserAvatar - } - if o.ErrorMessage != nil { + toSerialize["pending_user"] = o.PendingUser + toSerialize["pending_user_avatar"] = o.PendingUserAvatar + if !IsNil(o.ErrorMessage) { toSerialize["error_message"] = o.ErrorMessage } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableAccessDeniedChallenge struct { diff --git a/model_app.go b/model_app.go index 55ca92d5f..556c47e6d 100644 --- a/model_app.go +++ b/model_app.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the App type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &App{} + // App Serialize Application info type App struct { Name string `json:"name"` @@ -89,16 +92,20 @@ func (o *App) SetLabel(v string) { } func (o App) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["label"] = o.Label + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o App) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["label"] = o.Label + return toSerialize, nil +} + type NullableApp struct { value *App isSet bool diff --git a/model_apple_challenge_response_request.go b/model_apple_challenge_response_request.go index f0ffe030c..daf2e83db 100644 --- a/model_apple_challenge_response_request.go +++ b/model_apple_challenge_response_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the AppleChallengeResponseRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AppleChallengeResponseRequest{} + // AppleChallengeResponseRequest Pseudo class for plex response type AppleChallengeResponseRequest struct { Component *string `json:"component,omitempty"` @@ -43,7 +46,7 @@ func NewAppleChallengeResponseRequestWithDefaults() *AppleChallengeResponseReque // GetComponent returns the Component field value if set, zero value otherwise. func (o *AppleChallengeResponseRequest) GetComponent() string { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { var ret string return ret } @@ -53,7 +56,7 @@ func (o *AppleChallengeResponseRequest) GetComponent() string { // GetComponentOk returns a tuple with the Component field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AppleChallengeResponseRequest) GetComponentOk() (*string, bool) { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { return nil, false } return o.Component, true @@ -61,7 +64,7 @@ func (o *AppleChallengeResponseRequest) GetComponentOk() (*string, bool) { // HasComponent returns a boolean if a field has been set. func (o *AppleChallengeResponseRequest) HasComponent() bool { - if o != nil && o.Component != nil { + if o != nil && !IsNil(o.Component) { return true } @@ -74,11 +77,19 @@ func (o *AppleChallengeResponseRequest) SetComponent(v string) { } func (o AppleChallengeResponseRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AppleChallengeResponseRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Component != nil { + if !IsNil(o.Component) { toSerialize["component"] = o.Component } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableAppleChallengeResponseRequest struct { diff --git a/model_apple_login_challenge.go b/model_apple_login_challenge.go index 4bf83d5ff..f9e67c6bb 100644 --- a/model_apple_login_challenge.go +++ b/model_apple_login_challenge.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the AppleLoginChallenge type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AppleLoginChallenge{} + // AppleLoginChallenge Special challenge for apple-native authentication flow, which happens on the client. type AppleLoginChallenge struct { Type ChallengeChoices `json:"type"` @@ -79,7 +82,7 @@ func (o *AppleLoginChallenge) SetType(v ChallengeChoices) { // GetFlowInfo returns the FlowInfo field value if set, zero value otherwise. func (o *AppleLoginChallenge) GetFlowInfo() ContextualFlowInfo { - if o == nil || o.FlowInfo == nil { + if o == nil || IsNil(o.FlowInfo) { var ret ContextualFlowInfo return ret } @@ -89,7 +92,7 @@ func (o *AppleLoginChallenge) GetFlowInfo() ContextualFlowInfo { // GetFlowInfoOk returns a tuple with the FlowInfo field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AppleLoginChallenge) GetFlowInfoOk() (*ContextualFlowInfo, bool) { - if o == nil || o.FlowInfo == nil { + if o == nil || IsNil(o.FlowInfo) { return nil, false } return o.FlowInfo, true @@ -97,7 +100,7 @@ func (o *AppleLoginChallenge) GetFlowInfoOk() (*ContextualFlowInfo, bool) { // HasFlowInfo returns a boolean if a field has been set. func (o *AppleLoginChallenge) HasFlowInfo() bool { - if o != nil && o.FlowInfo != nil { + if o != nil && !IsNil(o.FlowInfo) { return true } @@ -111,7 +114,7 @@ func (o *AppleLoginChallenge) SetFlowInfo(v ContextualFlowInfo) { // GetComponent returns the Component field value if set, zero value otherwise. func (o *AppleLoginChallenge) GetComponent() string { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { var ret string return ret } @@ -121,7 +124,7 @@ func (o *AppleLoginChallenge) GetComponent() string { // GetComponentOk returns a tuple with the Component field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AppleLoginChallenge) GetComponentOk() (*string, bool) { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { return nil, false } return o.Component, true @@ -129,7 +132,7 @@ func (o *AppleLoginChallenge) GetComponentOk() (*string, bool) { // HasComponent returns a boolean if a field has been set. func (o *AppleLoginChallenge) HasComponent() bool { - if o != nil && o.Component != nil { + if o != nil && !IsNil(o.Component) { return true } @@ -143,7 +146,7 @@ func (o *AppleLoginChallenge) SetComponent(v string) { // GetResponseErrors returns the ResponseErrors field value if set, zero value otherwise. func (o *AppleLoginChallenge) GetResponseErrors() map[string][]ErrorDetail { - if o == nil || o.ResponseErrors == nil { + if o == nil || IsNil(o.ResponseErrors) { var ret map[string][]ErrorDetail return ret } @@ -153,7 +156,7 @@ func (o *AppleLoginChallenge) GetResponseErrors() map[string][]ErrorDetail { // GetResponseErrorsOk returns a tuple with the ResponseErrors field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AppleLoginChallenge) GetResponseErrorsOk() (*map[string][]ErrorDetail, bool) { - if o == nil || o.ResponseErrors == nil { + if o == nil || IsNil(o.ResponseErrors) { return nil, false } return o.ResponseErrors, true @@ -161,7 +164,7 @@ func (o *AppleLoginChallenge) GetResponseErrorsOk() (*map[string][]ErrorDetail, // HasResponseErrors returns a boolean if a field has been set. func (o *AppleLoginChallenge) HasResponseErrors() bool { - if o != nil && o.ResponseErrors != nil { + if o != nil && !IsNil(o.ResponseErrors) { return true } @@ -270,32 +273,30 @@ func (o *AppleLoginChallenge) SetState(v string) { } func (o AppleLoginChallenge) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["type"] = o.Type + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.FlowInfo != nil { + return json.Marshal(toSerialize) +} + +func (o AppleLoginChallenge) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + if !IsNil(o.FlowInfo) { toSerialize["flow_info"] = o.FlowInfo } - if o.Component != nil { + if !IsNil(o.Component) { toSerialize["component"] = o.Component } - if o.ResponseErrors != nil { + if !IsNil(o.ResponseErrors) { toSerialize["response_errors"] = o.ResponseErrors } - if true { - toSerialize["client_id"] = o.ClientId - } - if true { - toSerialize["scope"] = o.Scope - } - if true { - toSerialize["redirect_uri"] = o.RedirectUri - } - if true { - toSerialize["state"] = o.State - } - return json.Marshal(toSerialize) + toSerialize["client_id"] = o.ClientId + toSerialize["scope"] = o.Scope + toSerialize["redirect_uri"] = o.RedirectUri + toSerialize["state"] = o.State + return toSerialize, nil } type NullableAppleLoginChallenge struct { diff --git a/model_application.go b/model_application.go index a56a3733c..757384f75 100644 --- a/model_application.go +++ b/model_application.go @@ -15,15 +15,18 @@ import ( "encoding/json" ) +// checks if the Application type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Application{} + // Application Application Serializer type Application struct { Pk string `json:"pk"` // Application's display Name. Name string `json:"name"` // Internal application name, used in URLs. - Slug string `json:"slug"` - Provider NullableInt32 `json:"provider,omitempty"` - ProviderObj ApplicationProviderObj `json:"provider_obj"` + Slug string `json:"slug"` + Provider NullableInt32 `json:"provider,omitempty"` + ProviderObj Provider `json:"provider_obj"` // Allow formatting of launch URL LaunchUrl NullableString `json:"launch_url"` // Open launch URL in a new browser tab or window. @@ -41,7 +44,7 @@ type Application struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewApplication(pk string, name string, slug string, providerObj ApplicationProviderObj, launchUrl NullableString, metaIcon NullableString) *Application { +func NewApplication(pk string, name string, slug string, providerObj Provider, launchUrl NullableString, metaIcon NullableString) *Application { this := Application{} this.Pk = pk this.Name = name @@ -134,7 +137,7 @@ func (o *Application) SetSlug(v string) { // GetProvider returns the Provider field value if set, zero value otherwise (both if not set or set to explicit null). func (o *Application) GetProvider() int32 { - if o == nil || o.Provider.Get() == nil { + if o == nil || IsNil(o.Provider.Get()) { var ret int32 return ret } @@ -176,9 +179,9 @@ func (o *Application) UnsetProvider() { } // GetProviderObj returns the ProviderObj field value -func (o *Application) GetProviderObj() ApplicationProviderObj { +func (o *Application) GetProviderObj() Provider { if o == nil { - var ret ApplicationProviderObj + var ret Provider return ret } @@ -187,7 +190,7 @@ func (o *Application) GetProviderObj() ApplicationProviderObj { // GetProviderObjOk returns a tuple with the ProviderObj field value // and a boolean to check if the value has been set. -func (o *Application) GetProviderObjOk() (*ApplicationProviderObj, bool) { +func (o *Application) GetProviderObjOk() (*Provider, bool) { if o == nil { return nil, false } @@ -195,7 +198,7 @@ func (o *Application) GetProviderObjOk() (*ApplicationProviderObj, bool) { } // SetProviderObj sets field value -func (o *Application) SetProviderObj(v ApplicationProviderObj) { +func (o *Application) SetProviderObj(v Provider) { o.ProviderObj = v } @@ -227,7 +230,7 @@ func (o *Application) SetLaunchUrl(v string) { // GetOpenInNewTab returns the OpenInNewTab field value if set, zero value otherwise. func (o *Application) GetOpenInNewTab() bool { - if o == nil || o.OpenInNewTab == nil { + if o == nil || IsNil(o.OpenInNewTab) { var ret bool return ret } @@ -237,7 +240,7 @@ func (o *Application) GetOpenInNewTab() bool { // GetOpenInNewTabOk returns a tuple with the OpenInNewTab field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Application) GetOpenInNewTabOk() (*bool, bool) { - if o == nil || o.OpenInNewTab == nil { + if o == nil || IsNil(o.OpenInNewTab) { return nil, false } return o.OpenInNewTab, true @@ -245,7 +248,7 @@ func (o *Application) GetOpenInNewTabOk() (*bool, bool) { // HasOpenInNewTab returns a boolean if a field has been set. func (o *Application) HasOpenInNewTab() bool { - if o != nil && o.OpenInNewTab != nil { + if o != nil && !IsNil(o.OpenInNewTab) { return true } @@ -259,7 +262,7 @@ func (o *Application) SetOpenInNewTab(v bool) { // GetMetaLaunchUrl returns the MetaLaunchUrl field value if set, zero value otherwise. func (o *Application) GetMetaLaunchUrl() string { - if o == nil || o.MetaLaunchUrl == nil { + if o == nil || IsNil(o.MetaLaunchUrl) { var ret string return ret } @@ -269,7 +272,7 @@ func (o *Application) GetMetaLaunchUrl() string { // GetMetaLaunchUrlOk returns a tuple with the MetaLaunchUrl field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Application) GetMetaLaunchUrlOk() (*string, bool) { - if o == nil || o.MetaLaunchUrl == nil { + if o == nil || IsNil(o.MetaLaunchUrl) { return nil, false } return o.MetaLaunchUrl, true @@ -277,7 +280,7 @@ func (o *Application) GetMetaLaunchUrlOk() (*string, bool) { // HasMetaLaunchUrl returns a boolean if a field has been set. func (o *Application) HasMetaLaunchUrl() bool { - if o != nil && o.MetaLaunchUrl != nil { + if o != nil && !IsNil(o.MetaLaunchUrl) { return true } @@ -317,7 +320,7 @@ func (o *Application) SetMetaIcon(v string) { // GetMetaDescription returns the MetaDescription field value if set, zero value otherwise. func (o *Application) GetMetaDescription() string { - if o == nil || o.MetaDescription == nil { + if o == nil || IsNil(o.MetaDescription) { var ret string return ret } @@ -327,7 +330,7 @@ func (o *Application) GetMetaDescription() string { // GetMetaDescriptionOk returns a tuple with the MetaDescription field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Application) GetMetaDescriptionOk() (*string, bool) { - if o == nil || o.MetaDescription == nil { + if o == nil || IsNil(o.MetaDescription) { return nil, false } return o.MetaDescription, true @@ -335,7 +338,7 @@ func (o *Application) GetMetaDescriptionOk() (*string, bool) { // HasMetaDescription returns a boolean if a field has been set. func (o *Application) HasMetaDescription() bool { - if o != nil && o.MetaDescription != nil { + if o != nil && !IsNil(o.MetaDescription) { return true } @@ -349,7 +352,7 @@ func (o *Application) SetMetaDescription(v string) { // GetMetaPublisher returns the MetaPublisher field value if set, zero value otherwise. func (o *Application) GetMetaPublisher() string { - if o == nil || o.MetaPublisher == nil { + if o == nil || IsNil(o.MetaPublisher) { var ret string return ret } @@ -359,7 +362,7 @@ func (o *Application) GetMetaPublisher() string { // GetMetaPublisherOk returns a tuple with the MetaPublisher field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Application) GetMetaPublisherOk() (*string, bool) { - if o == nil || o.MetaPublisher == nil { + if o == nil || IsNil(o.MetaPublisher) { return nil, false } return o.MetaPublisher, true @@ -367,7 +370,7 @@ func (o *Application) GetMetaPublisherOk() (*string, bool) { // HasMetaPublisher returns a boolean if a field has been set. func (o *Application) HasMetaPublisher() bool { - if o != nil && o.MetaPublisher != nil { + if o != nil && !IsNil(o.MetaPublisher) { return true } @@ -381,7 +384,7 @@ func (o *Application) SetMetaPublisher(v string) { // GetPolicyEngineMode returns the PolicyEngineMode field value if set, zero value otherwise. func (o *Application) GetPolicyEngineMode() PolicyEngineMode { - if o == nil || o.PolicyEngineMode == nil { + if o == nil || IsNil(o.PolicyEngineMode) { var ret PolicyEngineMode return ret } @@ -391,7 +394,7 @@ func (o *Application) GetPolicyEngineMode() PolicyEngineMode { // GetPolicyEngineModeOk returns a tuple with the PolicyEngineMode field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Application) GetPolicyEngineModeOk() (*PolicyEngineMode, bool) { - if o == nil || o.PolicyEngineMode == nil { + if o == nil || IsNil(o.PolicyEngineMode) { return nil, false } return o.PolicyEngineMode, true @@ -399,7 +402,7 @@ func (o *Application) GetPolicyEngineModeOk() (*PolicyEngineMode, bool) { // HasPolicyEngineMode returns a boolean if a field has been set. func (o *Application) HasPolicyEngineMode() bool { - if o != nil && o.PolicyEngineMode != nil { + if o != nil && !IsNil(o.PolicyEngineMode) { return true } @@ -413,7 +416,7 @@ func (o *Application) SetPolicyEngineMode(v PolicyEngineMode) { // GetGroup returns the Group field value if set, zero value otherwise. func (o *Application) GetGroup() string { - if o == nil || o.Group == nil { + if o == nil || IsNil(o.Group) { var ret string return ret } @@ -423,7 +426,7 @@ func (o *Application) GetGroup() string { // GetGroupOk returns a tuple with the Group field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Application) GetGroupOk() (*string, bool) { - if o == nil || o.Group == nil { + if o == nil || IsNil(o.Group) { return nil, false } return o.Group, true @@ -431,7 +434,7 @@ func (o *Application) GetGroupOk() (*string, bool) { // HasGroup returns a boolean if a field has been set. func (o *Application) HasGroup() bool { - if o != nil && o.Group != nil { + if o != nil && !IsNil(o.Group) { return true } @@ -444,47 +447,43 @@ func (o *Application) SetGroup(v string) { } func (o Application) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["slug"] = o.Slug + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } + return json.Marshal(toSerialize) +} + +func (o Application) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name + toSerialize["slug"] = o.Slug if o.Provider.IsSet() { toSerialize["provider"] = o.Provider.Get() } - if true { - toSerialize["provider_obj"] = o.ProviderObj - } - if true { - toSerialize["launch_url"] = o.LaunchUrl.Get() - } - if o.OpenInNewTab != nil { + // skip: provider_obj is readOnly + toSerialize["launch_url"] = o.LaunchUrl.Get() + if !IsNil(o.OpenInNewTab) { toSerialize["open_in_new_tab"] = o.OpenInNewTab } - if o.MetaLaunchUrl != nil { + if !IsNil(o.MetaLaunchUrl) { toSerialize["meta_launch_url"] = o.MetaLaunchUrl } - if true { - toSerialize["meta_icon"] = o.MetaIcon.Get() - } - if o.MetaDescription != nil { + toSerialize["meta_icon"] = o.MetaIcon.Get() + if !IsNil(o.MetaDescription) { toSerialize["meta_description"] = o.MetaDescription } - if o.MetaPublisher != nil { + if !IsNil(o.MetaPublisher) { toSerialize["meta_publisher"] = o.MetaPublisher } - if o.PolicyEngineMode != nil { + if !IsNil(o.PolicyEngineMode) { toSerialize["policy_engine_mode"] = o.PolicyEngineMode } - if o.Group != nil { + if !IsNil(o.Group) { toSerialize["group"] = o.Group } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableApplication struct { diff --git a/model_application_provider_obj.go b/model_application_provider_obj.go deleted file mode 100644 index 4146d89d6..000000000 --- a/model_application_provider_obj.go +++ /dev/null @@ -1,430 +0,0 @@ -/* -authentik - -Making authentication simple. - -API version: 2023.3.1 -Contact: hello@goauthentik.io -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package api - -import ( - "encoding/json" -) - -// ApplicationProviderObj struct for ApplicationProviderObj -type ApplicationProviderObj struct { - Pk int32 `json:"pk"` - Name string `json:"name"` - // Flow used for authentication when the associated application is accessed by an un-authenticated user. - AuthenticationFlow NullableString `json:"authentication_flow,omitempty"` - // Flow used when authorizing this provider. - AuthorizationFlow string `json:"authorization_flow"` - PropertyMappings []string `json:"property_mappings,omitempty"` - // Get object component so that we know how to edit the object - Component string `json:"component"` - // Internal application name, used in URLs. - AssignedApplicationSlug string `json:"assigned_application_slug"` - // Application's display Name. - AssignedApplicationName string `json:"assigned_application_name"` - // Return object's verbose_name - VerboseName string `json:"verbose_name"` - // Return object's plural verbose_name - VerboseNamePlural string `json:"verbose_name_plural"` - // Return internal model name - MetaModelName string `json:"meta_model_name"` -} - -// NewApplicationProviderObj instantiates a new ApplicationProviderObj object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewApplicationProviderObj(pk int32, name string, authorizationFlow string, component string, assignedApplicationSlug string, assignedApplicationName string, verboseName string, verboseNamePlural string, metaModelName string) *ApplicationProviderObj { - this := ApplicationProviderObj{} - this.Pk = pk - this.Name = name - this.AuthorizationFlow = authorizationFlow - this.Component = component - this.AssignedApplicationSlug = assignedApplicationSlug - this.AssignedApplicationName = assignedApplicationName - this.VerboseName = verboseName - this.VerboseNamePlural = verboseNamePlural - this.MetaModelName = metaModelName - return &this -} - -// NewApplicationProviderObjWithDefaults instantiates a new ApplicationProviderObj object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewApplicationProviderObjWithDefaults() *ApplicationProviderObj { - this := ApplicationProviderObj{} - return &this -} - -// GetPk returns the Pk field value -func (o *ApplicationProviderObj) GetPk() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.Pk -} - -// GetPkOk returns a tuple with the Pk field value -// and a boolean to check if the value has been set. -func (o *ApplicationProviderObj) GetPkOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.Pk, true -} - -// SetPk sets field value -func (o *ApplicationProviderObj) SetPk(v int32) { - o.Pk = v -} - -// GetName returns the Name field value -func (o *ApplicationProviderObj) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *ApplicationProviderObj) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *ApplicationProviderObj) SetName(v string) { - o.Name = v -} - -// GetAuthenticationFlow returns the AuthenticationFlow field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *ApplicationProviderObj) GetAuthenticationFlow() string { - if o == nil || o.AuthenticationFlow.Get() == nil { - var ret string - return ret - } - return *o.AuthenticationFlow.Get() -} - -// GetAuthenticationFlowOk returns a tuple with the AuthenticationFlow field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ApplicationProviderObj) GetAuthenticationFlowOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.AuthenticationFlow.Get(), o.AuthenticationFlow.IsSet() -} - -// HasAuthenticationFlow returns a boolean if a field has been set. -func (o *ApplicationProviderObj) HasAuthenticationFlow() bool { - if o != nil && o.AuthenticationFlow.IsSet() { - return true - } - - return false -} - -// SetAuthenticationFlow gets a reference to the given NullableString and assigns it to the AuthenticationFlow field. -func (o *ApplicationProviderObj) SetAuthenticationFlow(v string) { - o.AuthenticationFlow.Set(&v) -} - -// SetAuthenticationFlowNil sets the value for AuthenticationFlow to be an explicit nil -func (o *ApplicationProviderObj) SetAuthenticationFlowNil() { - o.AuthenticationFlow.Set(nil) -} - -// UnsetAuthenticationFlow ensures that no value is present for AuthenticationFlow, not even an explicit nil -func (o *ApplicationProviderObj) UnsetAuthenticationFlow() { - o.AuthenticationFlow.Unset() -} - -// GetAuthorizationFlow returns the AuthorizationFlow field value -func (o *ApplicationProviderObj) GetAuthorizationFlow() string { - if o == nil { - var ret string - return ret - } - - return o.AuthorizationFlow -} - -// GetAuthorizationFlowOk returns a tuple with the AuthorizationFlow field value -// and a boolean to check if the value has been set. -func (o *ApplicationProviderObj) GetAuthorizationFlowOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.AuthorizationFlow, true -} - -// SetAuthorizationFlow sets field value -func (o *ApplicationProviderObj) SetAuthorizationFlow(v string) { - o.AuthorizationFlow = v -} - -// GetPropertyMappings returns the PropertyMappings field value if set, zero value otherwise. -func (o *ApplicationProviderObj) GetPropertyMappings() []string { - if o == nil || o.PropertyMappings == nil { - var ret []string - return ret - } - return o.PropertyMappings -} - -// GetPropertyMappingsOk returns a tuple with the PropertyMappings field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ApplicationProviderObj) GetPropertyMappingsOk() ([]string, bool) { - if o == nil || o.PropertyMappings == nil { - return nil, false - } - return o.PropertyMappings, true -} - -// HasPropertyMappings returns a boolean if a field has been set. -func (o *ApplicationProviderObj) HasPropertyMappings() bool { - if o != nil && o.PropertyMappings != nil { - return true - } - - return false -} - -// SetPropertyMappings gets a reference to the given []string and assigns it to the PropertyMappings field. -func (o *ApplicationProviderObj) SetPropertyMappings(v []string) { - o.PropertyMappings = v -} - -// GetComponent returns the Component field value -func (o *ApplicationProviderObj) GetComponent() string { - if o == nil { - var ret string - return ret - } - - return o.Component -} - -// GetComponentOk returns a tuple with the Component field value -// and a boolean to check if the value has been set. -func (o *ApplicationProviderObj) GetComponentOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Component, true -} - -// SetComponent sets field value -func (o *ApplicationProviderObj) SetComponent(v string) { - o.Component = v -} - -// GetAssignedApplicationSlug returns the AssignedApplicationSlug field value -func (o *ApplicationProviderObj) GetAssignedApplicationSlug() string { - if o == nil { - var ret string - return ret - } - - return o.AssignedApplicationSlug -} - -// GetAssignedApplicationSlugOk returns a tuple with the AssignedApplicationSlug field value -// and a boolean to check if the value has been set. -func (o *ApplicationProviderObj) GetAssignedApplicationSlugOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.AssignedApplicationSlug, true -} - -// SetAssignedApplicationSlug sets field value -func (o *ApplicationProviderObj) SetAssignedApplicationSlug(v string) { - o.AssignedApplicationSlug = v -} - -// GetAssignedApplicationName returns the AssignedApplicationName field value -func (o *ApplicationProviderObj) GetAssignedApplicationName() string { - if o == nil { - var ret string - return ret - } - - return o.AssignedApplicationName -} - -// GetAssignedApplicationNameOk returns a tuple with the AssignedApplicationName field value -// and a boolean to check if the value has been set. -func (o *ApplicationProviderObj) GetAssignedApplicationNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.AssignedApplicationName, true -} - -// SetAssignedApplicationName sets field value -func (o *ApplicationProviderObj) SetAssignedApplicationName(v string) { - o.AssignedApplicationName = v -} - -// GetVerboseName returns the VerboseName field value -func (o *ApplicationProviderObj) GetVerboseName() string { - if o == nil { - var ret string - return ret - } - - return o.VerboseName -} - -// GetVerboseNameOk returns a tuple with the VerboseName field value -// and a boolean to check if the value has been set. -func (o *ApplicationProviderObj) GetVerboseNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.VerboseName, true -} - -// SetVerboseName sets field value -func (o *ApplicationProviderObj) SetVerboseName(v string) { - o.VerboseName = v -} - -// GetVerboseNamePlural returns the VerboseNamePlural field value -func (o *ApplicationProviderObj) GetVerboseNamePlural() string { - if o == nil { - var ret string - return ret - } - - return o.VerboseNamePlural -} - -// GetVerboseNamePluralOk returns a tuple with the VerboseNamePlural field value -// and a boolean to check if the value has been set. -func (o *ApplicationProviderObj) GetVerboseNamePluralOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.VerboseNamePlural, true -} - -// SetVerboseNamePlural sets field value -func (o *ApplicationProviderObj) SetVerboseNamePlural(v string) { - o.VerboseNamePlural = v -} - -// GetMetaModelName returns the MetaModelName field value -func (o *ApplicationProviderObj) GetMetaModelName() string { - if o == nil { - var ret string - return ret - } - - return o.MetaModelName -} - -// GetMetaModelNameOk returns a tuple with the MetaModelName field value -// and a boolean to check if the value has been set. -func (o *ApplicationProviderObj) GetMetaModelNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.MetaModelName, true -} - -// SetMetaModelName sets field value -func (o *ApplicationProviderObj) SetMetaModelName(v string) { - o.MetaModelName = v -} - -func (o ApplicationProviderObj) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["name"] = o.Name - } - if o.AuthenticationFlow.IsSet() { - toSerialize["authentication_flow"] = o.AuthenticationFlow.Get() - } - if true { - toSerialize["authorization_flow"] = o.AuthorizationFlow - } - if o.PropertyMappings != nil { - toSerialize["property_mappings"] = o.PropertyMappings - } - if true { - toSerialize["component"] = o.Component - } - if true { - toSerialize["assigned_application_slug"] = o.AssignedApplicationSlug - } - if true { - toSerialize["assigned_application_name"] = o.AssignedApplicationName - } - if true { - toSerialize["verbose_name"] = o.VerboseName - } - if true { - toSerialize["verbose_name_plural"] = o.VerboseNamePlural - } - if true { - toSerialize["meta_model_name"] = o.MetaModelName - } - return json.Marshal(toSerialize) -} - -type NullableApplicationProviderObj struct { - value *ApplicationProviderObj - isSet bool -} - -func (v NullableApplicationProviderObj) Get() *ApplicationProviderObj { - return v.value -} - -func (v *NullableApplicationProviderObj) Set(val *ApplicationProviderObj) { - v.value = val - v.isSet = true -} - -func (v NullableApplicationProviderObj) IsSet() bool { - return v.isSet -} - -func (v *NullableApplicationProviderObj) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableApplicationProviderObj(val *ApplicationProviderObj) *NullableApplicationProviderObj { - return &NullableApplicationProviderObj{value: val, isSet: true} -} - -func (v NullableApplicationProviderObj) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableApplicationProviderObj) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/model_application_request.go b/model_application_request.go index 02368ae83..401516200 100644 --- a/model_application_request.go +++ b/model_application_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ApplicationRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ApplicationRequest{} + // ApplicationRequest Application Serializer type ApplicationRequest struct { // Application's display Name. @@ -100,7 +103,7 @@ func (o *ApplicationRequest) SetSlug(v string) { // GetProvider returns the Provider field value if set, zero value otherwise (both if not set or set to explicit null). func (o *ApplicationRequest) GetProvider() int32 { - if o == nil || o.Provider.Get() == nil { + if o == nil || IsNil(o.Provider.Get()) { var ret int32 return ret } @@ -143,7 +146,7 @@ func (o *ApplicationRequest) UnsetProvider() { // GetOpenInNewTab returns the OpenInNewTab field value if set, zero value otherwise. func (o *ApplicationRequest) GetOpenInNewTab() bool { - if o == nil || o.OpenInNewTab == nil { + if o == nil || IsNil(o.OpenInNewTab) { var ret bool return ret } @@ -153,7 +156,7 @@ func (o *ApplicationRequest) GetOpenInNewTab() bool { // GetOpenInNewTabOk returns a tuple with the OpenInNewTab field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ApplicationRequest) GetOpenInNewTabOk() (*bool, bool) { - if o == nil || o.OpenInNewTab == nil { + if o == nil || IsNil(o.OpenInNewTab) { return nil, false } return o.OpenInNewTab, true @@ -161,7 +164,7 @@ func (o *ApplicationRequest) GetOpenInNewTabOk() (*bool, bool) { // HasOpenInNewTab returns a boolean if a field has been set. func (o *ApplicationRequest) HasOpenInNewTab() bool { - if o != nil && o.OpenInNewTab != nil { + if o != nil && !IsNil(o.OpenInNewTab) { return true } @@ -175,7 +178,7 @@ func (o *ApplicationRequest) SetOpenInNewTab(v bool) { // GetMetaLaunchUrl returns the MetaLaunchUrl field value if set, zero value otherwise. func (o *ApplicationRequest) GetMetaLaunchUrl() string { - if o == nil || o.MetaLaunchUrl == nil { + if o == nil || IsNil(o.MetaLaunchUrl) { var ret string return ret } @@ -185,7 +188,7 @@ func (o *ApplicationRequest) GetMetaLaunchUrl() string { // GetMetaLaunchUrlOk returns a tuple with the MetaLaunchUrl field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ApplicationRequest) GetMetaLaunchUrlOk() (*string, bool) { - if o == nil || o.MetaLaunchUrl == nil { + if o == nil || IsNil(o.MetaLaunchUrl) { return nil, false } return o.MetaLaunchUrl, true @@ -193,7 +196,7 @@ func (o *ApplicationRequest) GetMetaLaunchUrlOk() (*string, bool) { // HasMetaLaunchUrl returns a boolean if a field has been set. func (o *ApplicationRequest) HasMetaLaunchUrl() bool { - if o != nil && o.MetaLaunchUrl != nil { + if o != nil && !IsNil(o.MetaLaunchUrl) { return true } @@ -207,7 +210,7 @@ func (o *ApplicationRequest) SetMetaLaunchUrl(v string) { // GetMetaDescription returns the MetaDescription field value if set, zero value otherwise. func (o *ApplicationRequest) GetMetaDescription() string { - if o == nil || o.MetaDescription == nil { + if o == nil || IsNil(o.MetaDescription) { var ret string return ret } @@ -217,7 +220,7 @@ func (o *ApplicationRequest) GetMetaDescription() string { // GetMetaDescriptionOk returns a tuple with the MetaDescription field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ApplicationRequest) GetMetaDescriptionOk() (*string, bool) { - if o == nil || o.MetaDescription == nil { + if o == nil || IsNil(o.MetaDescription) { return nil, false } return o.MetaDescription, true @@ -225,7 +228,7 @@ func (o *ApplicationRequest) GetMetaDescriptionOk() (*string, bool) { // HasMetaDescription returns a boolean if a field has been set. func (o *ApplicationRequest) HasMetaDescription() bool { - if o != nil && o.MetaDescription != nil { + if o != nil && !IsNil(o.MetaDescription) { return true } @@ -239,7 +242,7 @@ func (o *ApplicationRequest) SetMetaDescription(v string) { // GetMetaPublisher returns the MetaPublisher field value if set, zero value otherwise. func (o *ApplicationRequest) GetMetaPublisher() string { - if o == nil || o.MetaPublisher == nil { + if o == nil || IsNil(o.MetaPublisher) { var ret string return ret } @@ -249,7 +252,7 @@ func (o *ApplicationRequest) GetMetaPublisher() string { // GetMetaPublisherOk returns a tuple with the MetaPublisher field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ApplicationRequest) GetMetaPublisherOk() (*string, bool) { - if o == nil || o.MetaPublisher == nil { + if o == nil || IsNil(o.MetaPublisher) { return nil, false } return o.MetaPublisher, true @@ -257,7 +260,7 @@ func (o *ApplicationRequest) GetMetaPublisherOk() (*string, bool) { // HasMetaPublisher returns a boolean if a field has been set. func (o *ApplicationRequest) HasMetaPublisher() bool { - if o != nil && o.MetaPublisher != nil { + if o != nil && !IsNil(o.MetaPublisher) { return true } @@ -271,7 +274,7 @@ func (o *ApplicationRequest) SetMetaPublisher(v string) { // GetPolicyEngineMode returns the PolicyEngineMode field value if set, zero value otherwise. func (o *ApplicationRequest) GetPolicyEngineMode() PolicyEngineMode { - if o == nil || o.PolicyEngineMode == nil { + if o == nil || IsNil(o.PolicyEngineMode) { var ret PolicyEngineMode return ret } @@ -281,7 +284,7 @@ func (o *ApplicationRequest) GetPolicyEngineMode() PolicyEngineMode { // GetPolicyEngineModeOk returns a tuple with the PolicyEngineMode field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ApplicationRequest) GetPolicyEngineModeOk() (*PolicyEngineMode, bool) { - if o == nil || o.PolicyEngineMode == nil { + if o == nil || IsNil(o.PolicyEngineMode) { return nil, false } return o.PolicyEngineMode, true @@ -289,7 +292,7 @@ func (o *ApplicationRequest) GetPolicyEngineModeOk() (*PolicyEngineMode, bool) { // HasPolicyEngineMode returns a boolean if a field has been set. func (o *ApplicationRequest) HasPolicyEngineMode() bool { - if o != nil && o.PolicyEngineMode != nil { + if o != nil && !IsNil(o.PolicyEngineMode) { return true } @@ -303,7 +306,7 @@ func (o *ApplicationRequest) SetPolicyEngineMode(v PolicyEngineMode) { // GetGroup returns the Group field value if set, zero value otherwise. func (o *ApplicationRequest) GetGroup() string { - if o == nil || o.Group == nil { + if o == nil || IsNil(o.Group) { var ret string return ret } @@ -313,7 +316,7 @@ func (o *ApplicationRequest) GetGroup() string { // GetGroupOk returns a tuple with the Group field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ApplicationRequest) GetGroupOk() (*string, bool) { - if o == nil || o.Group == nil { + if o == nil || IsNil(o.Group) { return nil, false } return o.Group, true @@ -321,7 +324,7 @@ func (o *ApplicationRequest) GetGroupOk() (*string, bool) { // HasGroup returns a boolean if a field has been set. func (o *ApplicationRequest) HasGroup() bool { - if o != nil && o.Group != nil { + if o != nil && !IsNil(o.Group) { return true } @@ -334,35 +337,39 @@ func (o *ApplicationRequest) SetGroup(v string) { } func (o ApplicationRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["slug"] = o.Slug + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } + return json.Marshal(toSerialize) +} + +func (o ApplicationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["slug"] = o.Slug if o.Provider.IsSet() { toSerialize["provider"] = o.Provider.Get() } - if o.OpenInNewTab != nil { + if !IsNil(o.OpenInNewTab) { toSerialize["open_in_new_tab"] = o.OpenInNewTab } - if o.MetaLaunchUrl != nil { + if !IsNil(o.MetaLaunchUrl) { toSerialize["meta_launch_url"] = o.MetaLaunchUrl } - if o.MetaDescription != nil { + if !IsNil(o.MetaDescription) { toSerialize["meta_description"] = o.MetaDescription } - if o.MetaPublisher != nil { + if !IsNil(o.MetaPublisher) { toSerialize["meta_publisher"] = o.MetaPublisher } - if o.PolicyEngineMode != nil { + if !IsNil(o.PolicyEngineMode) { toSerialize["policy_engine_mode"] = o.PolicyEngineMode } - if o.Group != nil { + if !IsNil(o.Group) { toSerialize["group"] = o.Group } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableApplicationRequest struct { diff --git a/model_authenticate_web_authn_stage.go b/model_authenticate_web_authn_stage.go index af71729c3..107e91ea5 100644 --- a/model_authenticate_web_authn_stage.go +++ b/model_authenticate_web_authn_stage.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the AuthenticateWebAuthnStage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AuthenticateWebAuthnStage{} + // AuthenticateWebAuthnStage AuthenticateWebAuthnStage Serializer type AuthenticateWebAuthnStage struct { Pk string `json:"pk"` @@ -204,7 +207,7 @@ func (o *AuthenticateWebAuthnStage) SetMetaModelName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *AuthenticateWebAuthnStage) GetFlowSet() []FlowSet { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSet return ret } @@ -214,7 +217,7 @@ func (o *AuthenticateWebAuthnStage) GetFlowSet() []FlowSet { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticateWebAuthnStage) GetFlowSetOk() ([]FlowSet, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -222,7 +225,7 @@ func (o *AuthenticateWebAuthnStage) GetFlowSetOk() ([]FlowSet, bool) { // HasFlowSet returns a boolean if a field has been set. func (o *AuthenticateWebAuthnStage) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -236,7 +239,7 @@ func (o *AuthenticateWebAuthnStage) SetFlowSet(v []FlowSet) { // GetConfigureFlow returns the ConfigureFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *AuthenticateWebAuthnStage) GetConfigureFlow() string { - if o == nil || o.ConfigureFlow.Get() == nil { + if o == nil || IsNil(o.ConfigureFlow.Get()) { var ret string return ret } @@ -279,7 +282,7 @@ func (o *AuthenticateWebAuthnStage) UnsetConfigureFlow() { // GetUserVerification returns the UserVerification field value if set, zero value otherwise. func (o *AuthenticateWebAuthnStage) GetUserVerification() UserVerificationEnum { - if o == nil || o.UserVerification == nil { + if o == nil || IsNil(o.UserVerification) { var ret UserVerificationEnum return ret } @@ -289,7 +292,7 @@ func (o *AuthenticateWebAuthnStage) GetUserVerification() UserVerificationEnum { // GetUserVerificationOk returns a tuple with the UserVerification field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticateWebAuthnStage) GetUserVerificationOk() (*UserVerificationEnum, bool) { - if o == nil || o.UserVerification == nil { + if o == nil || IsNil(o.UserVerification) { return nil, false } return o.UserVerification, true @@ -297,7 +300,7 @@ func (o *AuthenticateWebAuthnStage) GetUserVerificationOk() (*UserVerificationEn // HasUserVerification returns a boolean if a field has been set. func (o *AuthenticateWebAuthnStage) HasUserVerification() bool { - if o != nil && o.UserVerification != nil { + if o != nil && !IsNil(o.UserVerification) { return true } @@ -311,7 +314,7 @@ func (o *AuthenticateWebAuthnStage) SetUserVerification(v UserVerificationEnum) // GetAuthenticatorAttachment returns the AuthenticatorAttachment field value if set, zero value otherwise (both if not set or set to explicit null). func (o *AuthenticateWebAuthnStage) GetAuthenticatorAttachment() AuthenticatorAttachmentEnum { - if o == nil || o.AuthenticatorAttachment.Get() == nil { + if o == nil || IsNil(o.AuthenticatorAttachment.Get()) { var ret AuthenticatorAttachmentEnum return ret } @@ -354,7 +357,7 @@ func (o *AuthenticateWebAuthnStage) UnsetAuthenticatorAttachment() { // GetResidentKeyRequirement returns the ResidentKeyRequirement field value if set, zero value otherwise. func (o *AuthenticateWebAuthnStage) GetResidentKeyRequirement() ResidentKeyRequirementEnum { - if o == nil || o.ResidentKeyRequirement == nil { + if o == nil || IsNil(o.ResidentKeyRequirement) { var ret ResidentKeyRequirementEnum return ret } @@ -364,7 +367,7 @@ func (o *AuthenticateWebAuthnStage) GetResidentKeyRequirement() ResidentKeyRequi // GetResidentKeyRequirementOk returns a tuple with the ResidentKeyRequirement field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticateWebAuthnStage) GetResidentKeyRequirementOk() (*ResidentKeyRequirementEnum, bool) { - if o == nil || o.ResidentKeyRequirement == nil { + if o == nil || IsNil(o.ResidentKeyRequirement) { return nil, false } return o.ResidentKeyRequirement, true @@ -372,7 +375,7 @@ func (o *AuthenticateWebAuthnStage) GetResidentKeyRequirementOk() (*ResidentKeyR // HasResidentKeyRequirement returns a boolean if a field has been set. func (o *AuthenticateWebAuthnStage) HasResidentKeyRequirement() bool { - if o != nil && o.ResidentKeyRequirement != nil { + if o != nil && !IsNil(o.ResidentKeyRequirement) { return true } @@ -385,41 +388,37 @@ func (o *AuthenticateWebAuthnStage) SetResidentKeyRequirement(v ResidentKeyRequi } func (o AuthenticateWebAuthnStage) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["component"] = o.Component - } - if true { - toSerialize["verbose_name"] = o.VerboseName - } - if true { - toSerialize["verbose_name_plural"] = o.VerboseNamePlural + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if true { - toSerialize["meta_model_name"] = o.MetaModelName - } - if o.FlowSet != nil { + return json.Marshal(toSerialize) +} + +func (o AuthenticateWebAuthnStage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name + // skip: component is readOnly + // skip: verbose_name is readOnly + // skip: verbose_name_plural is readOnly + // skip: meta_model_name is readOnly + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } if o.ConfigureFlow.IsSet() { toSerialize["configure_flow"] = o.ConfigureFlow.Get() } - if o.UserVerification != nil { + if !IsNil(o.UserVerification) { toSerialize["user_verification"] = o.UserVerification } if o.AuthenticatorAttachment.IsSet() { toSerialize["authenticator_attachment"] = o.AuthenticatorAttachment.Get() } - if o.ResidentKeyRequirement != nil { + if !IsNil(o.ResidentKeyRequirement) { toSerialize["resident_key_requirement"] = o.ResidentKeyRequirement } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableAuthenticateWebAuthnStage struct { diff --git a/model_authenticate_web_authn_stage_request.go b/model_authenticate_web_authn_stage_request.go index f9a7fb957..0bcefbf20 100644 --- a/model_authenticate_web_authn_stage_request.go +++ b/model_authenticate_web_authn_stage_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the AuthenticateWebAuthnStageRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AuthenticateWebAuthnStageRequest{} + // AuthenticateWebAuthnStageRequest AuthenticateWebAuthnStage Serializer type AuthenticateWebAuthnStageRequest struct { Name string `json:"name"` @@ -70,7 +73,7 @@ func (o *AuthenticateWebAuthnStageRequest) SetName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *AuthenticateWebAuthnStageRequest) GetFlowSet() []FlowSetRequest { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSetRequest return ret } @@ -80,7 +83,7 @@ func (o *AuthenticateWebAuthnStageRequest) GetFlowSet() []FlowSetRequest { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticateWebAuthnStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -88,7 +91,7 @@ func (o *AuthenticateWebAuthnStageRequest) GetFlowSetOk() ([]FlowSetRequest, boo // HasFlowSet returns a boolean if a field has been set. func (o *AuthenticateWebAuthnStageRequest) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -102,7 +105,7 @@ func (o *AuthenticateWebAuthnStageRequest) SetFlowSet(v []FlowSetRequest) { // GetConfigureFlow returns the ConfigureFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *AuthenticateWebAuthnStageRequest) GetConfigureFlow() string { - if o == nil || o.ConfigureFlow.Get() == nil { + if o == nil || IsNil(o.ConfigureFlow.Get()) { var ret string return ret } @@ -145,7 +148,7 @@ func (o *AuthenticateWebAuthnStageRequest) UnsetConfigureFlow() { // GetUserVerification returns the UserVerification field value if set, zero value otherwise. func (o *AuthenticateWebAuthnStageRequest) GetUserVerification() UserVerificationEnum { - if o == nil || o.UserVerification == nil { + if o == nil || IsNil(o.UserVerification) { var ret UserVerificationEnum return ret } @@ -155,7 +158,7 @@ func (o *AuthenticateWebAuthnStageRequest) GetUserVerification() UserVerificatio // GetUserVerificationOk returns a tuple with the UserVerification field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticateWebAuthnStageRequest) GetUserVerificationOk() (*UserVerificationEnum, bool) { - if o == nil || o.UserVerification == nil { + if o == nil || IsNil(o.UserVerification) { return nil, false } return o.UserVerification, true @@ -163,7 +166,7 @@ func (o *AuthenticateWebAuthnStageRequest) GetUserVerificationOk() (*UserVerific // HasUserVerification returns a boolean if a field has been set. func (o *AuthenticateWebAuthnStageRequest) HasUserVerification() bool { - if o != nil && o.UserVerification != nil { + if o != nil && !IsNil(o.UserVerification) { return true } @@ -177,7 +180,7 @@ func (o *AuthenticateWebAuthnStageRequest) SetUserVerification(v UserVerificatio // GetAuthenticatorAttachment returns the AuthenticatorAttachment field value if set, zero value otherwise (both if not set or set to explicit null). func (o *AuthenticateWebAuthnStageRequest) GetAuthenticatorAttachment() AuthenticatorAttachmentEnum { - if o == nil || o.AuthenticatorAttachment.Get() == nil { + if o == nil || IsNil(o.AuthenticatorAttachment.Get()) { var ret AuthenticatorAttachmentEnum return ret } @@ -220,7 +223,7 @@ func (o *AuthenticateWebAuthnStageRequest) UnsetAuthenticatorAttachment() { // GetResidentKeyRequirement returns the ResidentKeyRequirement field value if set, zero value otherwise. func (o *AuthenticateWebAuthnStageRequest) GetResidentKeyRequirement() ResidentKeyRequirementEnum { - if o == nil || o.ResidentKeyRequirement == nil { + if o == nil || IsNil(o.ResidentKeyRequirement) { var ret ResidentKeyRequirementEnum return ret } @@ -230,7 +233,7 @@ func (o *AuthenticateWebAuthnStageRequest) GetResidentKeyRequirement() ResidentK // GetResidentKeyRequirementOk returns a tuple with the ResidentKeyRequirement field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticateWebAuthnStageRequest) GetResidentKeyRequirementOk() (*ResidentKeyRequirementEnum, bool) { - if o == nil || o.ResidentKeyRequirement == nil { + if o == nil || IsNil(o.ResidentKeyRequirement) { return nil, false } return o.ResidentKeyRequirement, true @@ -238,7 +241,7 @@ func (o *AuthenticateWebAuthnStageRequest) GetResidentKeyRequirementOk() (*Resid // HasResidentKeyRequirement returns a boolean if a field has been set. func (o *AuthenticateWebAuthnStageRequest) HasResidentKeyRequirement() bool { - if o != nil && o.ResidentKeyRequirement != nil { + if o != nil && !IsNil(o.ResidentKeyRequirement) { return true } @@ -251,26 +254,32 @@ func (o *AuthenticateWebAuthnStageRequest) SetResidentKeyRequirement(v ResidentK } func (o AuthenticateWebAuthnStageRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.FlowSet != nil { + return json.Marshal(toSerialize) +} + +func (o AuthenticateWebAuthnStageRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } if o.ConfigureFlow.IsSet() { toSerialize["configure_flow"] = o.ConfigureFlow.Get() } - if o.UserVerification != nil { + if !IsNil(o.UserVerification) { toSerialize["user_verification"] = o.UserVerification } if o.AuthenticatorAttachment.IsSet() { toSerialize["authenticator_attachment"] = o.AuthenticatorAttachment.Get() } - if o.ResidentKeyRequirement != nil { + if !IsNil(o.ResidentKeyRequirement) { toSerialize["resident_key_requirement"] = o.ResidentKeyRequirement } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableAuthenticateWebAuthnStageRequest struct { diff --git a/model_authenticated_session.go b/model_authenticated_session.go index af276765e..387574b0f 100644 --- a/model_authenticated_session.go +++ b/model_authenticated_session.go @@ -16,6 +16,9 @@ import ( "time" ) +// checks if the AuthenticatedSession type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AuthenticatedSession{} + // AuthenticatedSession AuthenticatedSession Serializer type AuthenticatedSession struct { Uuid *string `json:"uuid,omitempty"` @@ -55,7 +58,7 @@ func NewAuthenticatedSessionWithDefaults() *AuthenticatedSession { // GetUuid returns the Uuid field value if set, zero value otherwise. func (o *AuthenticatedSession) GetUuid() string { - if o == nil || o.Uuid == nil { + if o == nil || IsNil(o.Uuid) { var ret string return ret } @@ -65,7 +68,7 @@ func (o *AuthenticatedSession) GetUuid() string { // GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatedSession) GetUuidOk() (*string, bool) { - if o == nil || o.Uuid == nil { + if o == nil || IsNil(o.Uuid) { return nil, false } return o.Uuid, true @@ -73,7 +76,7 @@ func (o *AuthenticatedSession) GetUuidOk() (*string, bool) { // HasUuid returns a boolean if a field has been set. func (o *AuthenticatedSession) HasUuid() bool { - if o != nil && o.Uuid != nil { + if o != nil && !IsNil(o.Uuid) { return true } @@ -209,7 +212,7 @@ func (o *AuthenticatedSession) SetLastIp(v string) { // GetLastUserAgent returns the LastUserAgent field value if set, zero value otherwise. func (o *AuthenticatedSession) GetLastUserAgent() string { - if o == nil || o.LastUserAgent == nil { + if o == nil || IsNil(o.LastUserAgent) { var ret string return ret } @@ -219,7 +222,7 @@ func (o *AuthenticatedSession) GetLastUserAgent() string { // GetLastUserAgentOk returns a tuple with the LastUserAgent field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatedSession) GetLastUserAgentOk() (*string, bool) { - if o == nil || o.LastUserAgent == nil { + if o == nil || IsNil(o.LastUserAgent) { return nil, false } return o.LastUserAgent, true @@ -227,7 +230,7 @@ func (o *AuthenticatedSession) GetLastUserAgentOk() (*string, bool) { // HasLastUserAgent returns a boolean if a field has been set. func (o *AuthenticatedSession) HasLastUserAgent() bool { - if o != nil && o.LastUserAgent != nil { + if o != nil && !IsNil(o.LastUserAgent) { return true } @@ -265,7 +268,7 @@ func (o *AuthenticatedSession) SetLastUsed(v time.Time) { // GetExpires returns the Expires field value if set, zero value otherwise. func (o *AuthenticatedSession) GetExpires() time.Time { - if o == nil || o.Expires == nil { + if o == nil || IsNil(o.Expires) { var ret time.Time return ret } @@ -275,7 +278,7 @@ func (o *AuthenticatedSession) GetExpires() time.Time { // GetExpiresOk returns a tuple with the Expires field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatedSession) GetExpiresOk() (*time.Time, bool) { - if o == nil || o.Expires == nil { + if o == nil || IsNil(o.Expires) { return nil, false } return o.Expires, true @@ -283,7 +286,7 @@ func (o *AuthenticatedSession) GetExpiresOk() (*time.Time, bool) { // HasExpires returns a boolean if a field has been set. func (o *AuthenticatedSession) HasExpires() bool { - if o != nil && o.Expires != nil { + if o != nil && !IsNil(o.Expires) { return true } @@ -296,35 +299,31 @@ func (o *AuthenticatedSession) SetExpires(v time.Time) { } func (o AuthenticatedSession) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AuthenticatedSession) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Uuid != nil { + if !IsNil(o.Uuid) { toSerialize["uuid"] = o.Uuid } - if true { - toSerialize["current"] = o.Current - } - if true { - toSerialize["user_agent"] = o.UserAgent - } - if true { - toSerialize["geo_ip"] = o.GeoIp.Get() - } - if true { - toSerialize["user"] = o.User - } - if true { - toSerialize["last_ip"] = o.LastIp - } - if o.LastUserAgent != nil { + // skip: current is readOnly + toSerialize["user_agent"] = o.UserAgent + toSerialize["geo_ip"] = o.GeoIp.Get() + toSerialize["user"] = o.User + toSerialize["last_ip"] = o.LastIp + if !IsNil(o.LastUserAgent) { toSerialize["last_user_agent"] = o.LastUserAgent } - if true { - toSerialize["last_used"] = o.LastUsed - } - if o.Expires != nil { + // skip: last_used is readOnly + if !IsNil(o.Expires) { toSerialize["expires"] = o.Expires } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableAuthenticatedSession struct { diff --git a/model_authenticated_session_geo_ip.go b/model_authenticated_session_geo_ip.go index 4daa807de..02685f656 100644 --- a/model_authenticated_session_geo_ip.go +++ b/model_authenticated_session_geo_ip.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the AuthenticatedSessionGeoIp type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AuthenticatedSessionGeoIp{} + // AuthenticatedSessionGeoIp Get parsed user agent type AuthenticatedSessionGeoIp struct { Continent string `json:"continent"` @@ -167,25 +170,23 @@ func (o *AuthenticatedSessionGeoIp) SetCity(v string) { } func (o AuthenticatedSessionGeoIp) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["continent"] = o.Continent - } - if true { - toSerialize["country"] = o.Country - } - if true { - toSerialize["lat"] = o.Lat - } - if true { - toSerialize["long"] = o.Long - } - if true { - toSerialize["city"] = o.City + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o AuthenticatedSessionGeoIp) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["continent"] = o.Continent + toSerialize["country"] = o.Country + toSerialize["lat"] = o.Lat + toSerialize["long"] = o.Long + toSerialize["city"] = o.City + return toSerialize, nil +} + type NullableAuthenticatedSessionGeoIp struct { value *AuthenticatedSessionGeoIp isSet bool diff --git a/model_authenticated_session_user_agent.go b/model_authenticated_session_user_agent.go index e0f85f14a..a031eb201 100644 --- a/model_authenticated_session_user_agent.go +++ b/model_authenticated_session_user_agent.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the AuthenticatedSessionUserAgent type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AuthenticatedSessionUserAgent{} + // AuthenticatedSessionUserAgent Get parsed user agent type AuthenticatedSessionUserAgent struct { Device AuthenticatedSessionUserAgentDevice `json:"device"` @@ -141,22 +144,22 @@ func (o *AuthenticatedSessionUserAgent) SetString(v string) { } func (o AuthenticatedSessionUserAgent) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["device"] = o.Device - } - if true { - toSerialize["os"] = o.Os - } - if true { - toSerialize["user_agent"] = o.UserAgent - } - if true { - toSerialize["string"] = o.String + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o AuthenticatedSessionUserAgent) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["device"] = o.Device + toSerialize["os"] = o.Os + toSerialize["user_agent"] = o.UserAgent + toSerialize["string"] = o.String + return toSerialize, nil +} + type NullableAuthenticatedSessionUserAgent struct { value *AuthenticatedSessionUserAgent isSet bool diff --git a/model_authenticated_session_user_agent_device.go b/model_authenticated_session_user_agent_device.go index 00aeb4a6c..4c7c428df 100644 --- a/model_authenticated_session_user_agent_device.go +++ b/model_authenticated_session_user_agent_device.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the AuthenticatedSessionUserAgentDevice type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AuthenticatedSessionUserAgentDevice{} + // AuthenticatedSessionUserAgentDevice User agent device type AuthenticatedSessionUserAgentDevice struct { Brand string `json:"brand"` @@ -115,19 +118,21 @@ func (o *AuthenticatedSessionUserAgentDevice) SetModel(v string) { } func (o AuthenticatedSessionUserAgentDevice) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["brand"] = o.Brand - } - if true { - toSerialize["family"] = o.Family - } - if true { - toSerialize["model"] = o.Model + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o AuthenticatedSessionUserAgentDevice) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["brand"] = o.Brand + toSerialize["family"] = o.Family + toSerialize["model"] = o.Model + return toSerialize, nil +} + type NullableAuthenticatedSessionUserAgentDevice struct { value *AuthenticatedSessionUserAgentDevice isSet bool diff --git a/model_authenticated_session_user_agent_os.go b/model_authenticated_session_user_agent_os.go index ef25867de..f7543211b 100644 --- a/model_authenticated_session_user_agent_os.go +++ b/model_authenticated_session_user_agent_os.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the AuthenticatedSessionUserAgentOs type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AuthenticatedSessionUserAgentOs{} + // AuthenticatedSessionUserAgentOs User agent os type AuthenticatedSessionUserAgentOs struct { Family string `json:"family"` @@ -167,25 +170,23 @@ func (o *AuthenticatedSessionUserAgentOs) SetPatchMinor(v string) { } func (o AuthenticatedSessionUserAgentOs) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["family"] = o.Family - } - if true { - toSerialize["major"] = o.Major - } - if true { - toSerialize["minor"] = o.Minor - } - if true { - toSerialize["patch"] = o.Patch - } - if true { - toSerialize["patch_minor"] = o.PatchMinor + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o AuthenticatedSessionUserAgentOs) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["family"] = o.Family + toSerialize["major"] = o.Major + toSerialize["minor"] = o.Minor + toSerialize["patch"] = o.Patch + toSerialize["patch_minor"] = o.PatchMinor + return toSerialize, nil +} + type NullableAuthenticatedSessionUserAgentOs struct { value *AuthenticatedSessionUserAgentOs isSet bool diff --git a/model_authenticated_session_user_agent_user_agent.go b/model_authenticated_session_user_agent_user_agent.go index c2b39fc90..2b50f8838 100644 --- a/model_authenticated_session_user_agent_user_agent.go +++ b/model_authenticated_session_user_agent_user_agent.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the AuthenticatedSessionUserAgentUserAgent type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AuthenticatedSessionUserAgentUserAgent{} + // AuthenticatedSessionUserAgentUserAgent User agent browser type AuthenticatedSessionUserAgentUserAgent struct { Family string `json:"family"` @@ -141,22 +144,22 @@ func (o *AuthenticatedSessionUserAgentUserAgent) SetPatch(v string) { } func (o AuthenticatedSessionUserAgentUserAgent) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["family"] = o.Family - } - if true { - toSerialize["major"] = o.Major - } - if true { - toSerialize["minor"] = o.Minor - } - if true { - toSerialize["patch"] = o.Patch + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o AuthenticatedSessionUserAgentUserAgent) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["family"] = o.Family + toSerialize["major"] = o.Major + toSerialize["minor"] = o.Minor + toSerialize["patch"] = o.Patch + return toSerialize, nil +} + type NullableAuthenticatedSessionUserAgentUserAgent struct { value *AuthenticatedSessionUserAgentUserAgent isSet bool diff --git a/model_authenticator_duo_challenge.go b/model_authenticator_duo_challenge.go index 4e0ff1f48..b342201b7 100644 --- a/model_authenticator_duo_challenge.go +++ b/model_authenticator_duo_challenge.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the AuthenticatorDuoChallenge type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AuthenticatorDuoChallenge{} + // AuthenticatorDuoChallenge Duo Challenge type AuthenticatorDuoChallenge struct { Type ChallengeChoices `json:"type"` @@ -81,7 +84,7 @@ func (o *AuthenticatorDuoChallenge) SetType(v ChallengeChoices) { // GetFlowInfo returns the FlowInfo field value if set, zero value otherwise. func (o *AuthenticatorDuoChallenge) GetFlowInfo() ContextualFlowInfo { - if o == nil || o.FlowInfo == nil { + if o == nil || IsNil(o.FlowInfo) { var ret ContextualFlowInfo return ret } @@ -91,7 +94,7 @@ func (o *AuthenticatorDuoChallenge) GetFlowInfo() ContextualFlowInfo { // GetFlowInfoOk returns a tuple with the FlowInfo field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorDuoChallenge) GetFlowInfoOk() (*ContextualFlowInfo, bool) { - if o == nil || o.FlowInfo == nil { + if o == nil || IsNil(o.FlowInfo) { return nil, false } return o.FlowInfo, true @@ -99,7 +102,7 @@ func (o *AuthenticatorDuoChallenge) GetFlowInfoOk() (*ContextualFlowInfo, bool) // HasFlowInfo returns a boolean if a field has been set. func (o *AuthenticatorDuoChallenge) HasFlowInfo() bool { - if o != nil && o.FlowInfo != nil { + if o != nil && !IsNil(o.FlowInfo) { return true } @@ -113,7 +116,7 @@ func (o *AuthenticatorDuoChallenge) SetFlowInfo(v ContextualFlowInfo) { // GetComponent returns the Component field value if set, zero value otherwise. func (o *AuthenticatorDuoChallenge) GetComponent() string { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { var ret string return ret } @@ -123,7 +126,7 @@ func (o *AuthenticatorDuoChallenge) GetComponent() string { // GetComponentOk returns a tuple with the Component field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorDuoChallenge) GetComponentOk() (*string, bool) { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { return nil, false } return o.Component, true @@ -131,7 +134,7 @@ func (o *AuthenticatorDuoChallenge) GetComponentOk() (*string, bool) { // HasComponent returns a boolean if a field has been set. func (o *AuthenticatorDuoChallenge) HasComponent() bool { - if o != nil && o.Component != nil { + if o != nil && !IsNil(o.Component) { return true } @@ -145,7 +148,7 @@ func (o *AuthenticatorDuoChallenge) SetComponent(v string) { // GetResponseErrors returns the ResponseErrors field value if set, zero value otherwise. func (o *AuthenticatorDuoChallenge) GetResponseErrors() map[string][]ErrorDetail { - if o == nil || o.ResponseErrors == nil { + if o == nil || IsNil(o.ResponseErrors) { var ret map[string][]ErrorDetail return ret } @@ -155,7 +158,7 @@ func (o *AuthenticatorDuoChallenge) GetResponseErrors() map[string][]ErrorDetail // GetResponseErrorsOk returns a tuple with the ResponseErrors field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorDuoChallenge) GetResponseErrorsOk() (*map[string][]ErrorDetail, bool) { - if o == nil || o.ResponseErrors == nil { + if o == nil || IsNil(o.ResponseErrors) { return nil, false } return o.ResponseErrors, true @@ -163,7 +166,7 @@ func (o *AuthenticatorDuoChallenge) GetResponseErrorsOk() (*map[string][]ErrorDe // HasResponseErrors returns a boolean if a field has been set. func (o *AuthenticatorDuoChallenge) HasResponseErrors() bool { - if o != nil && o.ResponseErrors != nil { + if o != nil && !IsNil(o.ResponseErrors) { return true } @@ -296,35 +299,31 @@ func (o *AuthenticatorDuoChallenge) SetStageUuid(v string) { } func (o AuthenticatorDuoChallenge) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["type"] = o.Type + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.FlowInfo != nil { + return json.Marshal(toSerialize) +} + +func (o AuthenticatorDuoChallenge) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + if !IsNil(o.FlowInfo) { toSerialize["flow_info"] = o.FlowInfo } - if o.Component != nil { + if !IsNil(o.Component) { toSerialize["component"] = o.Component } - if o.ResponseErrors != nil { + if !IsNil(o.ResponseErrors) { toSerialize["response_errors"] = o.ResponseErrors } - if true { - toSerialize["pending_user"] = o.PendingUser - } - if true { - toSerialize["pending_user_avatar"] = o.PendingUserAvatar - } - if true { - toSerialize["activation_barcode"] = o.ActivationBarcode - } - if true { - toSerialize["activation_code"] = o.ActivationCode - } - if true { - toSerialize["stage_uuid"] = o.StageUuid - } - return json.Marshal(toSerialize) + toSerialize["pending_user"] = o.PendingUser + toSerialize["pending_user_avatar"] = o.PendingUserAvatar + toSerialize["activation_barcode"] = o.ActivationBarcode + toSerialize["activation_code"] = o.ActivationCode + toSerialize["stage_uuid"] = o.StageUuid + return toSerialize, nil } type NullableAuthenticatorDuoChallenge struct { diff --git a/model_authenticator_duo_challenge_response_request.go b/model_authenticator_duo_challenge_response_request.go index 266fe3232..be147b9fd 100644 --- a/model_authenticator_duo_challenge_response_request.go +++ b/model_authenticator_duo_challenge_response_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the AuthenticatorDuoChallengeResponseRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AuthenticatorDuoChallengeResponseRequest{} + // AuthenticatorDuoChallengeResponseRequest Pseudo class for duo response type AuthenticatorDuoChallengeResponseRequest struct { Component *string `json:"component,omitempty"` @@ -43,7 +46,7 @@ func NewAuthenticatorDuoChallengeResponseRequestWithDefaults() *AuthenticatorDuo // GetComponent returns the Component field value if set, zero value otherwise. func (o *AuthenticatorDuoChallengeResponseRequest) GetComponent() string { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { var ret string return ret } @@ -53,7 +56,7 @@ func (o *AuthenticatorDuoChallengeResponseRequest) GetComponent() string { // GetComponentOk returns a tuple with the Component field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorDuoChallengeResponseRequest) GetComponentOk() (*string, bool) { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { return nil, false } return o.Component, true @@ -61,7 +64,7 @@ func (o *AuthenticatorDuoChallengeResponseRequest) GetComponentOk() (*string, bo // HasComponent returns a boolean if a field has been set. func (o *AuthenticatorDuoChallengeResponseRequest) HasComponent() bool { - if o != nil && o.Component != nil { + if o != nil && !IsNil(o.Component) { return true } @@ -74,11 +77,19 @@ func (o *AuthenticatorDuoChallengeResponseRequest) SetComponent(v string) { } func (o AuthenticatorDuoChallengeResponseRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AuthenticatorDuoChallengeResponseRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Component != nil { + if !IsNil(o.Component) { toSerialize["component"] = o.Component } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableAuthenticatorDuoChallengeResponseRequest struct { diff --git a/model_authenticator_duo_stage.go b/model_authenticator_duo_stage.go index e0066626c..1d09b3f0f 100644 --- a/model_authenticator_duo_stage.go +++ b/model_authenticator_duo_stage.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the AuthenticatorDuoStage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AuthenticatorDuoStage{} + // AuthenticatorDuoStage AuthenticatorDuoStage Serializer type AuthenticatorDuoStage struct { Pk string `json:"pk"` @@ -206,7 +209,7 @@ func (o *AuthenticatorDuoStage) SetMetaModelName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *AuthenticatorDuoStage) GetFlowSet() []FlowSet { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSet return ret } @@ -216,7 +219,7 @@ func (o *AuthenticatorDuoStage) GetFlowSet() []FlowSet { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorDuoStage) GetFlowSetOk() ([]FlowSet, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -224,7 +227,7 @@ func (o *AuthenticatorDuoStage) GetFlowSetOk() ([]FlowSet, bool) { // HasFlowSet returns a boolean if a field has been set. func (o *AuthenticatorDuoStage) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -238,7 +241,7 @@ func (o *AuthenticatorDuoStage) SetFlowSet(v []FlowSet) { // GetConfigureFlow returns the ConfigureFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *AuthenticatorDuoStage) GetConfigureFlow() string { - if o == nil || o.ConfigureFlow.Get() == nil { + if o == nil || IsNil(o.ConfigureFlow.Get()) { var ret string return ret } @@ -329,7 +332,7 @@ func (o *AuthenticatorDuoStage) SetApiHostname(v string) { // GetAdminIntegrationKey returns the AdminIntegrationKey field value if set, zero value otherwise. func (o *AuthenticatorDuoStage) GetAdminIntegrationKey() string { - if o == nil || o.AdminIntegrationKey == nil { + if o == nil || IsNil(o.AdminIntegrationKey) { var ret string return ret } @@ -339,7 +342,7 @@ func (o *AuthenticatorDuoStage) GetAdminIntegrationKey() string { // GetAdminIntegrationKeyOk returns a tuple with the AdminIntegrationKey field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorDuoStage) GetAdminIntegrationKeyOk() (*string, bool) { - if o == nil || o.AdminIntegrationKey == nil { + if o == nil || IsNil(o.AdminIntegrationKey) { return nil, false } return o.AdminIntegrationKey, true @@ -347,7 +350,7 @@ func (o *AuthenticatorDuoStage) GetAdminIntegrationKeyOk() (*string, bool) { // HasAdminIntegrationKey returns a boolean if a field has been set. func (o *AuthenticatorDuoStage) HasAdminIntegrationKey() bool { - if o != nil && o.AdminIntegrationKey != nil { + if o != nil && !IsNil(o.AdminIntegrationKey) { return true } @@ -360,41 +363,33 @@ func (o *AuthenticatorDuoStage) SetAdminIntegrationKey(v string) { } func (o AuthenticatorDuoStage) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["component"] = o.Component - } - if true { - toSerialize["verbose_name"] = o.VerboseName - } - if true { - toSerialize["verbose_name_plural"] = o.VerboseNamePlural - } - if true { - toSerialize["meta_model_name"] = o.MetaModelName + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.FlowSet != nil { + return json.Marshal(toSerialize) +} + +func (o AuthenticatorDuoStage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name + // skip: component is readOnly + // skip: verbose_name is readOnly + // skip: verbose_name_plural is readOnly + // skip: meta_model_name is readOnly + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } if o.ConfigureFlow.IsSet() { toSerialize["configure_flow"] = o.ConfigureFlow.Get() } - if true { - toSerialize["client_id"] = o.ClientId - } - if true { - toSerialize["api_hostname"] = o.ApiHostname - } - if o.AdminIntegrationKey != nil { + toSerialize["client_id"] = o.ClientId + toSerialize["api_hostname"] = o.ApiHostname + if !IsNil(o.AdminIntegrationKey) { toSerialize["admin_integration_key"] = o.AdminIntegrationKey } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableAuthenticatorDuoStage struct { diff --git a/model_authenticator_duo_stage_device_import_response.go b/model_authenticator_duo_stage_device_import_response.go index 137e2cfb5..365da0487 100644 --- a/model_authenticator_duo_stage_device_import_response.go +++ b/model_authenticator_duo_stage_device_import_response.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the AuthenticatorDuoStageDeviceImportResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AuthenticatorDuoStageDeviceImportResponse{} + // AuthenticatorDuoStageDeviceImportResponse struct for AuthenticatorDuoStageDeviceImportResponse type AuthenticatorDuoStageDeviceImportResponse struct { Count int32 `json:"count"` @@ -89,16 +92,20 @@ func (o *AuthenticatorDuoStageDeviceImportResponse) SetError(v string) { } func (o AuthenticatorDuoStageDeviceImportResponse) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["count"] = o.Count - } - if true { - toSerialize["error"] = o.Error + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o AuthenticatorDuoStageDeviceImportResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: count is readOnly + // skip: error is readOnly + return toSerialize, nil +} + type NullableAuthenticatorDuoStageDeviceImportResponse struct { value *AuthenticatorDuoStageDeviceImportResponse isSet bool diff --git a/model_authenticator_duo_stage_manual_device_import_request.go b/model_authenticator_duo_stage_manual_device_import_request.go index 930a4e106..aa8cecf2d 100644 --- a/model_authenticator_duo_stage_manual_device_import_request.go +++ b/model_authenticator_duo_stage_manual_device_import_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the AuthenticatorDuoStageManualDeviceImportRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AuthenticatorDuoStageManualDeviceImportRequest{} + // AuthenticatorDuoStageManualDeviceImportRequest struct for AuthenticatorDuoStageManualDeviceImportRequest type AuthenticatorDuoStageManualDeviceImportRequest struct { DuoUserId string `json:"duo_user_id"` @@ -89,16 +92,20 @@ func (o *AuthenticatorDuoStageManualDeviceImportRequest) SetUsername(v string) { } func (o AuthenticatorDuoStageManualDeviceImportRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["duo_user_id"] = o.DuoUserId - } - if true { - toSerialize["username"] = o.Username + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o AuthenticatorDuoStageManualDeviceImportRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["duo_user_id"] = o.DuoUserId + toSerialize["username"] = o.Username + return toSerialize, nil +} + type NullableAuthenticatorDuoStageManualDeviceImportRequest struct { value *AuthenticatorDuoStageManualDeviceImportRequest isSet bool diff --git a/model_authenticator_duo_stage_request.go b/model_authenticator_duo_stage_request.go index 31f0262a0..d08a77f05 100644 --- a/model_authenticator_duo_stage_request.go +++ b/model_authenticator_duo_stage_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the AuthenticatorDuoStageRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AuthenticatorDuoStageRequest{} + // AuthenticatorDuoStageRequest AuthenticatorDuoStage Serializer type AuthenticatorDuoStageRequest struct { Name string `json:"name"` @@ -75,7 +78,7 @@ func (o *AuthenticatorDuoStageRequest) SetName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *AuthenticatorDuoStageRequest) GetFlowSet() []FlowSetRequest { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSetRequest return ret } @@ -85,7 +88,7 @@ func (o *AuthenticatorDuoStageRequest) GetFlowSet() []FlowSetRequest { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorDuoStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -93,7 +96,7 @@ func (o *AuthenticatorDuoStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { // HasFlowSet returns a boolean if a field has been set. func (o *AuthenticatorDuoStageRequest) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -107,7 +110,7 @@ func (o *AuthenticatorDuoStageRequest) SetFlowSet(v []FlowSetRequest) { // GetConfigureFlow returns the ConfigureFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *AuthenticatorDuoStageRequest) GetConfigureFlow() string { - if o == nil || o.ConfigureFlow.Get() == nil { + if o == nil || IsNil(o.ConfigureFlow.Get()) { var ret string return ret } @@ -222,7 +225,7 @@ func (o *AuthenticatorDuoStageRequest) SetApiHostname(v string) { // GetAdminIntegrationKey returns the AdminIntegrationKey field value if set, zero value otherwise. func (o *AuthenticatorDuoStageRequest) GetAdminIntegrationKey() string { - if o == nil || o.AdminIntegrationKey == nil { + if o == nil || IsNil(o.AdminIntegrationKey) { var ret string return ret } @@ -232,7 +235,7 @@ func (o *AuthenticatorDuoStageRequest) GetAdminIntegrationKey() string { // GetAdminIntegrationKeyOk returns a tuple with the AdminIntegrationKey field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorDuoStageRequest) GetAdminIntegrationKeyOk() (*string, bool) { - if o == nil || o.AdminIntegrationKey == nil { + if o == nil || IsNil(o.AdminIntegrationKey) { return nil, false } return o.AdminIntegrationKey, true @@ -240,7 +243,7 @@ func (o *AuthenticatorDuoStageRequest) GetAdminIntegrationKeyOk() (*string, bool // HasAdminIntegrationKey returns a boolean if a field has been set. func (o *AuthenticatorDuoStageRequest) HasAdminIntegrationKey() bool { - if o != nil && o.AdminIntegrationKey != nil { + if o != nil && !IsNil(o.AdminIntegrationKey) { return true } @@ -254,7 +257,7 @@ func (o *AuthenticatorDuoStageRequest) SetAdminIntegrationKey(v string) { // GetAdminSecretKey returns the AdminSecretKey field value if set, zero value otherwise. func (o *AuthenticatorDuoStageRequest) GetAdminSecretKey() string { - if o == nil || o.AdminSecretKey == nil { + if o == nil || IsNil(o.AdminSecretKey) { var ret string return ret } @@ -264,7 +267,7 @@ func (o *AuthenticatorDuoStageRequest) GetAdminSecretKey() string { // GetAdminSecretKeyOk returns a tuple with the AdminSecretKey field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorDuoStageRequest) GetAdminSecretKeyOk() (*string, bool) { - if o == nil || o.AdminSecretKey == nil { + if o == nil || IsNil(o.AdminSecretKey) { return nil, false } return o.AdminSecretKey, true @@ -272,7 +275,7 @@ func (o *AuthenticatorDuoStageRequest) GetAdminSecretKeyOk() (*string, bool) { // HasAdminSecretKey returns a boolean if a field has been set. func (o *AuthenticatorDuoStageRequest) HasAdminSecretKey() bool { - if o != nil && o.AdminSecretKey != nil { + if o != nil && !IsNil(o.AdminSecretKey) { return true } @@ -285,32 +288,32 @@ func (o *AuthenticatorDuoStageRequest) SetAdminSecretKey(v string) { } func (o AuthenticatorDuoStageRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.FlowSet != nil { + return json.Marshal(toSerialize) +} + +func (o AuthenticatorDuoStageRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } if o.ConfigureFlow.IsSet() { toSerialize["configure_flow"] = o.ConfigureFlow.Get() } - if true { - toSerialize["client_id"] = o.ClientId - } - if true { - toSerialize["client_secret"] = o.ClientSecret - } - if true { - toSerialize["api_hostname"] = o.ApiHostname - } - if o.AdminIntegrationKey != nil { + toSerialize["client_id"] = o.ClientId + toSerialize["client_secret"] = o.ClientSecret + toSerialize["api_hostname"] = o.ApiHostname + if !IsNil(o.AdminIntegrationKey) { toSerialize["admin_integration_key"] = o.AdminIntegrationKey } - if o.AdminSecretKey != nil { + if !IsNil(o.AdminSecretKey) { toSerialize["admin_secret_key"] = o.AdminSecretKey } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableAuthenticatorDuoStageRequest struct { diff --git a/model_authenticator_sms_challenge.go b/model_authenticator_sms_challenge.go index 21efa69f2..766453556 100644 --- a/model_authenticator_sms_challenge.go +++ b/model_authenticator_sms_challenge.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the AuthenticatorSMSChallenge type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AuthenticatorSMSChallenge{} + // AuthenticatorSMSChallenge SMS Setup challenge type AuthenticatorSMSChallenge struct { Type ChallengeChoices `json:"type"` @@ -80,7 +83,7 @@ func (o *AuthenticatorSMSChallenge) SetType(v ChallengeChoices) { // GetFlowInfo returns the FlowInfo field value if set, zero value otherwise. func (o *AuthenticatorSMSChallenge) GetFlowInfo() ContextualFlowInfo { - if o == nil || o.FlowInfo == nil { + if o == nil || IsNil(o.FlowInfo) { var ret ContextualFlowInfo return ret } @@ -90,7 +93,7 @@ func (o *AuthenticatorSMSChallenge) GetFlowInfo() ContextualFlowInfo { // GetFlowInfoOk returns a tuple with the FlowInfo field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorSMSChallenge) GetFlowInfoOk() (*ContextualFlowInfo, bool) { - if o == nil || o.FlowInfo == nil { + if o == nil || IsNil(o.FlowInfo) { return nil, false } return o.FlowInfo, true @@ -98,7 +101,7 @@ func (o *AuthenticatorSMSChallenge) GetFlowInfoOk() (*ContextualFlowInfo, bool) // HasFlowInfo returns a boolean if a field has been set. func (o *AuthenticatorSMSChallenge) HasFlowInfo() bool { - if o != nil && o.FlowInfo != nil { + if o != nil && !IsNil(o.FlowInfo) { return true } @@ -112,7 +115,7 @@ func (o *AuthenticatorSMSChallenge) SetFlowInfo(v ContextualFlowInfo) { // GetComponent returns the Component field value if set, zero value otherwise. func (o *AuthenticatorSMSChallenge) GetComponent() string { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { var ret string return ret } @@ -122,7 +125,7 @@ func (o *AuthenticatorSMSChallenge) GetComponent() string { // GetComponentOk returns a tuple with the Component field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorSMSChallenge) GetComponentOk() (*string, bool) { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { return nil, false } return o.Component, true @@ -130,7 +133,7 @@ func (o *AuthenticatorSMSChallenge) GetComponentOk() (*string, bool) { // HasComponent returns a boolean if a field has been set. func (o *AuthenticatorSMSChallenge) HasComponent() bool { - if o != nil && o.Component != nil { + if o != nil && !IsNil(o.Component) { return true } @@ -144,7 +147,7 @@ func (o *AuthenticatorSMSChallenge) SetComponent(v string) { // GetResponseErrors returns the ResponseErrors field value if set, zero value otherwise. func (o *AuthenticatorSMSChallenge) GetResponseErrors() map[string][]ErrorDetail { - if o == nil || o.ResponseErrors == nil { + if o == nil || IsNil(o.ResponseErrors) { var ret map[string][]ErrorDetail return ret } @@ -154,7 +157,7 @@ func (o *AuthenticatorSMSChallenge) GetResponseErrors() map[string][]ErrorDetail // GetResponseErrorsOk returns a tuple with the ResponseErrors field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorSMSChallenge) GetResponseErrorsOk() (*map[string][]ErrorDetail, bool) { - if o == nil || o.ResponseErrors == nil { + if o == nil || IsNil(o.ResponseErrors) { return nil, false } return o.ResponseErrors, true @@ -162,7 +165,7 @@ func (o *AuthenticatorSMSChallenge) GetResponseErrorsOk() (*map[string][]ErrorDe // HasResponseErrors returns a boolean if a field has been set. func (o *AuthenticatorSMSChallenge) HasResponseErrors() bool { - if o != nil && o.ResponseErrors != nil { + if o != nil && !IsNil(o.ResponseErrors) { return true } @@ -224,7 +227,7 @@ func (o *AuthenticatorSMSChallenge) SetPendingUserAvatar(v string) { // GetPhoneNumberRequired returns the PhoneNumberRequired field value if set, zero value otherwise. func (o *AuthenticatorSMSChallenge) GetPhoneNumberRequired() bool { - if o == nil || o.PhoneNumberRequired == nil { + if o == nil || IsNil(o.PhoneNumberRequired) { var ret bool return ret } @@ -234,7 +237,7 @@ func (o *AuthenticatorSMSChallenge) GetPhoneNumberRequired() bool { // GetPhoneNumberRequiredOk returns a tuple with the PhoneNumberRequired field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorSMSChallenge) GetPhoneNumberRequiredOk() (*bool, bool) { - if o == nil || o.PhoneNumberRequired == nil { + if o == nil || IsNil(o.PhoneNumberRequired) { return nil, false } return o.PhoneNumberRequired, true @@ -242,7 +245,7 @@ func (o *AuthenticatorSMSChallenge) GetPhoneNumberRequiredOk() (*bool, bool) { // HasPhoneNumberRequired returns a boolean if a field has been set. func (o *AuthenticatorSMSChallenge) HasPhoneNumberRequired() bool { - if o != nil && o.PhoneNumberRequired != nil { + if o != nil && !IsNil(o.PhoneNumberRequired) { return true } @@ -255,29 +258,31 @@ func (o *AuthenticatorSMSChallenge) SetPhoneNumberRequired(v bool) { } func (o AuthenticatorSMSChallenge) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["type"] = o.Type + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.FlowInfo != nil { + return json.Marshal(toSerialize) +} + +func (o AuthenticatorSMSChallenge) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + if !IsNil(o.FlowInfo) { toSerialize["flow_info"] = o.FlowInfo } - if o.Component != nil { + if !IsNil(o.Component) { toSerialize["component"] = o.Component } - if o.ResponseErrors != nil { + if !IsNil(o.ResponseErrors) { toSerialize["response_errors"] = o.ResponseErrors } - if true { - toSerialize["pending_user"] = o.PendingUser - } - if true { - toSerialize["pending_user_avatar"] = o.PendingUserAvatar - } - if o.PhoneNumberRequired != nil { + toSerialize["pending_user"] = o.PendingUser + toSerialize["pending_user_avatar"] = o.PendingUserAvatar + if !IsNil(o.PhoneNumberRequired) { toSerialize["phone_number_required"] = o.PhoneNumberRequired } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableAuthenticatorSMSChallenge struct { diff --git a/model_authenticator_sms_challenge_response_request.go b/model_authenticator_sms_challenge_response_request.go index 96b15dba3..4e14bdfad 100644 --- a/model_authenticator_sms_challenge_response_request.go +++ b/model_authenticator_sms_challenge_response_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the AuthenticatorSMSChallengeResponseRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AuthenticatorSMSChallengeResponseRequest{} + // AuthenticatorSMSChallengeResponseRequest SMS Challenge response, device is set by get_response_instance type AuthenticatorSMSChallengeResponseRequest struct { Component *string `json:"component,omitempty"` @@ -45,7 +48,7 @@ func NewAuthenticatorSMSChallengeResponseRequestWithDefaults() *AuthenticatorSMS // GetComponent returns the Component field value if set, zero value otherwise. func (o *AuthenticatorSMSChallengeResponseRequest) GetComponent() string { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { var ret string return ret } @@ -55,7 +58,7 @@ func (o *AuthenticatorSMSChallengeResponseRequest) GetComponent() string { // GetComponentOk returns a tuple with the Component field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorSMSChallengeResponseRequest) GetComponentOk() (*string, bool) { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { return nil, false } return o.Component, true @@ -63,7 +66,7 @@ func (o *AuthenticatorSMSChallengeResponseRequest) GetComponentOk() (*string, bo // HasComponent returns a boolean if a field has been set. func (o *AuthenticatorSMSChallengeResponseRequest) HasComponent() bool { - if o != nil && o.Component != nil { + if o != nil && !IsNil(o.Component) { return true } @@ -77,7 +80,7 @@ func (o *AuthenticatorSMSChallengeResponseRequest) SetComponent(v string) { // GetCode returns the Code field value if set, zero value otherwise. func (o *AuthenticatorSMSChallengeResponseRequest) GetCode() int32 { - if o == nil || o.Code == nil { + if o == nil || IsNil(o.Code) { var ret int32 return ret } @@ -87,7 +90,7 @@ func (o *AuthenticatorSMSChallengeResponseRequest) GetCode() int32 { // GetCodeOk returns a tuple with the Code field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorSMSChallengeResponseRequest) GetCodeOk() (*int32, bool) { - if o == nil || o.Code == nil { + if o == nil || IsNil(o.Code) { return nil, false } return o.Code, true @@ -95,7 +98,7 @@ func (o *AuthenticatorSMSChallengeResponseRequest) GetCodeOk() (*int32, bool) { // HasCode returns a boolean if a field has been set. func (o *AuthenticatorSMSChallengeResponseRequest) HasCode() bool { - if o != nil && o.Code != nil { + if o != nil && !IsNil(o.Code) { return true } @@ -109,7 +112,7 @@ func (o *AuthenticatorSMSChallengeResponseRequest) SetCode(v int32) { // GetPhoneNumber returns the PhoneNumber field value if set, zero value otherwise. func (o *AuthenticatorSMSChallengeResponseRequest) GetPhoneNumber() string { - if o == nil || o.PhoneNumber == nil { + if o == nil || IsNil(o.PhoneNumber) { var ret string return ret } @@ -119,7 +122,7 @@ func (o *AuthenticatorSMSChallengeResponseRequest) GetPhoneNumber() string { // GetPhoneNumberOk returns a tuple with the PhoneNumber field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorSMSChallengeResponseRequest) GetPhoneNumberOk() (*string, bool) { - if o == nil || o.PhoneNumber == nil { + if o == nil || IsNil(o.PhoneNumber) { return nil, false } return o.PhoneNumber, true @@ -127,7 +130,7 @@ func (o *AuthenticatorSMSChallengeResponseRequest) GetPhoneNumberOk() (*string, // HasPhoneNumber returns a boolean if a field has been set. func (o *AuthenticatorSMSChallengeResponseRequest) HasPhoneNumber() bool { - if o != nil && o.PhoneNumber != nil { + if o != nil && !IsNil(o.PhoneNumber) { return true } @@ -140,17 +143,25 @@ func (o *AuthenticatorSMSChallengeResponseRequest) SetPhoneNumber(v string) { } func (o AuthenticatorSMSChallengeResponseRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AuthenticatorSMSChallengeResponseRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Component != nil { + if !IsNil(o.Component) { toSerialize["component"] = o.Component } - if o.Code != nil { + if !IsNil(o.Code) { toSerialize["code"] = o.Code } - if o.PhoneNumber != nil { + if !IsNil(o.PhoneNumber) { toSerialize["phone_number"] = o.PhoneNumber } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableAuthenticatorSMSChallengeResponseRequest struct { diff --git a/model_authenticator_sms_stage.go b/model_authenticator_sms_stage.go index 148a6f3be..ba245258c 100644 --- a/model_authenticator_sms_stage.go +++ b/model_authenticator_sms_stage.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the AuthenticatorSMSStage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AuthenticatorSMSStage{} + // AuthenticatorSMSStage AuthenticatorSMSStage Serializer type AuthenticatorSMSStage struct { Pk string `json:"pk"` @@ -215,7 +218,7 @@ func (o *AuthenticatorSMSStage) SetMetaModelName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *AuthenticatorSMSStage) GetFlowSet() []FlowSet { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSet return ret } @@ -225,7 +228,7 @@ func (o *AuthenticatorSMSStage) GetFlowSet() []FlowSet { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorSMSStage) GetFlowSetOk() ([]FlowSet, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -233,7 +236,7 @@ func (o *AuthenticatorSMSStage) GetFlowSetOk() ([]FlowSet, bool) { // HasFlowSet returns a boolean if a field has been set. func (o *AuthenticatorSMSStage) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -247,7 +250,7 @@ func (o *AuthenticatorSMSStage) SetFlowSet(v []FlowSet) { // GetConfigureFlow returns the ConfigureFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *AuthenticatorSMSStage) GetConfigureFlow() string { - if o == nil || o.ConfigureFlow.Get() == nil { + if o == nil || IsNil(o.ConfigureFlow.Get()) { var ret string return ret } @@ -386,7 +389,7 @@ func (o *AuthenticatorSMSStage) SetAuth(v string) { // GetAuthPassword returns the AuthPassword field value if set, zero value otherwise. func (o *AuthenticatorSMSStage) GetAuthPassword() string { - if o == nil || o.AuthPassword == nil { + if o == nil || IsNil(o.AuthPassword) { var ret string return ret } @@ -396,7 +399,7 @@ func (o *AuthenticatorSMSStage) GetAuthPassword() string { // GetAuthPasswordOk returns a tuple with the AuthPassword field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorSMSStage) GetAuthPasswordOk() (*string, bool) { - if o == nil || o.AuthPassword == nil { + if o == nil || IsNil(o.AuthPassword) { return nil, false } return o.AuthPassword, true @@ -404,7 +407,7 @@ func (o *AuthenticatorSMSStage) GetAuthPasswordOk() (*string, bool) { // HasAuthPassword returns a boolean if a field has been set. func (o *AuthenticatorSMSStage) HasAuthPassword() bool { - if o != nil && o.AuthPassword != nil { + if o != nil && !IsNil(o.AuthPassword) { return true } @@ -418,7 +421,7 @@ func (o *AuthenticatorSMSStage) SetAuthPassword(v string) { // GetAuthType returns the AuthType field value if set, zero value otherwise. func (o *AuthenticatorSMSStage) GetAuthType() AuthTypeEnum { - if o == nil || o.AuthType == nil { + if o == nil || IsNil(o.AuthType) { var ret AuthTypeEnum return ret } @@ -428,7 +431,7 @@ func (o *AuthenticatorSMSStage) GetAuthType() AuthTypeEnum { // GetAuthTypeOk returns a tuple with the AuthType field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorSMSStage) GetAuthTypeOk() (*AuthTypeEnum, bool) { - if o == nil || o.AuthType == nil { + if o == nil || IsNil(o.AuthType) { return nil, false } return o.AuthType, true @@ -436,7 +439,7 @@ func (o *AuthenticatorSMSStage) GetAuthTypeOk() (*AuthTypeEnum, bool) { // HasAuthType returns a boolean if a field has been set. func (o *AuthenticatorSMSStage) HasAuthType() bool { - if o != nil && o.AuthType != nil { + if o != nil && !IsNil(o.AuthType) { return true } @@ -450,7 +453,7 @@ func (o *AuthenticatorSMSStage) SetAuthType(v AuthTypeEnum) { // GetVerifyOnly returns the VerifyOnly field value if set, zero value otherwise. func (o *AuthenticatorSMSStage) GetVerifyOnly() bool { - if o == nil || o.VerifyOnly == nil { + if o == nil || IsNil(o.VerifyOnly) { var ret bool return ret } @@ -460,7 +463,7 @@ func (o *AuthenticatorSMSStage) GetVerifyOnly() bool { // GetVerifyOnlyOk returns a tuple with the VerifyOnly field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorSMSStage) GetVerifyOnlyOk() (*bool, bool) { - if o == nil || o.VerifyOnly == nil { + if o == nil || IsNil(o.VerifyOnly) { return nil, false } return o.VerifyOnly, true @@ -468,7 +471,7 @@ func (o *AuthenticatorSMSStage) GetVerifyOnlyOk() (*bool, bool) { // HasVerifyOnly returns a boolean if a field has been set. func (o *AuthenticatorSMSStage) HasVerifyOnly() bool { - if o != nil && o.VerifyOnly != nil { + if o != nil && !IsNil(o.VerifyOnly) { return true } @@ -482,7 +485,7 @@ func (o *AuthenticatorSMSStage) SetVerifyOnly(v bool) { // GetMapping returns the Mapping field value if set, zero value otherwise (both if not set or set to explicit null). func (o *AuthenticatorSMSStage) GetMapping() string { - if o == nil || o.Mapping.Get() == nil { + if o == nil || IsNil(o.Mapping.Get()) { var ret string return ret } @@ -524,56 +527,44 @@ func (o *AuthenticatorSMSStage) UnsetMapping() { } func (o AuthenticatorSMSStage) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["component"] = o.Component + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if true { - toSerialize["verbose_name"] = o.VerboseName - } - if true { - toSerialize["verbose_name_plural"] = o.VerboseNamePlural - } - if true { - toSerialize["meta_model_name"] = o.MetaModelName - } - if o.FlowSet != nil { + return json.Marshal(toSerialize) +} + +func (o AuthenticatorSMSStage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name + // skip: component is readOnly + // skip: verbose_name is readOnly + // skip: verbose_name_plural is readOnly + // skip: meta_model_name is readOnly + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } if o.ConfigureFlow.IsSet() { toSerialize["configure_flow"] = o.ConfigureFlow.Get() } - if true { - toSerialize["provider"] = o.Provider - } - if true { - toSerialize["from_number"] = o.FromNumber - } - if true { - toSerialize["account_sid"] = o.AccountSid - } - if true { - toSerialize["auth"] = o.Auth - } - if o.AuthPassword != nil { + toSerialize["provider"] = o.Provider + toSerialize["from_number"] = o.FromNumber + toSerialize["account_sid"] = o.AccountSid + toSerialize["auth"] = o.Auth + if !IsNil(o.AuthPassword) { toSerialize["auth_password"] = o.AuthPassword } - if o.AuthType != nil { + if !IsNil(o.AuthType) { toSerialize["auth_type"] = o.AuthType } - if o.VerifyOnly != nil { + if !IsNil(o.VerifyOnly) { toSerialize["verify_only"] = o.VerifyOnly } if o.Mapping.IsSet() { toSerialize["mapping"] = o.Mapping.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableAuthenticatorSMSStage struct { diff --git a/model_authenticator_sms_stage_request.go b/model_authenticator_sms_stage_request.go index 9cac8ad68..4c8a08dab 100644 --- a/model_authenticator_sms_stage_request.go +++ b/model_authenticator_sms_stage_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the AuthenticatorSMSStageRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AuthenticatorSMSStageRequest{} + // AuthenticatorSMSStageRequest AuthenticatorSMSStage Serializer type AuthenticatorSMSStageRequest struct { Name string `json:"name"` @@ -81,7 +84,7 @@ func (o *AuthenticatorSMSStageRequest) SetName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *AuthenticatorSMSStageRequest) GetFlowSet() []FlowSetRequest { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSetRequest return ret } @@ -91,7 +94,7 @@ func (o *AuthenticatorSMSStageRequest) GetFlowSet() []FlowSetRequest { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorSMSStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -99,7 +102,7 @@ func (o *AuthenticatorSMSStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { // HasFlowSet returns a boolean if a field has been set. func (o *AuthenticatorSMSStageRequest) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -113,7 +116,7 @@ func (o *AuthenticatorSMSStageRequest) SetFlowSet(v []FlowSetRequest) { // GetConfigureFlow returns the ConfigureFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *AuthenticatorSMSStageRequest) GetConfigureFlow() string { - if o == nil || o.ConfigureFlow.Get() == nil { + if o == nil || IsNil(o.ConfigureFlow.Get()) { var ret string return ret } @@ -252,7 +255,7 @@ func (o *AuthenticatorSMSStageRequest) SetAuth(v string) { // GetAuthPassword returns the AuthPassword field value if set, zero value otherwise. func (o *AuthenticatorSMSStageRequest) GetAuthPassword() string { - if o == nil || o.AuthPassword == nil { + if o == nil || IsNil(o.AuthPassword) { var ret string return ret } @@ -262,7 +265,7 @@ func (o *AuthenticatorSMSStageRequest) GetAuthPassword() string { // GetAuthPasswordOk returns a tuple with the AuthPassword field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorSMSStageRequest) GetAuthPasswordOk() (*string, bool) { - if o == nil || o.AuthPassword == nil { + if o == nil || IsNil(o.AuthPassword) { return nil, false } return o.AuthPassword, true @@ -270,7 +273,7 @@ func (o *AuthenticatorSMSStageRequest) GetAuthPasswordOk() (*string, bool) { // HasAuthPassword returns a boolean if a field has been set. func (o *AuthenticatorSMSStageRequest) HasAuthPassword() bool { - if o != nil && o.AuthPassword != nil { + if o != nil && !IsNil(o.AuthPassword) { return true } @@ -284,7 +287,7 @@ func (o *AuthenticatorSMSStageRequest) SetAuthPassword(v string) { // GetAuthType returns the AuthType field value if set, zero value otherwise. func (o *AuthenticatorSMSStageRequest) GetAuthType() AuthTypeEnum { - if o == nil || o.AuthType == nil { + if o == nil || IsNil(o.AuthType) { var ret AuthTypeEnum return ret } @@ -294,7 +297,7 @@ func (o *AuthenticatorSMSStageRequest) GetAuthType() AuthTypeEnum { // GetAuthTypeOk returns a tuple with the AuthType field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorSMSStageRequest) GetAuthTypeOk() (*AuthTypeEnum, bool) { - if o == nil || o.AuthType == nil { + if o == nil || IsNil(o.AuthType) { return nil, false } return o.AuthType, true @@ -302,7 +305,7 @@ func (o *AuthenticatorSMSStageRequest) GetAuthTypeOk() (*AuthTypeEnum, bool) { // HasAuthType returns a boolean if a field has been set. func (o *AuthenticatorSMSStageRequest) HasAuthType() bool { - if o != nil && o.AuthType != nil { + if o != nil && !IsNil(o.AuthType) { return true } @@ -316,7 +319,7 @@ func (o *AuthenticatorSMSStageRequest) SetAuthType(v AuthTypeEnum) { // GetVerifyOnly returns the VerifyOnly field value if set, zero value otherwise. func (o *AuthenticatorSMSStageRequest) GetVerifyOnly() bool { - if o == nil || o.VerifyOnly == nil { + if o == nil || IsNil(o.VerifyOnly) { var ret bool return ret } @@ -326,7 +329,7 @@ func (o *AuthenticatorSMSStageRequest) GetVerifyOnly() bool { // GetVerifyOnlyOk returns a tuple with the VerifyOnly field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorSMSStageRequest) GetVerifyOnlyOk() (*bool, bool) { - if o == nil || o.VerifyOnly == nil { + if o == nil || IsNil(o.VerifyOnly) { return nil, false } return o.VerifyOnly, true @@ -334,7 +337,7 @@ func (o *AuthenticatorSMSStageRequest) GetVerifyOnlyOk() (*bool, bool) { // HasVerifyOnly returns a boolean if a field has been set. func (o *AuthenticatorSMSStageRequest) HasVerifyOnly() bool { - if o != nil && o.VerifyOnly != nil { + if o != nil && !IsNil(o.VerifyOnly) { return true } @@ -348,7 +351,7 @@ func (o *AuthenticatorSMSStageRequest) SetVerifyOnly(v bool) { // GetMapping returns the Mapping field value if set, zero value otherwise (both if not set or set to explicit null). func (o *AuthenticatorSMSStageRequest) GetMapping() string { - if o == nil || o.Mapping.Get() == nil { + if o == nil || IsNil(o.Mapping.Get()) { var ret string return ret } @@ -390,41 +393,39 @@ func (o *AuthenticatorSMSStageRequest) UnsetMapping() { } func (o AuthenticatorSMSStageRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.FlowSet != nil { + return json.Marshal(toSerialize) +} + +func (o AuthenticatorSMSStageRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } if o.ConfigureFlow.IsSet() { toSerialize["configure_flow"] = o.ConfigureFlow.Get() } - if true { - toSerialize["provider"] = o.Provider - } - if true { - toSerialize["from_number"] = o.FromNumber - } - if true { - toSerialize["account_sid"] = o.AccountSid - } - if true { - toSerialize["auth"] = o.Auth - } - if o.AuthPassword != nil { + toSerialize["provider"] = o.Provider + toSerialize["from_number"] = o.FromNumber + toSerialize["account_sid"] = o.AccountSid + toSerialize["auth"] = o.Auth + if !IsNil(o.AuthPassword) { toSerialize["auth_password"] = o.AuthPassword } - if o.AuthType != nil { + if !IsNil(o.AuthType) { toSerialize["auth_type"] = o.AuthType } - if o.VerifyOnly != nil { + if !IsNil(o.VerifyOnly) { toSerialize["verify_only"] = o.VerifyOnly } if o.Mapping.IsSet() { toSerialize["mapping"] = o.Mapping.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableAuthenticatorSMSStageRequest struct { diff --git a/model_authenticator_static_challenge.go b/model_authenticator_static_challenge.go index 6d5b8ae29..d1ea527c7 100644 --- a/model_authenticator_static_challenge.go +++ b/model_authenticator_static_challenge.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the AuthenticatorStaticChallenge type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AuthenticatorStaticChallenge{} + // AuthenticatorStaticChallenge Static authenticator challenge type AuthenticatorStaticChallenge struct { Type ChallengeChoices `json:"type"` @@ -77,7 +80,7 @@ func (o *AuthenticatorStaticChallenge) SetType(v ChallengeChoices) { // GetFlowInfo returns the FlowInfo field value if set, zero value otherwise. func (o *AuthenticatorStaticChallenge) GetFlowInfo() ContextualFlowInfo { - if o == nil || o.FlowInfo == nil { + if o == nil || IsNil(o.FlowInfo) { var ret ContextualFlowInfo return ret } @@ -87,7 +90,7 @@ func (o *AuthenticatorStaticChallenge) GetFlowInfo() ContextualFlowInfo { // GetFlowInfoOk returns a tuple with the FlowInfo field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorStaticChallenge) GetFlowInfoOk() (*ContextualFlowInfo, bool) { - if o == nil || o.FlowInfo == nil { + if o == nil || IsNil(o.FlowInfo) { return nil, false } return o.FlowInfo, true @@ -95,7 +98,7 @@ func (o *AuthenticatorStaticChallenge) GetFlowInfoOk() (*ContextualFlowInfo, boo // HasFlowInfo returns a boolean if a field has been set. func (o *AuthenticatorStaticChallenge) HasFlowInfo() bool { - if o != nil && o.FlowInfo != nil { + if o != nil && !IsNil(o.FlowInfo) { return true } @@ -109,7 +112,7 @@ func (o *AuthenticatorStaticChallenge) SetFlowInfo(v ContextualFlowInfo) { // GetComponent returns the Component field value if set, zero value otherwise. func (o *AuthenticatorStaticChallenge) GetComponent() string { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { var ret string return ret } @@ -119,7 +122,7 @@ func (o *AuthenticatorStaticChallenge) GetComponent() string { // GetComponentOk returns a tuple with the Component field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorStaticChallenge) GetComponentOk() (*string, bool) { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { return nil, false } return o.Component, true @@ -127,7 +130,7 @@ func (o *AuthenticatorStaticChallenge) GetComponentOk() (*string, bool) { // HasComponent returns a boolean if a field has been set. func (o *AuthenticatorStaticChallenge) HasComponent() bool { - if o != nil && o.Component != nil { + if o != nil && !IsNil(o.Component) { return true } @@ -141,7 +144,7 @@ func (o *AuthenticatorStaticChallenge) SetComponent(v string) { // GetResponseErrors returns the ResponseErrors field value if set, zero value otherwise. func (o *AuthenticatorStaticChallenge) GetResponseErrors() map[string][]ErrorDetail { - if o == nil || o.ResponseErrors == nil { + if o == nil || IsNil(o.ResponseErrors) { var ret map[string][]ErrorDetail return ret } @@ -151,7 +154,7 @@ func (o *AuthenticatorStaticChallenge) GetResponseErrors() map[string][]ErrorDet // GetResponseErrorsOk returns a tuple with the ResponseErrors field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorStaticChallenge) GetResponseErrorsOk() (*map[string][]ErrorDetail, bool) { - if o == nil || o.ResponseErrors == nil { + if o == nil || IsNil(o.ResponseErrors) { return nil, false } return o.ResponseErrors, true @@ -159,7 +162,7 @@ func (o *AuthenticatorStaticChallenge) GetResponseErrorsOk() (*map[string][]Erro // HasResponseErrors returns a boolean if a field has been set. func (o *AuthenticatorStaticChallenge) HasResponseErrors() bool { - if o != nil && o.ResponseErrors != nil { + if o != nil && !IsNil(o.ResponseErrors) { return true } @@ -244,29 +247,29 @@ func (o *AuthenticatorStaticChallenge) SetCodes(v []string) { } func (o AuthenticatorStaticChallenge) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["type"] = o.Type + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.FlowInfo != nil { + return json.Marshal(toSerialize) +} + +func (o AuthenticatorStaticChallenge) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + if !IsNil(o.FlowInfo) { toSerialize["flow_info"] = o.FlowInfo } - if o.Component != nil { + if !IsNil(o.Component) { toSerialize["component"] = o.Component } - if o.ResponseErrors != nil { + if !IsNil(o.ResponseErrors) { toSerialize["response_errors"] = o.ResponseErrors } - if true { - toSerialize["pending_user"] = o.PendingUser - } - if true { - toSerialize["pending_user_avatar"] = o.PendingUserAvatar - } - if true { - toSerialize["codes"] = o.Codes - } - return json.Marshal(toSerialize) + toSerialize["pending_user"] = o.PendingUser + toSerialize["pending_user_avatar"] = o.PendingUserAvatar + toSerialize["codes"] = o.Codes + return toSerialize, nil } type NullableAuthenticatorStaticChallenge struct { diff --git a/model_authenticator_static_challenge_response_request.go b/model_authenticator_static_challenge_response_request.go index a0576ea94..8c8d7995e 100644 --- a/model_authenticator_static_challenge_response_request.go +++ b/model_authenticator_static_challenge_response_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the AuthenticatorStaticChallengeResponseRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AuthenticatorStaticChallengeResponseRequest{} + // AuthenticatorStaticChallengeResponseRequest Pseudo class for static response type AuthenticatorStaticChallengeResponseRequest struct { Component *string `json:"component,omitempty"` @@ -43,7 +46,7 @@ func NewAuthenticatorStaticChallengeResponseRequestWithDefaults() *Authenticator // GetComponent returns the Component field value if set, zero value otherwise. func (o *AuthenticatorStaticChallengeResponseRequest) GetComponent() string { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { var ret string return ret } @@ -53,7 +56,7 @@ func (o *AuthenticatorStaticChallengeResponseRequest) GetComponent() string { // GetComponentOk returns a tuple with the Component field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorStaticChallengeResponseRequest) GetComponentOk() (*string, bool) { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { return nil, false } return o.Component, true @@ -61,7 +64,7 @@ func (o *AuthenticatorStaticChallengeResponseRequest) GetComponentOk() (*string, // HasComponent returns a boolean if a field has been set. func (o *AuthenticatorStaticChallengeResponseRequest) HasComponent() bool { - if o != nil && o.Component != nil { + if o != nil && !IsNil(o.Component) { return true } @@ -74,11 +77,19 @@ func (o *AuthenticatorStaticChallengeResponseRequest) SetComponent(v string) { } func (o AuthenticatorStaticChallengeResponseRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AuthenticatorStaticChallengeResponseRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Component != nil { + if !IsNil(o.Component) { toSerialize["component"] = o.Component } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableAuthenticatorStaticChallengeResponseRequest struct { diff --git a/model_authenticator_static_stage.go b/model_authenticator_static_stage.go index 1e341a8cb..cb08da973 100644 --- a/model_authenticator_static_stage.go +++ b/model_authenticator_static_stage.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the AuthenticatorStaticStage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AuthenticatorStaticStage{} + // AuthenticatorStaticStage AuthenticatorStaticStage Serializer type AuthenticatorStaticStage struct { Pk string `json:"pk"` @@ -202,7 +205,7 @@ func (o *AuthenticatorStaticStage) SetMetaModelName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *AuthenticatorStaticStage) GetFlowSet() []FlowSet { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSet return ret } @@ -212,7 +215,7 @@ func (o *AuthenticatorStaticStage) GetFlowSet() []FlowSet { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorStaticStage) GetFlowSetOk() ([]FlowSet, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -220,7 +223,7 @@ func (o *AuthenticatorStaticStage) GetFlowSetOk() ([]FlowSet, bool) { // HasFlowSet returns a boolean if a field has been set. func (o *AuthenticatorStaticStage) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -234,7 +237,7 @@ func (o *AuthenticatorStaticStage) SetFlowSet(v []FlowSet) { // GetConfigureFlow returns the ConfigureFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *AuthenticatorStaticStage) GetConfigureFlow() string { - if o == nil || o.ConfigureFlow.Get() == nil { + if o == nil || IsNil(o.ConfigureFlow.Get()) { var ret string return ret } @@ -277,7 +280,7 @@ func (o *AuthenticatorStaticStage) UnsetConfigureFlow() { // GetTokenCount returns the TokenCount field value if set, zero value otherwise. func (o *AuthenticatorStaticStage) GetTokenCount() int32 { - if o == nil || o.TokenCount == nil { + if o == nil || IsNil(o.TokenCount) { var ret int32 return ret } @@ -287,7 +290,7 @@ func (o *AuthenticatorStaticStage) GetTokenCount() int32 { // GetTokenCountOk returns a tuple with the TokenCount field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorStaticStage) GetTokenCountOk() (*int32, bool) { - if o == nil || o.TokenCount == nil { + if o == nil || IsNil(o.TokenCount) { return nil, false } return o.TokenCount, true @@ -295,7 +298,7 @@ func (o *AuthenticatorStaticStage) GetTokenCountOk() (*int32, bool) { // HasTokenCount returns a boolean if a field has been set. func (o *AuthenticatorStaticStage) HasTokenCount() bool { - if o != nil && o.TokenCount != nil { + if o != nil && !IsNil(o.TokenCount) { return true } @@ -308,35 +311,31 @@ func (o *AuthenticatorStaticStage) SetTokenCount(v int32) { } func (o AuthenticatorStaticStage) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["component"] = o.Component - } - if true { - toSerialize["verbose_name"] = o.VerboseName - } - if true { - toSerialize["verbose_name_plural"] = o.VerboseNamePlural + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if true { - toSerialize["meta_model_name"] = o.MetaModelName - } - if o.FlowSet != nil { + return json.Marshal(toSerialize) +} + +func (o AuthenticatorStaticStage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name + // skip: component is readOnly + // skip: verbose_name is readOnly + // skip: verbose_name_plural is readOnly + // skip: meta_model_name is readOnly + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } if o.ConfigureFlow.IsSet() { toSerialize["configure_flow"] = o.ConfigureFlow.Get() } - if o.TokenCount != nil { + if !IsNil(o.TokenCount) { toSerialize["token_count"] = o.TokenCount } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableAuthenticatorStaticStage struct { diff --git a/model_authenticator_static_stage_request.go b/model_authenticator_static_stage_request.go index 8ad7c5815..b677f988a 100644 --- a/model_authenticator_static_stage_request.go +++ b/model_authenticator_static_stage_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the AuthenticatorStaticStageRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AuthenticatorStaticStageRequest{} + // AuthenticatorStaticStageRequest AuthenticatorStaticStage Serializer type AuthenticatorStaticStageRequest struct { Name string `json:"name"` @@ -68,7 +71,7 @@ func (o *AuthenticatorStaticStageRequest) SetName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *AuthenticatorStaticStageRequest) GetFlowSet() []FlowSetRequest { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSetRequest return ret } @@ -78,7 +81,7 @@ func (o *AuthenticatorStaticStageRequest) GetFlowSet() []FlowSetRequest { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorStaticStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -86,7 +89,7 @@ func (o *AuthenticatorStaticStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool // HasFlowSet returns a boolean if a field has been set. func (o *AuthenticatorStaticStageRequest) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -100,7 +103,7 @@ func (o *AuthenticatorStaticStageRequest) SetFlowSet(v []FlowSetRequest) { // GetConfigureFlow returns the ConfigureFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *AuthenticatorStaticStageRequest) GetConfigureFlow() string { - if o == nil || o.ConfigureFlow.Get() == nil { + if o == nil || IsNil(o.ConfigureFlow.Get()) { var ret string return ret } @@ -143,7 +146,7 @@ func (o *AuthenticatorStaticStageRequest) UnsetConfigureFlow() { // GetTokenCount returns the TokenCount field value if set, zero value otherwise. func (o *AuthenticatorStaticStageRequest) GetTokenCount() int32 { - if o == nil || o.TokenCount == nil { + if o == nil || IsNil(o.TokenCount) { var ret int32 return ret } @@ -153,7 +156,7 @@ func (o *AuthenticatorStaticStageRequest) GetTokenCount() int32 { // GetTokenCountOk returns a tuple with the TokenCount field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorStaticStageRequest) GetTokenCountOk() (*int32, bool) { - if o == nil || o.TokenCount == nil { + if o == nil || IsNil(o.TokenCount) { return nil, false } return o.TokenCount, true @@ -161,7 +164,7 @@ func (o *AuthenticatorStaticStageRequest) GetTokenCountOk() (*int32, bool) { // HasTokenCount returns a boolean if a field has been set. func (o *AuthenticatorStaticStageRequest) HasTokenCount() bool { - if o != nil && o.TokenCount != nil { + if o != nil && !IsNil(o.TokenCount) { return true } @@ -174,20 +177,26 @@ func (o *AuthenticatorStaticStageRequest) SetTokenCount(v int32) { } func (o AuthenticatorStaticStageRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.FlowSet != nil { + return json.Marshal(toSerialize) +} + +func (o AuthenticatorStaticStageRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } if o.ConfigureFlow.IsSet() { toSerialize["configure_flow"] = o.ConfigureFlow.Get() } - if o.TokenCount != nil { + if !IsNil(o.TokenCount) { toSerialize["token_count"] = o.TokenCount } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableAuthenticatorStaticStageRequest struct { diff --git a/model_authenticator_totp_challenge.go b/model_authenticator_totp_challenge.go index 01881d2e6..bff2842d7 100644 --- a/model_authenticator_totp_challenge.go +++ b/model_authenticator_totp_challenge.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the AuthenticatorTOTPChallenge type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AuthenticatorTOTPChallenge{} + // AuthenticatorTOTPChallenge TOTP Setup challenge type AuthenticatorTOTPChallenge struct { Type ChallengeChoices `json:"type"` @@ -77,7 +80,7 @@ func (o *AuthenticatorTOTPChallenge) SetType(v ChallengeChoices) { // GetFlowInfo returns the FlowInfo field value if set, zero value otherwise. func (o *AuthenticatorTOTPChallenge) GetFlowInfo() ContextualFlowInfo { - if o == nil || o.FlowInfo == nil { + if o == nil || IsNil(o.FlowInfo) { var ret ContextualFlowInfo return ret } @@ -87,7 +90,7 @@ func (o *AuthenticatorTOTPChallenge) GetFlowInfo() ContextualFlowInfo { // GetFlowInfoOk returns a tuple with the FlowInfo field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorTOTPChallenge) GetFlowInfoOk() (*ContextualFlowInfo, bool) { - if o == nil || o.FlowInfo == nil { + if o == nil || IsNil(o.FlowInfo) { return nil, false } return o.FlowInfo, true @@ -95,7 +98,7 @@ func (o *AuthenticatorTOTPChallenge) GetFlowInfoOk() (*ContextualFlowInfo, bool) // HasFlowInfo returns a boolean if a field has been set. func (o *AuthenticatorTOTPChallenge) HasFlowInfo() bool { - if o != nil && o.FlowInfo != nil { + if o != nil && !IsNil(o.FlowInfo) { return true } @@ -109,7 +112,7 @@ func (o *AuthenticatorTOTPChallenge) SetFlowInfo(v ContextualFlowInfo) { // GetComponent returns the Component field value if set, zero value otherwise. func (o *AuthenticatorTOTPChallenge) GetComponent() string { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { var ret string return ret } @@ -119,7 +122,7 @@ func (o *AuthenticatorTOTPChallenge) GetComponent() string { // GetComponentOk returns a tuple with the Component field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorTOTPChallenge) GetComponentOk() (*string, bool) { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { return nil, false } return o.Component, true @@ -127,7 +130,7 @@ func (o *AuthenticatorTOTPChallenge) GetComponentOk() (*string, bool) { // HasComponent returns a boolean if a field has been set. func (o *AuthenticatorTOTPChallenge) HasComponent() bool { - if o != nil && o.Component != nil { + if o != nil && !IsNil(o.Component) { return true } @@ -141,7 +144,7 @@ func (o *AuthenticatorTOTPChallenge) SetComponent(v string) { // GetResponseErrors returns the ResponseErrors field value if set, zero value otherwise. func (o *AuthenticatorTOTPChallenge) GetResponseErrors() map[string][]ErrorDetail { - if o == nil || o.ResponseErrors == nil { + if o == nil || IsNil(o.ResponseErrors) { var ret map[string][]ErrorDetail return ret } @@ -151,7 +154,7 @@ func (o *AuthenticatorTOTPChallenge) GetResponseErrors() map[string][]ErrorDetai // GetResponseErrorsOk returns a tuple with the ResponseErrors field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorTOTPChallenge) GetResponseErrorsOk() (*map[string][]ErrorDetail, bool) { - if o == nil || o.ResponseErrors == nil { + if o == nil || IsNil(o.ResponseErrors) { return nil, false } return o.ResponseErrors, true @@ -159,7 +162,7 @@ func (o *AuthenticatorTOTPChallenge) GetResponseErrorsOk() (*map[string][]ErrorD // HasResponseErrors returns a boolean if a field has been set. func (o *AuthenticatorTOTPChallenge) HasResponseErrors() bool { - if o != nil && o.ResponseErrors != nil { + if o != nil && !IsNil(o.ResponseErrors) { return true } @@ -244,29 +247,29 @@ func (o *AuthenticatorTOTPChallenge) SetConfigUrl(v string) { } func (o AuthenticatorTOTPChallenge) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["type"] = o.Type + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.FlowInfo != nil { + return json.Marshal(toSerialize) +} + +func (o AuthenticatorTOTPChallenge) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + if !IsNil(o.FlowInfo) { toSerialize["flow_info"] = o.FlowInfo } - if o.Component != nil { + if !IsNil(o.Component) { toSerialize["component"] = o.Component } - if o.ResponseErrors != nil { + if !IsNil(o.ResponseErrors) { toSerialize["response_errors"] = o.ResponseErrors } - if true { - toSerialize["pending_user"] = o.PendingUser - } - if true { - toSerialize["pending_user_avatar"] = o.PendingUserAvatar - } - if true { - toSerialize["config_url"] = o.ConfigUrl - } - return json.Marshal(toSerialize) + toSerialize["pending_user"] = o.PendingUser + toSerialize["pending_user_avatar"] = o.PendingUserAvatar + toSerialize["config_url"] = o.ConfigUrl + return toSerialize, nil } type NullableAuthenticatorTOTPChallenge struct { diff --git a/model_authenticator_totp_challenge_response_request.go b/model_authenticator_totp_challenge_response_request.go index 9814d4e15..a76ed3e0e 100644 --- a/model_authenticator_totp_challenge_response_request.go +++ b/model_authenticator_totp_challenge_response_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the AuthenticatorTOTPChallengeResponseRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AuthenticatorTOTPChallengeResponseRequest{} + // AuthenticatorTOTPChallengeResponseRequest TOTP Challenge response, device is set by get_response_instance type AuthenticatorTOTPChallengeResponseRequest struct { Component *string `json:"component,omitempty"` @@ -45,7 +48,7 @@ func NewAuthenticatorTOTPChallengeResponseRequestWithDefaults() *AuthenticatorTO // GetComponent returns the Component field value if set, zero value otherwise. func (o *AuthenticatorTOTPChallengeResponseRequest) GetComponent() string { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { var ret string return ret } @@ -55,7 +58,7 @@ func (o *AuthenticatorTOTPChallengeResponseRequest) GetComponent() string { // GetComponentOk returns a tuple with the Component field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorTOTPChallengeResponseRequest) GetComponentOk() (*string, bool) { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { return nil, false } return o.Component, true @@ -63,7 +66,7 @@ func (o *AuthenticatorTOTPChallengeResponseRequest) GetComponentOk() (*string, b // HasComponent returns a boolean if a field has been set. func (o *AuthenticatorTOTPChallengeResponseRequest) HasComponent() bool { - if o != nil && o.Component != nil { + if o != nil && !IsNil(o.Component) { return true } @@ -100,14 +103,20 @@ func (o *AuthenticatorTOTPChallengeResponseRequest) SetCode(v int32) { } func (o AuthenticatorTOTPChallengeResponseRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AuthenticatorTOTPChallengeResponseRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Component != nil { + if !IsNil(o.Component) { toSerialize["component"] = o.Component } - if true { - toSerialize["code"] = o.Code - } - return json.Marshal(toSerialize) + toSerialize["code"] = o.Code + return toSerialize, nil } type NullableAuthenticatorTOTPChallengeResponseRequest struct { diff --git a/model_authenticator_totp_stage.go b/model_authenticator_totp_stage.go index 8505538ce..64d94f4a5 100644 --- a/model_authenticator_totp_stage.go +++ b/model_authenticator_totp_stage.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the AuthenticatorTOTPStage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AuthenticatorTOTPStage{} + // AuthenticatorTOTPStage AuthenticatorTOTPStage Serializer type AuthenticatorTOTPStage struct { Pk string `json:"pk"` @@ -29,15 +32,15 @@ type AuthenticatorTOTPStage struct { MetaModelName string `json:"meta_model_name"` FlowSet []FlowSet `json:"flow_set,omitempty"` // Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. - ConfigureFlow NullableString `json:"configure_flow,omitempty"` - Digits NullableDigitsEnum `json:"digits"` + ConfigureFlow NullableString `json:"configure_flow,omitempty"` + Digits DigitsEnum `json:"digits"` } // NewAuthenticatorTOTPStage instantiates a new AuthenticatorTOTPStage object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewAuthenticatorTOTPStage(pk string, name string, component string, verboseName string, verboseNamePlural string, metaModelName string, digits NullableDigitsEnum) *AuthenticatorTOTPStage { +func NewAuthenticatorTOTPStage(pk string, name string, component string, verboseName string, verboseNamePlural string, metaModelName string, digits DigitsEnum) *AuthenticatorTOTPStage { this := AuthenticatorTOTPStage{} this.Pk = pk this.Name = name @@ -203,7 +206,7 @@ func (o *AuthenticatorTOTPStage) SetMetaModelName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *AuthenticatorTOTPStage) GetFlowSet() []FlowSet { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSet return ret } @@ -213,7 +216,7 @@ func (o *AuthenticatorTOTPStage) GetFlowSet() []FlowSet { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorTOTPStage) GetFlowSetOk() ([]FlowSet, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -221,7 +224,7 @@ func (o *AuthenticatorTOTPStage) GetFlowSetOk() ([]FlowSet, bool) { // HasFlowSet returns a boolean if a field has been set. func (o *AuthenticatorTOTPStage) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -235,7 +238,7 @@ func (o *AuthenticatorTOTPStage) SetFlowSet(v []FlowSet) { // GetConfigureFlow returns the ConfigureFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *AuthenticatorTOTPStage) GetConfigureFlow() string { - if o == nil || o.ConfigureFlow.Get() == nil { + if o == nil || IsNil(o.ConfigureFlow.Get()) { var ret string return ret } @@ -277,61 +280,53 @@ func (o *AuthenticatorTOTPStage) UnsetConfigureFlow() { } // GetDigits returns the Digits field value -// If the value is explicit nil, the zero value for DigitsEnum will be returned func (o *AuthenticatorTOTPStage) GetDigits() DigitsEnum { - if o == nil || o.Digits.Get() == nil { + if o == nil { var ret DigitsEnum return ret } - return *o.Digits.Get() + return o.Digits } // GetDigitsOk returns a tuple with the Digits field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *AuthenticatorTOTPStage) GetDigitsOk() (*DigitsEnum, bool) { if o == nil { return nil, false } - return o.Digits.Get(), o.Digits.IsSet() + return &o.Digits, true } // SetDigits sets field value func (o *AuthenticatorTOTPStage) SetDigits(v DigitsEnum) { - o.Digits.Set(&v) + o.Digits = v } func (o AuthenticatorTOTPStage) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["component"] = o.Component - } - if true { - toSerialize["verbose_name"] = o.VerboseName - } - if true { - toSerialize["verbose_name_plural"] = o.VerboseNamePlural + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if true { - toSerialize["meta_model_name"] = o.MetaModelName - } - if o.FlowSet != nil { + return json.Marshal(toSerialize) +} + +func (o AuthenticatorTOTPStage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name + // skip: component is readOnly + // skip: verbose_name is readOnly + // skip: verbose_name_plural is readOnly + // skip: meta_model_name is readOnly + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } if o.ConfigureFlow.IsSet() { toSerialize["configure_flow"] = o.ConfigureFlow.Get() } - if true { - toSerialize["digits"] = o.Digits.Get() - } - return json.Marshal(toSerialize) + toSerialize["digits"] = o.Digits + return toSerialize, nil } type NullableAuthenticatorTOTPStage struct { diff --git a/model_authenticator_totp_stage_request.go b/model_authenticator_totp_stage_request.go index 7d2142025..d1c743a8b 100644 --- a/model_authenticator_totp_stage_request.go +++ b/model_authenticator_totp_stage_request.go @@ -15,20 +15,23 @@ import ( "encoding/json" ) +// checks if the AuthenticatorTOTPStageRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AuthenticatorTOTPStageRequest{} + // AuthenticatorTOTPStageRequest AuthenticatorTOTPStage Serializer type AuthenticatorTOTPStageRequest struct { Name string `json:"name"` FlowSet []FlowSetRequest `json:"flow_set,omitempty"` // Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. - ConfigureFlow NullableString `json:"configure_flow,omitempty"` - Digits NullableDigitsEnum `json:"digits"` + ConfigureFlow NullableString `json:"configure_flow,omitempty"` + Digits DigitsEnum `json:"digits"` } // NewAuthenticatorTOTPStageRequest instantiates a new AuthenticatorTOTPStageRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewAuthenticatorTOTPStageRequest(name string, digits NullableDigitsEnum) *AuthenticatorTOTPStageRequest { +func NewAuthenticatorTOTPStageRequest(name string, digits DigitsEnum) *AuthenticatorTOTPStageRequest { this := AuthenticatorTOTPStageRequest{} this.Name = name this.Digits = digits @@ -69,7 +72,7 @@ func (o *AuthenticatorTOTPStageRequest) SetName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *AuthenticatorTOTPStageRequest) GetFlowSet() []FlowSetRequest { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSetRequest return ret } @@ -79,7 +82,7 @@ func (o *AuthenticatorTOTPStageRequest) GetFlowSet() []FlowSetRequest { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorTOTPStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -87,7 +90,7 @@ func (o *AuthenticatorTOTPStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) // HasFlowSet returns a boolean if a field has been set. func (o *AuthenticatorTOTPStageRequest) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -101,7 +104,7 @@ func (o *AuthenticatorTOTPStageRequest) SetFlowSet(v []FlowSetRequest) { // GetConfigureFlow returns the ConfigureFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *AuthenticatorTOTPStageRequest) GetConfigureFlow() string { - if o == nil || o.ConfigureFlow.Get() == nil { + if o == nil || IsNil(o.ConfigureFlow.Get()) { var ret string return ret } @@ -143,46 +146,48 @@ func (o *AuthenticatorTOTPStageRequest) UnsetConfigureFlow() { } // GetDigits returns the Digits field value -// If the value is explicit nil, the zero value for DigitsEnum will be returned func (o *AuthenticatorTOTPStageRequest) GetDigits() DigitsEnum { - if o == nil || o.Digits.Get() == nil { + if o == nil { var ret DigitsEnum return ret } - return *o.Digits.Get() + return o.Digits } // GetDigitsOk returns a tuple with the Digits field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *AuthenticatorTOTPStageRequest) GetDigitsOk() (*DigitsEnum, bool) { if o == nil { return nil, false } - return o.Digits.Get(), o.Digits.IsSet() + return &o.Digits, true } // SetDigits sets field value func (o *AuthenticatorTOTPStageRequest) SetDigits(v DigitsEnum) { - o.Digits.Set(&v) + o.Digits = v } func (o AuthenticatorTOTPStageRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.FlowSet != nil { + return json.Marshal(toSerialize) +} + +func (o AuthenticatorTOTPStageRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } if o.ConfigureFlow.IsSet() { toSerialize["configure_flow"] = o.ConfigureFlow.Get() } - if true { - toSerialize["digits"] = o.Digits.Get() - } - return json.Marshal(toSerialize) + toSerialize["digits"] = o.Digits + return toSerialize, nil } type NullableAuthenticatorTOTPStageRequest struct { diff --git a/model_authenticator_validate_stage.go b/model_authenticator_validate_stage.go index fe24db20c..418176d78 100644 --- a/model_authenticator_validate_stage.go +++ b/model_authenticator_validate_stage.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the AuthenticatorValidateStage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AuthenticatorValidateStage{} + // AuthenticatorValidateStage AuthenticatorValidateStage Serializer type AuthenticatorValidateStage struct { Pk string `json:"pk"` @@ -34,9 +37,8 @@ type AuthenticatorValidateStage struct { // Stages used to configure Authenticator when user doesn't have any compatible devices. After this configuration Stage passes, the user is not prompted again. ConfigurationStages []string `json:"configuration_stages,omitempty"` // If any of the user's device has been used within this threshold, this stage will be skipped - LastAuthThreshold *string `json:"last_auth_threshold,omitempty"` - // Enforce user verification for WebAuthn devices. * `required` - Required * `preferred` - Preferred * `discouraged` - Discouraged - WebauthnUserVerification NullableUserVerificationEnum `json:"webauthn_user_verification,omitempty"` + LastAuthThreshold *string `json:"last_auth_threshold,omitempty"` + WebauthnUserVerification *UserVerificationEnum `json:"webauthn_user_verification,omitempty"` } // NewAuthenticatorValidateStage instantiates a new AuthenticatorValidateStage object @@ -208,7 +210,7 @@ func (o *AuthenticatorValidateStage) SetMetaModelName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *AuthenticatorValidateStage) GetFlowSet() []FlowSet { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSet return ret } @@ -218,7 +220,7 @@ func (o *AuthenticatorValidateStage) GetFlowSet() []FlowSet { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorValidateStage) GetFlowSetOk() ([]FlowSet, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -226,7 +228,7 @@ func (o *AuthenticatorValidateStage) GetFlowSetOk() ([]FlowSet, bool) { // HasFlowSet returns a boolean if a field has been set. func (o *AuthenticatorValidateStage) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -240,7 +242,7 @@ func (o *AuthenticatorValidateStage) SetFlowSet(v []FlowSet) { // GetNotConfiguredAction returns the NotConfiguredAction field value if set, zero value otherwise. func (o *AuthenticatorValidateStage) GetNotConfiguredAction() NotConfiguredActionEnum { - if o == nil || o.NotConfiguredAction == nil { + if o == nil || IsNil(o.NotConfiguredAction) { var ret NotConfiguredActionEnum return ret } @@ -250,7 +252,7 @@ func (o *AuthenticatorValidateStage) GetNotConfiguredAction() NotConfiguredActio // GetNotConfiguredActionOk returns a tuple with the NotConfiguredAction field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorValidateStage) GetNotConfiguredActionOk() (*NotConfiguredActionEnum, bool) { - if o == nil || o.NotConfiguredAction == nil { + if o == nil || IsNil(o.NotConfiguredAction) { return nil, false } return o.NotConfiguredAction, true @@ -258,7 +260,7 @@ func (o *AuthenticatorValidateStage) GetNotConfiguredActionOk() (*NotConfiguredA // HasNotConfiguredAction returns a boolean if a field has been set. func (o *AuthenticatorValidateStage) HasNotConfiguredAction() bool { - if o != nil && o.NotConfiguredAction != nil { + if o != nil && !IsNil(o.NotConfiguredAction) { return true } @@ -272,7 +274,7 @@ func (o *AuthenticatorValidateStage) SetNotConfiguredAction(v NotConfiguredActio // GetDeviceClasses returns the DeviceClasses field value if set, zero value otherwise. func (o *AuthenticatorValidateStage) GetDeviceClasses() []DeviceClassesEnum { - if o == nil || o.DeviceClasses == nil { + if o == nil || IsNil(o.DeviceClasses) { var ret []DeviceClassesEnum return ret } @@ -282,7 +284,7 @@ func (o *AuthenticatorValidateStage) GetDeviceClasses() []DeviceClassesEnum { // GetDeviceClassesOk returns a tuple with the DeviceClasses field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorValidateStage) GetDeviceClassesOk() ([]DeviceClassesEnum, bool) { - if o == nil || o.DeviceClasses == nil { + if o == nil || IsNil(o.DeviceClasses) { return nil, false } return o.DeviceClasses, true @@ -290,7 +292,7 @@ func (o *AuthenticatorValidateStage) GetDeviceClassesOk() ([]DeviceClassesEnum, // HasDeviceClasses returns a boolean if a field has been set. func (o *AuthenticatorValidateStage) HasDeviceClasses() bool { - if o != nil && o.DeviceClasses != nil { + if o != nil && !IsNil(o.DeviceClasses) { return true } @@ -304,7 +306,7 @@ func (o *AuthenticatorValidateStage) SetDeviceClasses(v []DeviceClassesEnum) { // GetConfigurationStages returns the ConfigurationStages field value if set, zero value otherwise. func (o *AuthenticatorValidateStage) GetConfigurationStages() []string { - if o == nil || o.ConfigurationStages == nil { + if o == nil || IsNil(o.ConfigurationStages) { var ret []string return ret } @@ -314,7 +316,7 @@ func (o *AuthenticatorValidateStage) GetConfigurationStages() []string { // GetConfigurationStagesOk returns a tuple with the ConfigurationStages field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorValidateStage) GetConfigurationStagesOk() ([]string, bool) { - if o == nil || o.ConfigurationStages == nil { + if o == nil || IsNil(o.ConfigurationStages) { return nil, false } return o.ConfigurationStages, true @@ -322,7 +324,7 @@ func (o *AuthenticatorValidateStage) GetConfigurationStagesOk() ([]string, bool) // HasConfigurationStages returns a boolean if a field has been set. func (o *AuthenticatorValidateStage) HasConfigurationStages() bool { - if o != nil && o.ConfigurationStages != nil { + if o != nil && !IsNil(o.ConfigurationStages) { return true } @@ -336,7 +338,7 @@ func (o *AuthenticatorValidateStage) SetConfigurationStages(v []string) { // GetLastAuthThreshold returns the LastAuthThreshold field value if set, zero value otherwise. func (o *AuthenticatorValidateStage) GetLastAuthThreshold() string { - if o == nil || o.LastAuthThreshold == nil { + if o == nil || IsNil(o.LastAuthThreshold) { var ret string return ret } @@ -346,7 +348,7 @@ func (o *AuthenticatorValidateStage) GetLastAuthThreshold() string { // GetLastAuthThresholdOk returns a tuple with the LastAuthThreshold field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorValidateStage) GetLastAuthThresholdOk() (*string, bool) { - if o == nil || o.LastAuthThreshold == nil { + if o == nil || IsNil(o.LastAuthThreshold) { return nil, false } return o.LastAuthThreshold, true @@ -354,7 +356,7 @@ func (o *AuthenticatorValidateStage) GetLastAuthThresholdOk() (*string, bool) { // HasLastAuthThreshold returns a boolean if a field has been set. func (o *AuthenticatorValidateStage) HasLastAuthThreshold() bool { - if o != nil && o.LastAuthThreshold != nil { + if o != nil && !IsNil(o.LastAuthThreshold) { return true } @@ -366,88 +368,73 @@ func (o *AuthenticatorValidateStage) SetLastAuthThreshold(v string) { o.LastAuthThreshold = &v } -// GetWebauthnUserVerification returns the WebauthnUserVerification field value if set, zero value otherwise (both if not set or set to explicit null). +// GetWebauthnUserVerification returns the WebauthnUserVerification field value if set, zero value otherwise. func (o *AuthenticatorValidateStage) GetWebauthnUserVerification() UserVerificationEnum { - if o == nil || o.WebauthnUserVerification.Get() == nil { + if o == nil || IsNil(o.WebauthnUserVerification) { var ret UserVerificationEnum return ret } - return *o.WebauthnUserVerification.Get() + return *o.WebauthnUserVerification } // GetWebauthnUserVerificationOk returns a tuple with the WebauthnUserVerification field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *AuthenticatorValidateStage) GetWebauthnUserVerificationOk() (*UserVerificationEnum, bool) { - if o == nil { + if o == nil || IsNil(o.WebauthnUserVerification) { return nil, false } - return o.WebauthnUserVerification.Get(), o.WebauthnUserVerification.IsSet() + return o.WebauthnUserVerification, true } // HasWebauthnUserVerification returns a boolean if a field has been set. func (o *AuthenticatorValidateStage) HasWebauthnUserVerification() bool { - if o != nil && o.WebauthnUserVerification.IsSet() { + if o != nil && !IsNil(o.WebauthnUserVerification) { return true } return false } -// SetWebauthnUserVerification gets a reference to the given NullableUserVerificationEnum and assigns it to the WebauthnUserVerification field. +// SetWebauthnUserVerification gets a reference to the given UserVerificationEnum and assigns it to the WebauthnUserVerification field. func (o *AuthenticatorValidateStage) SetWebauthnUserVerification(v UserVerificationEnum) { - o.WebauthnUserVerification.Set(&v) -} - -// SetWebauthnUserVerificationNil sets the value for WebauthnUserVerification to be an explicit nil -func (o *AuthenticatorValidateStage) SetWebauthnUserVerificationNil() { - o.WebauthnUserVerification.Set(nil) + o.WebauthnUserVerification = &v } -// UnsetWebauthnUserVerification ensures that no value is present for WebauthnUserVerification, not even an explicit nil -func (o *AuthenticatorValidateStage) UnsetWebauthnUserVerification() { - o.WebauthnUserVerification.Unset() +func (o AuthenticatorValidateStage) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) } -func (o AuthenticatorValidateStage) MarshalJSON() ([]byte, error) { +func (o AuthenticatorValidateStage) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["component"] = o.Component - } - if true { - toSerialize["verbose_name"] = o.VerboseName - } - if true { - toSerialize["verbose_name_plural"] = o.VerboseNamePlural - } - if true { - toSerialize["meta_model_name"] = o.MetaModelName - } - if o.FlowSet != nil { + // skip: pk is readOnly + toSerialize["name"] = o.Name + // skip: component is readOnly + // skip: verbose_name is readOnly + // skip: verbose_name_plural is readOnly + // skip: meta_model_name is readOnly + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } - if o.NotConfiguredAction != nil { + if !IsNil(o.NotConfiguredAction) { toSerialize["not_configured_action"] = o.NotConfiguredAction } - if o.DeviceClasses != nil { + if !IsNil(o.DeviceClasses) { toSerialize["device_classes"] = o.DeviceClasses } - if o.ConfigurationStages != nil { + if !IsNil(o.ConfigurationStages) { toSerialize["configuration_stages"] = o.ConfigurationStages } - if o.LastAuthThreshold != nil { + if !IsNil(o.LastAuthThreshold) { toSerialize["last_auth_threshold"] = o.LastAuthThreshold } - if o.WebauthnUserVerification.IsSet() { - toSerialize["webauthn_user_verification"] = o.WebauthnUserVerification.Get() + if !IsNil(o.WebauthnUserVerification) { + toSerialize["webauthn_user_verification"] = o.WebauthnUserVerification } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableAuthenticatorValidateStage struct { diff --git a/model_authenticator_validate_stage_request.go b/model_authenticator_validate_stage_request.go index cd928d2df..e067729e4 100644 --- a/model_authenticator_validate_stage_request.go +++ b/model_authenticator_validate_stage_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the AuthenticatorValidateStageRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AuthenticatorValidateStageRequest{} + // AuthenticatorValidateStageRequest AuthenticatorValidateStage Serializer type AuthenticatorValidateStageRequest struct { Name string `json:"name"` @@ -25,9 +28,8 @@ type AuthenticatorValidateStageRequest struct { // Stages used to configure Authenticator when user doesn't have any compatible devices. After this configuration Stage passes, the user is not prompted again. ConfigurationStages []string `json:"configuration_stages,omitempty"` // If any of the user's device has been used within this threshold, this stage will be skipped - LastAuthThreshold *string `json:"last_auth_threshold,omitempty"` - // Enforce user verification for WebAuthn devices. * `required` - Required * `preferred` - Preferred * `discouraged` - Discouraged - WebauthnUserVerification NullableUserVerificationEnum `json:"webauthn_user_verification,omitempty"` + LastAuthThreshold *string `json:"last_auth_threshold,omitempty"` + WebauthnUserVerification *UserVerificationEnum `json:"webauthn_user_verification,omitempty"` } // NewAuthenticatorValidateStageRequest instantiates a new AuthenticatorValidateStageRequest object @@ -74,7 +76,7 @@ func (o *AuthenticatorValidateStageRequest) SetName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *AuthenticatorValidateStageRequest) GetFlowSet() []FlowSetRequest { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSetRequest return ret } @@ -84,7 +86,7 @@ func (o *AuthenticatorValidateStageRequest) GetFlowSet() []FlowSetRequest { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorValidateStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -92,7 +94,7 @@ func (o *AuthenticatorValidateStageRequest) GetFlowSetOk() ([]FlowSetRequest, bo // HasFlowSet returns a boolean if a field has been set. func (o *AuthenticatorValidateStageRequest) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -106,7 +108,7 @@ func (o *AuthenticatorValidateStageRequest) SetFlowSet(v []FlowSetRequest) { // GetNotConfiguredAction returns the NotConfiguredAction field value if set, zero value otherwise. func (o *AuthenticatorValidateStageRequest) GetNotConfiguredAction() NotConfiguredActionEnum { - if o == nil || o.NotConfiguredAction == nil { + if o == nil || IsNil(o.NotConfiguredAction) { var ret NotConfiguredActionEnum return ret } @@ -116,7 +118,7 @@ func (o *AuthenticatorValidateStageRequest) GetNotConfiguredAction() NotConfigur // GetNotConfiguredActionOk returns a tuple with the NotConfiguredAction field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorValidateStageRequest) GetNotConfiguredActionOk() (*NotConfiguredActionEnum, bool) { - if o == nil || o.NotConfiguredAction == nil { + if o == nil || IsNil(o.NotConfiguredAction) { return nil, false } return o.NotConfiguredAction, true @@ -124,7 +126,7 @@ func (o *AuthenticatorValidateStageRequest) GetNotConfiguredActionOk() (*NotConf // HasNotConfiguredAction returns a boolean if a field has been set. func (o *AuthenticatorValidateStageRequest) HasNotConfiguredAction() bool { - if o != nil && o.NotConfiguredAction != nil { + if o != nil && !IsNil(o.NotConfiguredAction) { return true } @@ -138,7 +140,7 @@ func (o *AuthenticatorValidateStageRequest) SetNotConfiguredAction(v NotConfigur // GetDeviceClasses returns the DeviceClasses field value if set, zero value otherwise. func (o *AuthenticatorValidateStageRequest) GetDeviceClasses() []DeviceClassesEnum { - if o == nil || o.DeviceClasses == nil { + if o == nil || IsNil(o.DeviceClasses) { var ret []DeviceClassesEnum return ret } @@ -148,7 +150,7 @@ func (o *AuthenticatorValidateStageRequest) GetDeviceClasses() []DeviceClassesEn // GetDeviceClassesOk returns a tuple with the DeviceClasses field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorValidateStageRequest) GetDeviceClassesOk() ([]DeviceClassesEnum, bool) { - if o == nil || o.DeviceClasses == nil { + if o == nil || IsNil(o.DeviceClasses) { return nil, false } return o.DeviceClasses, true @@ -156,7 +158,7 @@ func (o *AuthenticatorValidateStageRequest) GetDeviceClassesOk() ([]DeviceClasse // HasDeviceClasses returns a boolean if a field has been set. func (o *AuthenticatorValidateStageRequest) HasDeviceClasses() bool { - if o != nil && o.DeviceClasses != nil { + if o != nil && !IsNil(o.DeviceClasses) { return true } @@ -170,7 +172,7 @@ func (o *AuthenticatorValidateStageRequest) SetDeviceClasses(v []DeviceClassesEn // GetConfigurationStages returns the ConfigurationStages field value if set, zero value otherwise. func (o *AuthenticatorValidateStageRequest) GetConfigurationStages() []string { - if o == nil || o.ConfigurationStages == nil { + if o == nil || IsNil(o.ConfigurationStages) { var ret []string return ret } @@ -180,7 +182,7 @@ func (o *AuthenticatorValidateStageRequest) GetConfigurationStages() []string { // GetConfigurationStagesOk returns a tuple with the ConfigurationStages field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorValidateStageRequest) GetConfigurationStagesOk() ([]string, bool) { - if o == nil || o.ConfigurationStages == nil { + if o == nil || IsNil(o.ConfigurationStages) { return nil, false } return o.ConfigurationStages, true @@ -188,7 +190,7 @@ func (o *AuthenticatorValidateStageRequest) GetConfigurationStagesOk() ([]string // HasConfigurationStages returns a boolean if a field has been set. func (o *AuthenticatorValidateStageRequest) HasConfigurationStages() bool { - if o != nil && o.ConfigurationStages != nil { + if o != nil && !IsNil(o.ConfigurationStages) { return true } @@ -202,7 +204,7 @@ func (o *AuthenticatorValidateStageRequest) SetConfigurationStages(v []string) { // GetLastAuthThreshold returns the LastAuthThreshold field value if set, zero value otherwise. func (o *AuthenticatorValidateStageRequest) GetLastAuthThreshold() string { - if o == nil || o.LastAuthThreshold == nil { + if o == nil || IsNil(o.LastAuthThreshold) { var ret string return ret } @@ -212,7 +214,7 @@ func (o *AuthenticatorValidateStageRequest) GetLastAuthThreshold() string { // GetLastAuthThresholdOk returns a tuple with the LastAuthThreshold field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorValidateStageRequest) GetLastAuthThresholdOk() (*string, bool) { - if o == nil || o.LastAuthThreshold == nil { + if o == nil || IsNil(o.LastAuthThreshold) { return nil, false } return o.LastAuthThreshold, true @@ -220,7 +222,7 @@ func (o *AuthenticatorValidateStageRequest) GetLastAuthThresholdOk() (*string, b // HasLastAuthThreshold returns a boolean if a field has been set. func (o *AuthenticatorValidateStageRequest) HasLastAuthThreshold() bool { - if o != nil && o.LastAuthThreshold != nil { + if o != nil && !IsNil(o.LastAuthThreshold) { return true } @@ -232,73 +234,68 @@ func (o *AuthenticatorValidateStageRequest) SetLastAuthThreshold(v string) { o.LastAuthThreshold = &v } -// GetWebauthnUserVerification returns the WebauthnUserVerification field value if set, zero value otherwise (both if not set or set to explicit null). +// GetWebauthnUserVerification returns the WebauthnUserVerification field value if set, zero value otherwise. func (o *AuthenticatorValidateStageRequest) GetWebauthnUserVerification() UserVerificationEnum { - if o == nil || o.WebauthnUserVerification.Get() == nil { + if o == nil || IsNil(o.WebauthnUserVerification) { var ret UserVerificationEnum return ret } - return *o.WebauthnUserVerification.Get() + return *o.WebauthnUserVerification } // GetWebauthnUserVerificationOk returns a tuple with the WebauthnUserVerification field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *AuthenticatorValidateStageRequest) GetWebauthnUserVerificationOk() (*UserVerificationEnum, bool) { - if o == nil { + if o == nil || IsNil(o.WebauthnUserVerification) { return nil, false } - return o.WebauthnUserVerification.Get(), o.WebauthnUserVerification.IsSet() + return o.WebauthnUserVerification, true } // HasWebauthnUserVerification returns a boolean if a field has been set. func (o *AuthenticatorValidateStageRequest) HasWebauthnUserVerification() bool { - if o != nil && o.WebauthnUserVerification.IsSet() { + if o != nil && !IsNil(o.WebauthnUserVerification) { return true } return false } -// SetWebauthnUserVerification gets a reference to the given NullableUserVerificationEnum and assigns it to the WebauthnUserVerification field. +// SetWebauthnUserVerification gets a reference to the given UserVerificationEnum and assigns it to the WebauthnUserVerification field. func (o *AuthenticatorValidateStageRequest) SetWebauthnUserVerification(v UserVerificationEnum) { - o.WebauthnUserVerification.Set(&v) + o.WebauthnUserVerification = &v } -// SetWebauthnUserVerificationNil sets the value for WebauthnUserVerification to be an explicit nil -func (o *AuthenticatorValidateStageRequest) SetWebauthnUserVerificationNil() { - o.WebauthnUserVerification.Set(nil) -} - -// UnsetWebauthnUserVerification ensures that no value is present for WebauthnUserVerification, not even an explicit nil -func (o *AuthenticatorValidateStageRequest) UnsetWebauthnUserVerification() { - o.WebauthnUserVerification.Unset() +func (o AuthenticatorValidateStageRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) } -func (o AuthenticatorValidateStageRequest) MarshalJSON() ([]byte, error) { +func (o AuthenticatorValidateStageRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name - } - if o.FlowSet != nil { + toSerialize["name"] = o.Name + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } - if o.NotConfiguredAction != nil { + if !IsNil(o.NotConfiguredAction) { toSerialize["not_configured_action"] = o.NotConfiguredAction } - if o.DeviceClasses != nil { + if !IsNil(o.DeviceClasses) { toSerialize["device_classes"] = o.DeviceClasses } - if o.ConfigurationStages != nil { + if !IsNil(o.ConfigurationStages) { toSerialize["configuration_stages"] = o.ConfigurationStages } - if o.LastAuthThreshold != nil { + if !IsNil(o.LastAuthThreshold) { toSerialize["last_auth_threshold"] = o.LastAuthThreshold } - if o.WebauthnUserVerification.IsSet() { - toSerialize["webauthn_user_verification"] = o.WebauthnUserVerification.Get() + if !IsNil(o.WebauthnUserVerification) { + toSerialize["webauthn_user_verification"] = o.WebauthnUserVerification } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableAuthenticatorValidateStageRequest struct { diff --git a/model_authenticator_validation_challenge.go b/model_authenticator_validation_challenge.go index 97333dfb5..3da442ca7 100644 --- a/model_authenticator_validation_challenge.go +++ b/model_authenticator_validation_challenge.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the AuthenticatorValidationChallenge type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AuthenticatorValidationChallenge{} + // AuthenticatorValidationChallenge Authenticator challenge type AuthenticatorValidationChallenge struct { Type ChallengeChoices `json:"type"` @@ -79,7 +82,7 @@ func (o *AuthenticatorValidationChallenge) SetType(v ChallengeChoices) { // GetFlowInfo returns the FlowInfo field value if set, zero value otherwise. func (o *AuthenticatorValidationChallenge) GetFlowInfo() ContextualFlowInfo { - if o == nil || o.FlowInfo == nil { + if o == nil || IsNil(o.FlowInfo) { var ret ContextualFlowInfo return ret } @@ -89,7 +92,7 @@ func (o *AuthenticatorValidationChallenge) GetFlowInfo() ContextualFlowInfo { // GetFlowInfoOk returns a tuple with the FlowInfo field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorValidationChallenge) GetFlowInfoOk() (*ContextualFlowInfo, bool) { - if o == nil || o.FlowInfo == nil { + if o == nil || IsNil(o.FlowInfo) { return nil, false } return o.FlowInfo, true @@ -97,7 +100,7 @@ func (o *AuthenticatorValidationChallenge) GetFlowInfoOk() (*ContextualFlowInfo, // HasFlowInfo returns a boolean if a field has been set. func (o *AuthenticatorValidationChallenge) HasFlowInfo() bool { - if o != nil && o.FlowInfo != nil { + if o != nil && !IsNil(o.FlowInfo) { return true } @@ -111,7 +114,7 @@ func (o *AuthenticatorValidationChallenge) SetFlowInfo(v ContextualFlowInfo) { // GetComponent returns the Component field value if set, zero value otherwise. func (o *AuthenticatorValidationChallenge) GetComponent() string { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { var ret string return ret } @@ -121,7 +124,7 @@ func (o *AuthenticatorValidationChallenge) GetComponent() string { // GetComponentOk returns a tuple with the Component field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorValidationChallenge) GetComponentOk() (*string, bool) { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { return nil, false } return o.Component, true @@ -129,7 +132,7 @@ func (o *AuthenticatorValidationChallenge) GetComponentOk() (*string, bool) { // HasComponent returns a boolean if a field has been set. func (o *AuthenticatorValidationChallenge) HasComponent() bool { - if o != nil && o.Component != nil { + if o != nil && !IsNil(o.Component) { return true } @@ -143,7 +146,7 @@ func (o *AuthenticatorValidationChallenge) SetComponent(v string) { // GetResponseErrors returns the ResponseErrors field value if set, zero value otherwise. func (o *AuthenticatorValidationChallenge) GetResponseErrors() map[string][]ErrorDetail { - if o == nil || o.ResponseErrors == nil { + if o == nil || IsNil(o.ResponseErrors) { var ret map[string][]ErrorDetail return ret } @@ -153,7 +156,7 @@ func (o *AuthenticatorValidationChallenge) GetResponseErrors() map[string][]Erro // GetResponseErrorsOk returns a tuple with the ResponseErrors field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorValidationChallenge) GetResponseErrorsOk() (*map[string][]ErrorDetail, bool) { - if o == nil || o.ResponseErrors == nil { + if o == nil || IsNil(o.ResponseErrors) { return nil, false } return o.ResponseErrors, true @@ -161,7 +164,7 @@ func (o *AuthenticatorValidationChallenge) GetResponseErrorsOk() (*map[string][] // HasResponseErrors returns a boolean if a field has been set. func (o *AuthenticatorValidationChallenge) HasResponseErrors() bool { - if o != nil && o.ResponseErrors != nil { + if o != nil && !IsNil(o.ResponseErrors) { return true } @@ -270,32 +273,30 @@ func (o *AuthenticatorValidationChallenge) SetConfigurationStages(v []Selectable } func (o AuthenticatorValidationChallenge) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["type"] = o.Type + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.FlowInfo != nil { + return json.Marshal(toSerialize) +} + +func (o AuthenticatorValidationChallenge) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + if !IsNil(o.FlowInfo) { toSerialize["flow_info"] = o.FlowInfo } - if o.Component != nil { + if !IsNil(o.Component) { toSerialize["component"] = o.Component } - if o.ResponseErrors != nil { + if !IsNil(o.ResponseErrors) { toSerialize["response_errors"] = o.ResponseErrors } - if true { - toSerialize["pending_user"] = o.PendingUser - } - if true { - toSerialize["pending_user_avatar"] = o.PendingUserAvatar - } - if true { - toSerialize["device_challenges"] = o.DeviceChallenges - } - if true { - toSerialize["configuration_stages"] = o.ConfigurationStages - } - return json.Marshal(toSerialize) + toSerialize["pending_user"] = o.PendingUser + toSerialize["pending_user_avatar"] = o.PendingUserAvatar + toSerialize["device_challenges"] = o.DeviceChallenges + toSerialize["configuration_stages"] = o.ConfigurationStages + return toSerialize, nil } type NullableAuthenticatorValidationChallenge struct { diff --git a/model_authenticator_validation_challenge_response_request.go b/model_authenticator_validation_challenge_response_request.go index 6e296b696..388ed81ff 100644 --- a/model_authenticator_validation_challenge_response_request.go +++ b/model_authenticator_validation_challenge_response_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the AuthenticatorValidationChallengeResponseRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AuthenticatorValidationChallengeResponseRequest{} + // AuthenticatorValidationChallengeResponseRequest Challenge used for Code-based and WebAuthn authenticators type AuthenticatorValidationChallengeResponseRequest struct { Component *string `json:"component,omitempty"` @@ -48,7 +51,7 @@ func NewAuthenticatorValidationChallengeResponseRequestWithDefaults() *Authentic // GetComponent returns the Component field value if set, zero value otherwise. func (o *AuthenticatorValidationChallengeResponseRequest) GetComponent() string { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { var ret string return ret } @@ -58,7 +61,7 @@ func (o *AuthenticatorValidationChallengeResponseRequest) GetComponent() string // GetComponentOk returns a tuple with the Component field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorValidationChallengeResponseRequest) GetComponentOk() (*string, bool) { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { return nil, false } return o.Component, true @@ -66,7 +69,7 @@ func (o *AuthenticatorValidationChallengeResponseRequest) GetComponentOk() (*str // HasComponent returns a boolean if a field has been set. func (o *AuthenticatorValidationChallengeResponseRequest) HasComponent() bool { - if o != nil && o.Component != nil { + if o != nil && !IsNil(o.Component) { return true } @@ -80,7 +83,7 @@ func (o *AuthenticatorValidationChallengeResponseRequest) SetComponent(v string) // GetSelectedChallenge returns the SelectedChallenge field value if set, zero value otherwise. func (o *AuthenticatorValidationChallengeResponseRequest) GetSelectedChallenge() DeviceChallengeRequest { - if o == nil || o.SelectedChallenge == nil { + if o == nil || IsNil(o.SelectedChallenge) { var ret DeviceChallengeRequest return ret } @@ -90,7 +93,7 @@ func (o *AuthenticatorValidationChallengeResponseRequest) GetSelectedChallenge() // GetSelectedChallengeOk returns a tuple with the SelectedChallenge field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorValidationChallengeResponseRequest) GetSelectedChallengeOk() (*DeviceChallengeRequest, bool) { - if o == nil || o.SelectedChallenge == nil { + if o == nil || IsNil(o.SelectedChallenge) { return nil, false } return o.SelectedChallenge, true @@ -98,7 +101,7 @@ func (o *AuthenticatorValidationChallengeResponseRequest) GetSelectedChallengeOk // HasSelectedChallenge returns a boolean if a field has been set. func (o *AuthenticatorValidationChallengeResponseRequest) HasSelectedChallenge() bool { - if o != nil && o.SelectedChallenge != nil { + if o != nil && !IsNil(o.SelectedChallenge) { return true } @@ -112,7 +115,7 @@ func (o *AuthenticatorValidationChallengeResponseRequest) SetSelectedChallenge(v // GetSelectedStage returns the SelectedStage field value if set, zero value otherwise. func (o *AuthenticatorValidationChallengeResponseRequest) GetSelectedStage() string { - if o == nil || o.SelectedStage == nil { + if o == nil || IsNil(o.SelectedStage) { var ret string return ret } @@ -122,7 +125,7 @@ func (o *AuthenticatorValidationChallengeResponseRequest) GetSelectedStage() str // GetSelectedStageOk returns a tuple with the SelectedStage field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorValidationChallengeResponseRequest) GetSelectedStageOk() (*string, bool) { - if o == nil || o.SelectedStage == nil { + if o == nil || IsNil(o.SelectedStage) { return nil, false } return o.SelectedStage, true @@ -130,7 +133,7 @@ func (o *AuthenticatorValidationChallengeResponseRequest) GetSelectedStageOk() ( // HasSelectedStage returns a boolean if a field has been set. func (o *AuthenticatorValidationChallengeResponseRequest) HasSelectedStage() bool { - if o != nil && o.SelectedStage != nil { + if o != nil && !IsNil(o.SelectedStage) { return true } @@ -144,7 +147,7 @@ func (o *AuthenticatorValidationChallengeResponseRequest) SetSelectedStage(v str // GetCode returns the Code field value if set, zero value otherwise. func (o *AuthenticatorValidationChallengeResponseRequest) GetCode() string { - if o == nil || o.Code == nil { + if o == nil || IsNil(o.Code) { var ret string return ret } @@ -154,7 +157,7 @@ func (o *AuthenticatorValidationChallengeResponseRequest) GetCode() string { // GetCodeOk returns a tuple with the Code field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorValidationChallengeResponseRequest) GetCodeOk() (*string, bool) { - if o == nil || o.Code == nil { + if o == nil || IsNil(o.Code) { return nil, false } return o.Code, true @@ -162,7 +165,7 @@ func (o *AuthenticatorValidationChallengeResponseRequest) GetCodeOk() (*string, // HasCode returns a boolean if a field has been set. func (o *AuthenticatorValidationChallengeResponseRequest) HasCode() bool { - if o != nil && o.Code != nil { + if o != nil && !IsNil(o.Code) { return true } @@ -176,7 +179,7 @@ func (o *AuthenticatorValidationChallengeResponseRequest) SetCode(v string) { // GetWebauthn returns the Webauthn field value if set, zero value otherwise. func (o *AuthenticatorValidationChallengeResponseRequest) GetWebauthn() map[string]interface{} { - if o == nil || o.Webauthn == nil { + if o == nil || IsNil(o.Webauthn) { var ret map[string]interface{} return ret } @@ -186,15 +189,15 @@ func (o *AuthenticatorValidationChallengeResponseRequest) GetWebauthn() map[stri // GetWebauthnOk returns a tuple with the Webauthn field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorValidationChallengeResponseRequest) GetWebauthnOk() (map[string]interface{}, bool) { - if o == nil || o.Webauthn == nil { - return nil, false + if o == nil || IsNil(o.Webauthn) { + return map[string]interface{}{}, false } return o.Webauthn, true } // HasWebauthn returns a boolean if a field has been set. func (o *AuthenticatorValidationChallengeResponseRequest) HasWebauthn() bool { - if o != nil && o.Webauthn != nil { + if o != nil && !IsNil(o.Webauthn) { return true } @@ -208,7 +211,7 @@ func (o *AuthenticatorValidationChallengeResponseRequest) SetWebauthn(v map[stri // GetDuo returns the Duo field value if set, zero value otherwise. func (o *AuthenticatorValidationChallengeResponseRequest) GetDuo() int32 { - if o == nil || o.Duo == nil { + if o == nil || IsNil(o.Duo) { var ret int32 return ret } @@ -218,7 +221,7 @@ func (o *AuthenticatorValidationChallengeResponseRequest) GetDuo() int32 { // GetDuoOk returns a tuple with the Duo field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorValidationChallengeResponseRequest) GetDuoOk() (*int32, bool) { - if o == nil || o.Duo == nil { + if o == nil || IsNil(o.Duo) { return nil, false } return o.Duo, true @@ -226,7 +229,7 @@ func (o *AuthenticatorValidationChallengeResponseRequest) GetDuoOk() (*int32, bo // HasDuo returns a boolean if a field has been set. func (o *AuthenticatorValidationChallengeResponseRequest) HasDuo() bool { - if o != nil && o.Duo != nil { + if o != nil && !IsNil(o.Duo) { return true } @@ -239,26 +242,34 @@ func (o *AuthenticatorValidationChallengeResponseRequest) SetDuo(v int32) { } func (o AuthenticatorValidationChallengeResponseRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AuthenticatorValidationChallengeResponseRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Component != nil { + if !IsNil(o.Component) { toSerialize["component"] = o.Component } - if o.SelectedChallenge != nil { + if !IsNil(o.SelectedChallenge) { toSerialize["selected_challenge"] = o.SelectedChallenge } - if o.SelectedStage != nil { + if !IsNil(o.SelectedStage) { toSerialize["selected_stage"] = o.SelectedStage } - if o.Code != nil { + if !IsNil(o.Code) { toSerialize["code"] = o.Code } - if o.Webauthn != nil { + if !IsNil(o.Webauthn) { toSerialize["webauthn"] = o.Webauthn } - if o.Duo != nil { + if !IsNil(o.Duo) { toSerialize["duo"] = o.Duo } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableAuthenticatorValidationChallengeResponseRequest struct { diff --git a/model_authenticator_web_authn_challenge.go b/model_authenticator_web_authn_challenge.go index 411c6f81b..0f938feb9 100644 --- a/model_authenticator_web_authn_challenge.go +++ b/model_authenticator_web_authn_challenge.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the AuthenticatorWebAuthnChallenge type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AuthenticatorWebAuthnChallenge{} + // AuthenticatorWebAuthnChallenge WebAuthn Challenge type AuthenticatorWebAuthnChallenge struct { Type ChallengeChoices `json:"type"` @@ -77,7 +80,7 @@ func (o *AuthenticatorWebAuthnChallenge) SetType(v ChallengeChoices) { // GetFlowInfo returns the FlowInfo field value if set, zero value otherwise. func (o *AuthenticatorWebAuthnChallenge) GetFlowInfo() ContextualFlowInfo { - if o == nil || o.FlowInfo == nil { + if o == nil || IsNil(o.FlowInfo) { var ret ContextualFlowInfo return ret } @@ -87,7 +90,7 @@ func (o *AuthenticatorWebAuthnChallenge) GetFlowInfo() ContextualFlowInfo { // GetFlowInfoOk returns a tuple with the FlowInfo field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorWebAuthnChallenge) GetFlowInfoOk() (*ContextualFlowInfo, bool) { - if o == nil || o.FlowInfo == nil { + if o == nil || IsNil(o.FlowInfo) { return nil, false } return o.FlowInfo, true @@ -95,7 +98,7 @@ func (o *AuthenticatorWebAuthnChallenge) GetFlowInfoOk() (*ContextualFlowInfo, b // HasFlowInfo returns a boolean if a field has been set. func (o *AuthenticatorWebAuthnChallenge) HasFlowInfo() bool { - if o != nil && o.FlowInfo != nil { + if o != nil && !IsNil(o.FlowInfo) { return true } @@ -109,7 +112,7 @@ func (o *AuthenticatorWebAuthnChallenge) SetFlowInfo(v ContextualFlowInfo) { // GetComponent returns the Component field value if set, zero value otherwise. func (o *AuthenticatorWebAuthnChallenge) GetComponent() string { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { var ret string return ret } @@ -119,7 +122,7 @@ func (o *AuthenticatorWebAuthnChallenge) GetComponent() string { // GetComponentOk returns a tuple with the Component field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorWebAuthnChallenge) GetComponentOk() (*string, bool) { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { return nil, false } return o.Component, true @@ -127,7 +130,7 @@ func (o *AuthenticatorWebAuthnChallenge) GetComponentOk() (*string, bool) { // HasComponent returns a boolean if a field has been set. func (o *AuthenticatorWebAuthnChallenge) HasComponent() bool { - if o != nil && o.Component != nil { + if o != nil && !IsNil(o.Component) { return true } @@ -141,7 +144,7 @@ func (o *AuthenticatorWebAuthnChallenge) SetComponent(v string) { // GetResponseErrors returns the ResponseErrors field value if set, zero value otherwise. func (o *AuthenticatorWebAuthnChallenge) GetResponseErrors() map[string][]ErrorDetail { - if o == nil || o.ResponseErrors == nil { + if o == nil || IsNil(o.ResponseErrors) { var ret map[string][]ErrorDetail return ret } @@ -151,7 +154,7 @@ func (o *AuthenticatorWebAuthnChallenge) GetResponseErrors() map[string][]ErrorD // GetResponseErrorsOk returns a tuple with the ResponseErrors field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorWebAuthnChallenge) GetResponseErrorsOk() (*map[string][]ErrorDetail, bool) { - if o == nil || o.ResponseErrors == nil { + if o == nil || IsNil(o.ResponseErrors) { return nil, false } return o.ResponseErrors, true @@ -159,7 +162,7 @@ func (o *AuthenticatorWebAuthnChallenge) GetResponseErrorsOk() (*map[string][]Er // HasResponseErrors returns a boolean if a field has been set. func (o *AuthenticatorWebAuthnChallenge) HasResponseErrors() bool { - if o != nil && o.ResponseErrors != nil { + if o != nil && !IsNil(o.ResponseErrors) { return true } @@ -233,7 +236,7 @@ func (o *AuthenticatorWebAuthnChallenge) GetRegistration() map[string]interface{ // and a boolean to check if the value has been set. func (o *AuthenticatorWebAuthnChallenge) GetRegistrationOk() (map[string]interface{}, bool) { if o == nil { - return nil, false + return map[string]interface{}{}, false } return o.Registration, true } @@ -244,29 +247,29 @@ func (o *AuthenticatorWebAuthnChallenge) SetRegistration(v map[string]interface{ } func (o AuthenticatorWebAuthnChallenge) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["type"] = o.Type + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.FlowInfo != nil { + return json.Marshal(toSerialize) +} + +func (o AuthenticatorWebAuthnChallenge) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + if !IsNil(o.FlowInfo) { toSerialize["flow_info"] = o.FlowInfo } - if o.Component != nil { + if !IsNil(o.Component) { toSerialize["component"] = o.Component } - if o.ResponseErrors != nil { + if !IsNil(o.ResponseErrors) { toSerialize["response_errors"] = o.ResponseErrors } - if true { - toSerialize["pending_user"] = o.PendingUser - } - if true { - toSerialize["pending_user_avatar"] = o.PendingUserAvatar - } - if true { - toSerialize["registration"] = o.Registration - } - return json.Marshal(toSerialize) + toSerialize["pending_user"] = o.PendingUser + toSerialize["pending_user_avatar"] = o.PendingUserAvatar + toSerialize["registration"] = o.Registration + return toSerialize, nil } type NullableAuthenticatorWebAuthnChallenge struct { diff --git a/model_authenticator_web_authn_challenge_response_request.go b/model_authenticator_web_authn_challenge_response_request.go index 7af598583..5f7e5c2b5 100644 --- a/model_authenticator_web_authn_challenge_response_request.go +++ b/model_authenticator_web_authn_challenge_response_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the AuthenticatorWebAuthnChallengeResponseRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AuthenticatorWebAuthnChallengeResponseRequest{} + // AuthenticatorWebAuthnChallengeResponseRequest WebAuthn Challenge response type AuthenticatorWebAuthnChallengeResponseRequest struct { Component *string `json:"component,omitempty"` @@ -45,7 +48,7 @@ func NewAuthenticatorWebAuthnChallengeResponseRequestWithDefaults() *Authenticat // GetComponent returns the Component field value if set, zero value otherwise. func (o *AuthenticatorWebAuthnChallengeResponseRequest) GetComponent() string { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { var ret string return ret } @@ -55,7 +58,7 @@ func (o *AuthenticatorWebAuthnChallengeResponseRequest) GetComponent() string { // GetComponentOk returns a tuple with the Component field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthenticatorWebAuthnChallengeResponseRequest) GetComponentOk() (*string, bool) { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { return nil, false } return o.Component, true @@ -63,7 +66,7 @@ func (o *AuthenticatorWebAuthnChallengeResponseRequest) GetComponentOk() (*strin // HasComponent returns a boolean if a field has been set. func (o *AuthenticatorWebAuthnChallengeResponseRequest) HasComponent() bool { - if o != nil && o.Component != nil { + if o != nil && !IsNil(o.Component) { return true } @@ -89,7 +92,7 @@ func (o *AuthenticatorWebAuthnChallengeResponseRequest) GetResponse() map[string // and a boolean to check if the value has been set. func (o *AuthenticatorWebAuthnChallengeResponseRequest) GetResponseOk() (map[string]interface{}, bool) { if o == nil { - return nil, false + return map[string]interface{}{}, false } return o.Response, true } @@ -100,14 +103,20 @@ func (o *AuthenticatorWebAuthnChallengeResponseRequest) SetResponse(v map[string } func (o AuthenticatorWebAuthnChallengeResponseRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AuthenticatorWebAuthnChallengeResponseRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Component != nil { + if !IsNil(o.Component) { toSerialize["component"] = o.Component } - if true { - toSerialize["response"] = o.Response - } - return json.Marshal(toSerialize) + toSerialize["response"] = o.Response + return toSerialize, nil } type NullableAuthenticatorWebAuthnChallengeResponseRequest struct { diff --git a/model_auto_submit_challenge_response_request.go b/model_auto_submit_challenge_response_request.go index 4f26a6ab3..a94438eec 100644 --- a/model_auto_submit_challenge_response_request.go +++ b/model_auto_submit_challenge_response_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the AutoSubmitChallengeResponseRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AutoSubmitChallengeResponseRequest{} + // AutoSubmitChallengeResponseRequest Pseudo class for autosubmit response type AutoSubmitChallengeResponseRequest struct { Component *string `json:"component,omitempty"` @@ -43,7 +46,7 @@ func NewAutoSubmitChallengeResponseRequestWithDefaults() *AutoSubmitChallengeRes // GetComponent returns the Component field value if set, zero value otherwise. func (o *AutoSubmitChallengeResponseRequest) GetComponent() string { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { var ret string return ret } @@ -53,7 +56,7 @@ func (o *AutoSubmitChallengeResponseRequest) GetComponent() string { // GetComponentOk returns a tuple with the Component field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AutoSubmitChallengeResponseRequest) GetComponentOk() (*string, bool) { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { return nil, false } return o.Component, true @@ -61,7 +64,7 @@ func (o *AutoSubmitChallengeResponseRequest) GetComponentOk() (*string, bool) { // HasComponent returns a boolean if a field has been set. func (o *AutoSubmitChallengeResponseRequest) HasComponent() bool { - if o != nil && o.Component != nil { + if o != nil && !IsNil(o.Component) { return true } @@ -74,11 +77,19 @@ func (o *AutoSubmitChallengeResponseRequest) SetComponent(v string) { } func (o AutoSubmitChallengeResponseRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AutoSubmitChallengeResponseRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Component != nil { + if !IsNil(o.Component) { toSerialize["component"] = o.Component } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableAutoSubmitChallengeResponseRequest struct { diff --git a/model_autosubmit_challenge.go b/model_autosubmit_challenge.go index 7de0fc798..a6810830c 100644 --- a/model_autosubmit_challenge.go +++ b/model_autosubmit_challenge.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the AutosubmitChallenge type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AutosubmitChallenge{} + // AutosubmitChallenge Autosubmit challenge used to send and navigate a POST request type AutosubmitChallenge struct { Type ChallengeChoices `json:"type"` @@ -76,7 +79,7 @@ func (o *AutosubmitChallenge) SetType(v ChallengeChoices) { // GetFlowInfo returns the FlowInfo field value if set, zero value otherwise. func (o *AutosubmitChallenge) GetFlowInfo() ContextualFlowInfo { - if o == nil || o.FlowInfo == nil { + if o == nil || IsNil(o.FlowInfo) { var ret ContextualFlowInfo return ret } @@ -86,7 +89,7 @@ func (o *AutosubmitChallenge) GetFlowInfo() ContextualFlowInfo { // GetFlowInfoOk returns a tuple with the FlowInfo field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AutosubmitChallenge) GetFlowInfoOk() (*ContextualFlowInfo, bool) { - if o == nil || o.FlowInfo == nil { + if o == nil || IsNil(o.FlowInfo) { return nil, false } return o.FlowInfo, true @@ -94,7 +97,7 @@ func (o *AutosubmitChallenge) GetFlowInfoOk() (*ContextualFlowInfo, bool) { // HasFlowInfo returns a boolean if a field has been set. func (o *AutosubmitChallenge) HasFlowInfo() bool { - if o != nil && o.FlowInfo != nil { + if o != nil && !IsNil(o.FlowInfo) { return true } @@ -108,7 +111,7 @@ func (o *AutosubmitChallenge) SetFlowInfo(v ContextualFlowInfo) { // GetComponent returns the Component field value if set, zero value otherwise. func (o *AutosubmitChallenge) GetComponent() string { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { var ret string return ret } @@ -118,7 +121,7 @@ func (o *AutosubmitChallenge) GetComponent() string { // GetComponentOk returns a tuple with the Component field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AutosubmitChallenge) GetComponentOk() (*string, bool) { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { return nil, false } return o.Component, true @@ -126,7 +129,7 @@ func (o *AutosubmitChallenge) GetComponentOk() (*string, bool) { // HasComponent returns a boolean if a field has been set. func (o *AutosubmitChallenge) HasComponent() bool { - if o != nil && o.Component != nil { + if o != nil && !IsNil(o.Component) { return true } @@ -140,7 +143,7 @@ func (o *AutosubmitChallenge) SetComponent(v string) { // GetResponseErrors returns the ResponseErrors field value if set, zero value otherwise. func (o *AutosubmitChallenge) GetResponseErrors() map[string][]ErrorDetail { - if o == nil || o.ResponseErrors == nil { + if o == nil || IsNil(o.ResponseErrors) { var ret map[string][]ErrorDetail return ret } @@ -150,7 +153,7 @@ func (o *AutosubmitChallenge) GetResponseErrors() map[string][]ErrorDetail { // GetResponseErrorsOk returns a tuple with the ResponseErrors field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AutosubmitChallenge) GetResponseErrorsOk() (*map[string][]ErrorDetail, bool) { - if o == nil || o.ResponseErrors == nil { + if o == nil || IsNil(o.ResponseErrors) { return nil, false } return o.ResponseErrors, true @@ -158,7 +161,7 @@ func (o *AutosubmitChallenge) GetResponseErrorsOk() (*map[string][]ErrorDetail, // HasResponseErrors returns a boolean if a field has been set. func (o *AutosubmitChallenge) HasResponseErrors() bool { - if o != nil && o.ResponseErrors != nil { + if o != nil && !IsNil(o.ResponseErrors) { return true } @@ -220,7 +223,7 @@ func (o *AutosubmitChallenge) SetAttrs(v map[string]string) { // GetTitle returns the Title field value if set, zero value otherwise. func (o *AutosubmitChallenge) GetTitle() string { - if o == nil || o.Title == nil { + if o == nil || IsNil(o.Title) { var ret string return ret } @@ -230,7 +233,7 @@ func (o *AutosubmitChallenge) GetTitle() string { // GetTitleOk returns a tuple with the Title field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AutosubmitChallenge) GetTitleOk() (*string, bool) { - if o == nil || o.Title == nil { + if o == nil || IsNil(o.Title) { return nil, false } return o.Title, true @@ -238,7 +241,7 @@ func (o *AutosubmitChallenge) GetTitleOk() (*string, bool) { // HasTitle returns a boolean if a field has been set. func (o *AutosubmitChallenge) HasTitle() bool { - if o != nil && o.Title != nil { + if o != nil && !IsNil(o.Title) { return true } @@ -251,29 +254,31 @@ func (o *AutosubmitChallenge) SetTitle(v string) { } func (o AutosubmitChallenge) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["type"] = o.Type + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.FlowInfo != nil { + return json.Marshal(toSerialize) +} + +func (o AutosubmitChallenge) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + if !IsNil(o.FlowInfo) { toSerialize["flow_info"] = o.FlowInfo } - if o.Component != nil { + if !IsNil(o.Component) { toSerialize["component"] = o.Component } - if o.ResponseErrors != nil { + if !IsNil(o.ResponseErrors) { toSerialize["response_errors"] = o.ResponseErrors } - if true { - toSerialize["url"] = o.Url - } - if true { - toSerialize["attrs"] = o.Attrs - } - if o.Title != nil { + toSerialize["url"] = o.Url + toSerialize["attrs"] = o.Attrs + if !IsNil(o.Title) { toSerialize["title"] = o.Title } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableAutosubmitChallenge struct { diff --git a/model_blueprint_file.go b/model_blueprint_file.go index e07322c8c..7e036e983 100644 --- a/model_blueprint_file.go +++ b/model_blueprint_file.go @@ -16,19 +16,22 @@ import ( "time" ) +// checks if the BlueprintFile type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BlueprintFile{} + // BlueprintFile struct for BlueprintFile type BlueprintFile struct { - Path string `json:"path"` - LastM time.Time `json:"last_m"` - Hash string `json:"hash"` - Meta BlueprintFileMeta `json:"meta"` + Path string `json:"path"` + LastM time.Time `json:"last_m"` + Hash string `json:"hash"` + Meta Metadata `json:"meta"` } // NewBlueprintFile instantiates a new BlueprintFile object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewBlueprintFile(path string, lastM time.Time, hash string, meta BlueprintFileMeta) *BlueprintFile { +func NewBlueprintFile(path string, lastM time.Time, hash string, meta Metadata) *BlueprintFile { this := BlueprintFile{} this.Path = path this.LastM = lastM @@ -118,9 +121,9 @@ func (o *BlueprintFile) SetHash(v string) { } // GetMeta returns the Meta field value -func (o *BlueprintFile) GetMeta() BlueprintFileMeta { +func (o *BlueprintFile) GetMeta() Metadata { if o == nil { - var ret BlueprintFileMeta + var ret Metadata return ret } @@ -129,7 +132,7 @@ func (o *BlueprintFile) GetMeta() BlueprintFileMeta { // GetMetaOk returns a tuple with the Meta field value // and a boolean to check if the value has been set. -func (o *BlueprintFile) GetMetaOk() (*BlueprintFileMeta, bool) { +func (o *BlueprintFile) GetMetaOk() (*Metadata, bool) { if o == nil { return nil, false } @@ -137,27 +140,27 @@ func (o *BlueprintFile) GetMetaOk() (*BlueprintFileMeta, bool) { } // SetMeta sets field value -func (o *BlueprintFile) SetMeta(v BlueprintFileMeta) { +func (o *BlueprintFile) SetMeta(v Metadata) { o.Meta = v } func (o BlueprintFile) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["path"] = o.Path - } - if true { - toSerialize["last_m"] = o.LastM - } - if true { - toSerialize["hash"] = o.Hash - } - if true { - toSerialize["meta"] = o.Meta + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o BlueprintFile) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["path"] = o.Path + toSerialize["last_m"] = o.LastM + toSerialize["hash"] = o.Hash + // skip: meta is readOnly + return toSerialize, nil +} + type NullableBlueprintFile struct { value *BlueprintFile isSet bool diff --git a/model_blueprint_file_meta.go b/model_blueprint_file_meta.go deleted file mode 100644 index e3165ca98..000000000 --- a/model_blueprint_file_meta.go +++ /dev/null @@ -1,136 +0,0 @@ -/* -authentik - -Making authentication simple. - -API version: 2023.3.1 -Contact: hello@goauthentik.io -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package api - -import ( - "encoding/json" -) - -// BlueprintFileMeta struct for BlueprintFileMeta -type BlueprintFileMeta struct { - Name string `json:"name"` - Labels map[string]interface{} `json:"labels"` -} - -// NewBlueprintFileMeta instantiates a new BlueprintFileMeta object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewBlueprintFileMeta(name string, labels map[string]interface{}) *BlueprintFileMeta { - this := BlueprintFileMeta{} - this.Name = name - this.Labels = labels - return &this -} - -// NewBlueprintFileMetaWithDefaults instantiates a new BlueprintFileMeta object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewBlueprintFileMetaWithDefaults() *BlueprintFileMeta { - this := BlueprintFileMeta{} - return &this -} - -// GetName returns the Name field value -func (o *BlueprintFileMeta) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *BlueprintFileMeta) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *BlueprintFileMeta) SetName(v string) { - o.Name = v -} - -// GetLabels returns the Labels field value -func (o *BlueprintFileMeta) GetLabels() map[string]interface{} { - if o == nil { - var ret map[string]interface{} - return ret - } - - return o.Labels -} - -// GetLabelsOk returns a tuple with the Labels field value -// and a boolean to check if the value has been set. -func (o *BlueprintFileMeta) GetLabelsOk() (map[string]interface{}, bool) { - if o == nil { - return nil, false - } - return o.Labels, true -} - -// SetLabels sets field value -func (o *BlueprintFileMeta) SetLabels(v map[string]interface{}) { - o.Labels = v -} - -func (o BlueprintFileMeta) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["labels"] = o.Labels - } - return json.Marshal(toSerialize) -} - -type NullableBlueprintFileMeta struct { - value *BlueprintFileMeta - isSet bool -} - -func (v NullableBlueprintFileMeta) Get() *BlueprintFileMeta { - return v.value -} - -func (v *NullableBlueprintFileMeta) Set(val *BlueprintFileMeta) { - v.value = val - v.isSet = true -} - -func (v NullableBlueprintFileMeta) IsSet() bool { - return v.isSet -} - -func (v *NullableBlueprintFileMeta) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBlueprintFileMeta(val *BlueprintFileMeta) *NullableBlueprintFileMeta { - return &NullableBlueprintFileMeta{value: val, isSet: true} -} - -func (v NullableBlueprintFileMeta) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBlueprintFileMeta) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/model_blueprint_instance.go b/model_blueprint_instance.go index d5cd6953d..eef23824c 100644 --- a/model_blueprint_instance.go +++ b/model_blueprint_instance.go @@ -16,26 +16,29 @@ import ( "time" ) +// checks if the BlueprintInstance type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BlueprintInstance{} + // BlueprintInstance Info about a single blueprint instance file type BlueprintInstance struct { - Pk string `json:"pk"` - Name string `json:"name"` - Path *string `json:"path,omitempty"` - Context map[string]interface{} `json:"context,omitempty"` - LastApplied time.Time `json:"last_applied"` - LastAppliedHash string `json:"last_applied_hash"` - Status NullableBlueprintInstanceStatusEnum `json:"status"` - Enabled *bool `json:"enabled,omitempty"` - ManagedModels []string `json:"managed_models"` - Metadata map[string]interface{} `json:"metadata"` - Content *string `json:"content,omitempty"` + Pk string `json:"pk"` + Name string `json:"name"` + Path *string `json:"path,omitempty"` + Context map[string]interface{} `json:"context,omitempty"` + LastApplied time.Time `json:"last_applied"` + LastAppliedHash string `json:"last_applied_hash"` + Status BlueprintInstanceStatusEnum `json:"status"` + Enabled *bool `json:"enabled,omitempty"` + ManagedModels []string `json:"managed_models"` + Metadata map[string]interface{} `json:"metadata"` + Content *string `json:"content,omitempty"` } // NewBlueprintInstance instantiates a new BlueprintInstance object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewBlueprintInstance(pk string, name string, lastApplied time.Time, lastAppliedHash string, status NullableBlueprintInstanceStatusEnum, managedModels []string, metadata map[string]interface{}) *BlueprintInstance { +func NewBlueprintInstance(pk string, name string, lastApplied time.Time, lastAppliedHash string, status BlueprintInstanceStatusEnum, managedModels []string, metadata map[string]interface{}) *BlueprintInstance { this := BlueprintInstance{} this.Pk = pk this.Name = name @@ -109,7 +112,7 @@ func (o *BlueprintInstance) SetName(v string) { // GetPath returns the Path field value if set, zero value otherwise. func (o *BlueprintInstance) GetPath() string { - if o == nil || o.Path == nil { + if o == nil || IsNil(o.Path) { var ret string return ret } @@ -119,7 +122,7 @@ func (o *BlueprintInstance) GetPath() string { // GetPathOk returns a tuple with the Path field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *BlueprintInstance) GetPathOk() (*string, bool) { - if o == nil || o.Path == nil { + if o == nil || IsNil(o.Path) { return nil, false } return o.Path, true @@ -127,7 +130,7 @@ func (o *BlueprintInstance) GetPathOk() (*string, bool) { // HasPath returns a boolean if a field has been set. func (o *BlueprintInstance) HasPath() bool { - if o != nil && o.Path != nil { + if o != nil && !IsNil(o.Path) { return true } @@ -141,7 +144,7 @@ func (o *BlueprintInstance) SetPath(v string) { // GetContext returns the Context field value if set, zero value otherwise. func (o *BlueprintInstance) GetContext() map[string]interface{} { - if o == nil || o.Context == nil { + if o == nil || IsNil(o.Context) { var ret map[string]interface{} return ret } @@ -151,15 +154,15 @@ func (o *BlueprintInstance) GetContext() map[string]interface{} { // GetContextOk returns a tuple with the Context field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *BlueprintInstance) GetContextOk() (map[string]interface{}, bool) { - if o == nil || o.Context == nil { - return nil, false + if o == nil || IsNil(o.Context) { + return map[string]interface{}{}, false } return o.Context, true } // HasContext returns a boolean if a field has been set. func (o *BlueprintInstance) HasContext() bool { - if o != nil && o.Context != nil { + if o != nil && !IsNil(o.Context) { return true } @@ -220,34 +223,32 @@ func (o *BlueprintInstance) SetLastAppliedHash(v string) { } // GetStatus returns the Status field value -// If the value is explicit nil, the zero value for BlueprintInstanceStatusEnum will be returned func (o *BlueprintInstance) GetStatus() BlueprintInstanceStatusEnum { - if o == nil || o.Status.Get() == nil { + if o == nil { var ret BlueprintInstanceStatusEnum return ret } - return *o.Status.Get() + return o.Status } // GetStatusOk returns a tuple with the Status field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *BlueprintInstance) GetStatusOk() (*BlueprintInstanceStatusEnum, bool) { if o == nil { return nil, false } - return o.Status.Get(), o.Status.IsSet() + return &o.Status, true } // SetStatus sets field value func (o *BlueprintInstance) SetStatus(v BlueprintInstanceStatusEnum) { - o.Status.Set(&v) + o.Status = v } // GetEnabled returns the Enabled field value if set, zero value otherwise. func (o *BlueprintInstance) GetEnabled() bool { - if o == nil || o.Enabled == nil { + if o == nil || IsNil(o.Enabled) { var ret bool return ret } @@ -257,7 +258,7 @@ func (o *BlueprintInstance) GetEnabled() bool { // GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *BlueprintInstance) GetEnabledOk() (*bool, bool) { - if o == nil || o.Enabled == nil { + if o == nil || IsNil(o.Enabled) { return nil, false } return o.Enabled, true @@ -265,7 +266,7 @@ func (o *BlueprintInstance) GetEnabledOk() (*bool, bool) { // HasEnabled returns a boolean if a field has been set. func (o *BlueprintInstance) HasEnabled() bool { - if o != nil && o.Enabled != nil { + if o != nil && !IsNil(o.Enabled) { return true } @@ -315,7 +316,7 @@ func (o *BlueprintInstance) GetMetadata() map[string]interface{} { // and a boolean to check if the value has been set. func (o *BlueprintInstance) GetMetadataOk() (map[string]interface{}, bool) { if o == nil { - return nil, false + return map[string]interface{}{}, false } return o.Metadata, true } @@ -327,7 +328,7 @@ func (o *BlueprintInstance) SetMetadata(v map[string]interface{}) { // GetContent returns the Content field value if set, zero value otherwise. func (o *BlueprintInstance) GetContent() string { - if o == nil || o.Content == nil { + if o == nil || IsNil(o.Content) { var ret string return ret } @@ -337,7 +338,7 @@ func (o *BlueprintInstance) GetContent() string { // GetContentOk returns a tuple with the Content field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *BlueprintInstance) GetContentOk() (*string, bool) { - if o == nil || o.Content == nil { + if o == nil || IsNil(o.Content) { return nil, false } return o.Content, true @@ -345,7 +346,7 @@ func (o *BlueprintInstance) GetContentOk() (*string, bool) { // HasContent returns a boolean if a field has been set. func (o *BlueprintInstance) HasContent() bool { - if o != nil && o.Content != nil { + if o != nil && !IsNil(o.Content) { return true } @@ -358,41 +359,35 @@ func (o *BlueprintInstance) SetContent(v string) { } func (o BlueprintInstance) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.Path != nil { + return json.Marshal(toSerialize) +} + +func (o BlueprintInstance) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name + if !IsNil(o.Path) { toSerialize["path"] = o.Path } - if o.Context != nil { + if !IsNil(o.Context) { toSerialize["context"] = o.Context } - if true { - toSerialize["last_applied"] = o.LastApplied - } - if true { - toSerialize["last_applied_hash"] = o.LastAppliedHash - } - if true { - toSerialize["status"] = o.Status.Get() - } - if o.Enabled != nil { + // skip: last_applied is readOnly + // skip: last_applied_hash is readOnly + // skip: status is readOnly + if !IsNil(o.Enabled) { toSerialize["enabled"] = o.Enabled } - if true { - toSerialize["managed_models"] = o.ManagedModels - } - if true { - toSerialize["metadata"] = o.Metadata - } - if o.Content != nil { + // skip: managed_models is readOnly + // skip: metadata is readOnly + if !IsNil(o.Content) { toSerialize["content"] = o.Content } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableBlueprintInstance struct { diff --git a/model_blueprint_instance_request.go b/model_blueprint_instance_request.go index c8180d02f..31a48b940 100644 --- a/model_blueprint_instance_request.go +++ b/model_blueprint_instance_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the BlueprintInstanceRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BlueprintInstanceRequest{} + // BlueprintInstanceRequest Info about a single blueprint instance file type BlueprintInstanceRequest struct { Name string `json:"name"` @@ -72,7 +75,7 @@ func (o *BlueprintInstanceRequest) SetName(v string) { // GetPath returns the Path field value if set, zero value otherwise. func (o *BlueprintInstanceRequest) GetPath() string { - if o == nil || o.Path == nil { + if o == nil || IsNil(o.Path) { var ret string return ret } @@ -82,7 +85,7 @@ func (o *BlueprintInstanceRequest) GetPath() string { // GetPathOk returns a tuple with the Path field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *BlueprintInstanceRequest) GetPathOk() (*string, bool) { - if o == nil || o.Path == nil { + if o == nil || IsNil(o.Path) { return nil, false } return o.Path, true @@ -90,7 +93,7 @@ func (o *BlueprintInstanceRequest) GetPathOk() (*string, bool) { // HasPath returns a boolean if a field has been set. func (o *BlueprintInstanceRequest) HasPath() bool { - if o != nil && o.Path != nil { + if o != nil && !IsNil(o.Path) { return true } @@ -104,7 +107,7 @@ func (o *BlueprintInstanceRequest) SetPath(v string) { // GetContext returns the Context field value if set, zero value otherwise. func (o *BlueprintInstanceRequest) GetContext() map[string]interface{} { - if o == nil || o.Context == nil { + if o == nil || IsNil(o.Context) { var ret map[string]interface{} return ret } @@ -114,15 +117,15 @@ func (o *BlueprintInstanceRequest) GetContext() map[string]interface{} { // GetContextOk returns a tuple with the Context field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *BlueprintInstanceRequest) GetContextOk() (map[string]interface{}, bool) { - if o == nil || o.Context == nil { - return nil, false + if o == nil || IsNil(o.Context) { + return map[string]interface{}{}, false } return o.Context, true } // HasContext returns a boolean if a field has been set. func (o *BlueprintInstanceRequest) HasContext() bool { - if o != nil && o.Context != nil { + if o != nil && !IsNil(o.Context) { return true } @@ -136,7 +139,7 @@ func (o *BlueprintInstanceRequest) SetContext(v map[string]interface{}) { // GetEnabled returns the Enabled field value if set, zero value otherwise. func (o *BlueprintInstanceRequest) GetEnabled() bool { - if o == nil || o.Enabled == nil { + if o == nil || IsNil(o.Enabled) { var ret bool return ret } @@ -146,7 +149,7 @@ func (o *BlueprintInstanceRequest) GetEnabled() bool { // GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *BlueprintInstanceRequest) GetEnabledOk() (*bool, bool) { - if o == nil || o.Enabled == nil { + if o == nil || IsNil(o.Enabled) { return nil, false } return o.Enabled, true @@ -154,7 +157,7 @@ func (o *BlueprintInstanceRequest) GetEnabledOk() (*bool, bool) { // HasEnabled returns a boolean if a field has been set. func (o *BlueprintInstanceRequest) HasEnabled() bool { - if o != nil && o.Enabled != nil { + if o != nil && !IsNil(o.Enabled) { return true } @@ -168,7 +171,7 @@ func (o *BlueprintInstanceRequest) SetEnabled(v bool) { // GetContent returns the Content field value if set, zero value otherwise. func (o *BlueprintInstanceRequest) GetContent() string { - if o == nil || o.Content == nil { + if o == nil || IsNil(o.Content) { var ret string return ret } @@ -178,7 +181,7 @@ func (o *BlueprintInstanceRequest) GetContent() string { // GetContentOk returns a tuple with the Content field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *BlueprintInstanceRequest) GetContentOk() (*string, bool) { - if o == nil || o.Content == nil { + if o == nil || IsNil(o.Content) { return nil, false } return o.Content, true @@ -186,7 +189,7 @@ func (o *BlueprintInstanceRequest) GetContentOk() (*string, bool) { // HasContent returns a boolean if a field has been set. func (o *BlueprintInstanceRequest) HasContent() bool { - if o != nil && o.Content != nil { + if o != nil && !IsNil(o.Content) { return true } @@ -199,23 +202,29 @@ func (o *BlueprintInstanceRequest) SetContent(v string) { } func (o BlueprintInstanceRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.Path != nil { + return json.Marshal(toSerialize) +} + +func (o BlueprintInstanceRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Path) { toSerialize["path"] = o.Path } - if o.Context != nil { + if !IsNil(o.Context) { toSerialize["context"] = o.Context } - if o.Enabled != nil { + if !IsNil(o.Enabled) { toSerialize["enabled"] = o.Enabled } - if o.Content != nil { + if !IsNil(o.Content) { toSerialize["content"] = o.Content } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableBlueprintInstanceRequest struct { diff --git a/model_cache.go b/model_cache.go index 65a13d08c..f0edb9532 100644 --- a/model_cache.go +++ b/model_cache.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the Cache type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Cache{} + // Cache Generic cache stats for an object type Cache struct { Count int32 `json:"count"` @@ -63,13 +66,19 @@ func (o *Cache) SetCount(v int32) { } func (o Cache) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["count"] = o.Count + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o Cache) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: count is readOnly + return toSerialize, nil +} + type NullableCache struct { value *Cache isSet bool diff --git a/model_captcha_challenge.go b/model_captcha_challenge.go index 2789edccf..c8adfefac 100644 --- a/model_captcha_challenge.go +++ b/model_captcha_challenge.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the CaptchaChallenge type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CaptchaChallenge{} + // CaptchaChallenge Site public key type CaptchaChallenge struct { Type ChallengeChoices `json:"type"` @@ -79,7 +82,7 @@ func (o *CaptchaChallenge) SetType(v ChallengeChoices) { // GetFlowInfo returns the FlowInfo field value if set, zero value otherwise. func (o *CaptchaChallenge) GetFlowInfo() ContextualFlowInfo { - if o == nil || o.FlowInfo == nil { + if o == nil || IsNil(o.FlowInfo) { var ret ContextualFlowInfo return ret } @@ -89,7 +92,7 @@ func (o *CaptchaChallenge) GetFlowInfo() ContextualFlowInfo { // GetFlowInfoOk returns a tuple with the FlowInfo field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *CaptchaChallenge) GetFlowInfoOk() (*ContextualFlowInfo, bool) { - if o == nil || o.FlowInfo == nil { + if o == nil || IsNil(o.FlowInfo) { return nil, false } return o.FlowInfo, true @@ -97,7 +100,7 @@ func (o *CaptchaChallenge) GetFlowInfoOk() (*ContextualFlowInfo, bool) { // HasFlowInfo returns a boolean if a field has been set. func (o *CaptchaChallenge) HasFlowInfo() bool { - if o != nil && o.FlowInfo != nil { + if o != nil && !IsNil(o.FlowInfo) { return true } @@ -111,7 +114,7 @@ func (o *CaptchaChallenge) SetFlowInfo(v ContextualFlowInfo) { // GetComponent returns the Component field value if set, zero value otherwise. func (o *CaptchaChallenge) GetComponent() string { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { var ret string return ret } @@ -121,7 +124,7 @@ func (o *CaptchaChallenge) GetComponent() string { // GetComponentOk returns a tuple with the Component field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *CaptchaChallenge) GetComponentOk() (*string, bool) { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { return nil, false } return o.Component, true @@ -129,7 +132,7 @@ func (o *CaptchaChallenge) GetComponentOk() (*string, bool) { // HasComponent returns a boolean if a field has been set. func (o *CaptchaChallenge) HasComponent() bool { - if o != nil && o.Component != nil { + if o != nil && !IsNil(o.Component) { return true } @@ -143,7 +146,7 @@ func (o *CaptchaChallenge) SetComponent(v string) { // GetResponseErrors returns the ResponseErrors field value if set, zero value otherwise. func (o *CaptchaChallenge) GetResponseErrors() map[string][]ErrorDetail { - if o == nil || o.ResponseErrors == nil { + if o == nil || IsNil(o.ResponseErrors) { var ret map[string][]ErrorDetail return ret } @@ -153,7 +156,7 @@ func (o *CaptchaChallenge) GetResponseErrors() map[string][]ErrorDetail { // GetResponseErrorsOk returns a tuple with the ResponseErrors field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *CaptchaChallenge) GetResponseErrorsOk() (*map[string][]ErrorDetail, bool) { - if o == nil || o.ResponseErrors == nil { + if o == nil || IsNil(o.ResponseErrors) { return nil, false } return o.ResponseErrors, true @@ -161,7 +164,7 @@ func (o *CaptchaChallenge) GetResponseErrorsOk() (*map[string][]ErrorDetail, boo // HasResponseErrors returns a boolean if a field has been set. func (o *CaptchaChallenge) HasResponseErrors() bool { - if o != nil && o.ResponseErrors != nil { + if o != nil && !IsNil(o.ResponseErrors) { return true } @@ -270,32 +273,30 @@ func (o *CaptchaChallenge) SetJsUrl(v string) { } func (o CaptchaChallenge) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["type"] = o.Type + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.FlowInfo != nil { + return json.Marshal(toSerialize) +} + +func (o CaptchaChallenge) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + if !IsNil(o.FlowInfo) { toSerialize["flow_info"] = o.FlowInfo } - if o.Component != nil { + if !IsNil(o.Component) { toSerialize["component"] = o.Component } - if o.ResponseErrors != nil { + if !IsNil(o.ResponseErrors) { toSerialize["response_errors"] = o.ResponseErrors } - if true { - toSerialize["pending_user"] = o.PendingUser - } - if true { - toSerialize["pending_user_avatar"] = o.PendingUserAvatar - } - if true { - toSerialize["site_key"] = o.SiteKey - } - if true { - toSerialize["js_url"] = o.JsUrl - } - return json.Marshal(toSerialize) + toSerialize["pending_user"] = o.PendingUser + toSerialize["pending_user_avatar"] = o.PendingUserAvatar + toSerialize["site_key"] = o.SiteKey + toSerialize["js_url"] = o.JsUrl + return toSerialize, nil } type NullableCaptchaChallenge struct { diff --git a/model_captcha_challenge_response_request.go b/model_captcha_challenge_response_request.go index c6b051154..208838c31 100644 --- a/model_captcha_challenge_response_request.go +++ b/model_captcha_challenge_response_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the CaptchaChallengeResponseRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CaptchaChallengeResponseRequest{} + // CaptchaChallengeResponseRequest Validate captcha token type CaptchaChallengeResponseRequest struct { Component *string `json:"component,omitempty"` @@ -45,7 +48,7 @@ func NewCaptchaChallengeResponseRequestWithDefaults() *CaptchaChallengeResponseR // GetComponent returns the Component field value if set, zero value otherwise. func (o *CaptchaChallengeResponseRequest) GetComponent() string { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { var ret string return ret } @@ -55,7 +58,7 @@ func (o *CaptchaChallengeResponseRequest) GetComponent() string { // GetComponentOk returns a tuple with the Component field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *CaptchaChallengeResponseRequest) GetComponentOk() (*string, bool) { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { return nil, false } return o.Component, true @@ -63,7 +66,7 @@ func (o *CaptchaChallengeResponseRequest) GetComponentOk() (*string, bool) { // HasComponent returns a boolean if a field has been set. func (o *CaptchaChallengeResponseRequest) HasComponent() bool { - if o != nil && o.Component != nil { + if o != nil && !IsNil(o.Component) { return true } @@ -100,14 +103,20 @@ func (o *CaptchaChallengeResponseRequest) SetToken(v string) { } func (o CaptchaChallengeResponseRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CaptchaChallengeResponseRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Component != nil { + if !IsNil(o.Component) { toSerialize["component"] = o.Component } - if true { - toSerialize["token"] = o.Token - } - return json.Marshal(toSerialize) + toSerialize["token"] = o.Token + return toSerialize, nil } type NullableCaptchaChallengeResponseRequest struct { diff --git a/model_captcha_stage.go b/model_captcha_stage.go index 0ea58beab..673a43e8f 100644 --- a/model_captcha_stage.go +++ b/model_captcha_stage.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the CaptchaStage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CaptchaStage{} + // CaptchaStage CaptchaStage Serializer type CaptchaStage struct { Pk string `json:"pk"` @@ -204,7 +207,7 @@ func (o *CaptchaStage) SetMetaModelName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *CaptchaStage) GetFlowSet() []FlowSet { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSet return ret } @@ -214,7 +217,7 @@ func (o *CaptchaStage) GetFlowSet() []FlowSet { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *CaptchaStage) GetFlowSetOk() ([]FlowSet, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -222,7 +225,7 @@ func (o *CaptchaStage) GetFlowSetOk() ([]FlowSet, bool) { // HasFlowSet returns a boolean if a field has been set. func (o *CaptchaStage) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -260,7 +263,7 @@ func (o *CaptchaStage) SetPublicKey(v string) { // GetJsUrl returns the JsUrl field value if set, zero value otherwise. func (o *CaptchaStage) GetJsUrl() string { - if o == nil || o.JsUrl == nil { + if o == nil || IsNil(o.JsUrl) { var ret string return ret } @@ -270,7 +273,7 @@ func (o *CaptchaStage) GetJsUrl() string { // GetJsUrlOk returns a tuple with the JsUrl field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *CaptchaStage) GetJsUrlOk() (*string, bool) { - if o == nil || o.JsUrl == nil { + if o == nil || IsNil(o.JsUrl) { return nil, false } return o.JsUrl, true @@ -278,7 +281,7 @@ func (o *CaptchaStage) GetJsUrlOk() (*string, bool) { // HasJsUrl returns a boolean if a field has been set. func (o *CaptchaStage) HasJsUrl() bool { - if o != nil && o.JsUrl != nil { + if o != nil && !IsNil(o.JsUrl) { return true } @@ -292,7 +295,7 @@ func (o *CaptchaStage) SetJsUrl(v string) { // GetApiUrl returns the ApiUrl field value if set, zero value otherwise. func (o *CaptchaStage) GetApiUrl() string { - if o == nil || o.ApiUrl == nil { + if o == nil || IsNil(o.ApiUrl) { var ret string return ret } @@ -302,7 +305,7 @@ func (o *CaptchaStage) GetApiUrl() string { // GetApiUrlOk returns a tuple with the ApiUrl field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *CaptchaStage) GetApiUrlOk() (*string, bool) { - if o == nil || o.ApiUrl == nil { + if o == nil || IsNil(o.ApiUrl) { return nil, false } return o.ApiUrl, true @@ -310,7 +313,7 @@ func (o *CaptchaStage) GetApiUrlOk() (*string, bool) { // HasApiUrl returns a boolean if a field has been set. func (o *CaptchaStage) HasApiUrl() bool { - if o != nil && o.ApiUrl != nil { + if o != nil && !IsNil(o.ApiUrl) { return true } @@ -323,38 +326,32 @@ func (o *CaptchaStage) SetApiUrl(v string) { } func (o CaptchaStage) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["component"] = o.Component - } - if true { - toSerialize["verbose_name"] = o.VerboseName - } - if true { - toSerialize["verbose_name_plural"] = o.VerboseNamePlural - } - if true { - toSerialize["meta_model_name"] = o.MetaModelName + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.FlowSet != nil { + return json.Marshal(toSerialize) +} + +func (o CaptchaStage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name + // skip: component is readOnly + // skip: verbose_name is readOnly + // skip: verbose_name_plural is readOnly + // skip: meta_model_name is readOnly + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } - if true { - toSerialize["public_key"] = o.PublicKey - } - if o.JsUrl != nil { + toSerialize["public_key"] = o.PublicKey + if !IsNil(o.JsUrl) { toSerialize["js_url"] = o.JsUrl } - if o.ApiUrl != nil { + if !IsNil(o.ApiUrl) { toSerialize["api_url"] = o.ApiUrl } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableCaptchaStage struct { diff --git a/model_captcha_stage_request.go b/model_captcha_stage_request.go index 7f9909262..cbcf1b6a1 100644 --- a/model_captcha_stage_request.go +++ b/model_captcha_stage_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the CaptchaStageRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CaptchaStageRequest{} + // CaptchaStageRequest CaptchaStage Serializer type CaptchaStageRequest struct { Name string `json:"name"` @@ -73,7 +76,7 @@ func (o *CaptchaStageRequest) SetName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *CaptchaStageRequest) GetFlowSet() []FlowSetRequest { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSetRequest return ret } @@ -83,7 +86,7 @@ func (o *CaptchaStageRequest) GetFlowSet() []FlowSetRequest { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *CaptchaStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -91,7 +94,7 @@ func (o *CaptchaStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { // HasFlowSet returns a boolean if a field has been set. func (o *CaptchaStageRequest) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -153,7 +156,7 @@ func (o *CaptchaStageRequest) SetPrivateKey(v string) { // GetJsUrl returns the JsUrl field value if set, zero value otherwise. func (o *CaptchaStageRequest) GetJsUrl() string { - if o == nil || o.JsUrl == nil { + if o == nil || IsNil(o.JsUrl) { var ret string return ret } @@ -163,7 +166,7 @@ func (o *CaptchaStageRequest) GetJsUrl() string { // GetJsUrlOk returns a tuple with the JsUrl field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *CaptchaStageRequest) GetJsUrlOk() (*string, bool) { - if o == nil || o.JsUrl == nil { + if o == nil || IsNil(o.JsUrl) { return nil, false } return o.JsUrl, true @@ -171,7 +174,7 @@ func (o *CaptchaStageRequest) GetJsUrlOk() (*string, bool) { // HasJsUrl returns a boolean if a field has been set. func (o *CaptchaStageRequest) HasJsUrl() bool { - if o != nil && o.JsUrl != nil { + if o != nil && !IsNil(o.JsUrl) { return true } @@ -185,7 +188,7 @@ func (o *CaptchaStageRequest) SetJsUrl(v string) { // GetApiUrl returns the ApiUrl field value if set, zero value otherwise. func (o *CaptchaStageRequest) GetApiUrl() string { - if o == nil || o.ApiUrl == nil { + if o == nil || IsNil(o.ApiUrl) { var ret string return ret } @@ -195,7 +198,7 @@ func (o *CaptchaStageRequest) GetApiUrl() string { // GetApiUrlOk returns a tuple with the ApiUrl field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *CaptchaStageRequest) GetApiUrlOk() (*string, bool) { - if o == nil || o.ApiUrl == nil { + if o == nil || IsNil(o.ApiUrl) { return nil, false } return o.ApiUrl, true @@ -203,7 +206,7 @@ func (o *CaptchaStageRequest) GetApiUrlOk() (*string, bool) { // HasApiUrl returns a boolean if a field has been set. func (o *CaptchaStageRequest) HasApiUrl() bool { - if o != nil && o.ApiUrl != nil { + if o != nil && !IsNil(o.ApiUrl) { return true } @@ -216,26 +219,28 @@ func (o *CaptchaStageRequest) SetApiUrl(v string) { } func (o CaptchaStageRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.FlowSet != nil { + return json.Marshal(toSerialize) +} + +func (o CaptchaStageRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } - if true { - toSerialize["public_key"] = o.PublicKey - } - if true { - toSerialize["private_key"] = o.PrivateKey - } - if o.JsUrl != nil { + toSerialize["public_key"] = o.PublicKey + toSerialize["private_key"] = o.PrivateKey + if !IsNil(o.JsUrl) { toSerialize["js_url"] = o.JsUrl } - if o.ApiUrl != nil { + if !IsNil(o.ApiUrl) { toSerialize["api_url"] = o.ApiUrl } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableCaptchaStageRequest struct { diff --git a/model_certificate_data.go b/model_certificate_data.go index 55f3ec04a..48acb816e 100644 --- a/model_certificate_data.go +++ b/model_certificate_data.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the CertificateData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CertificateData{} + // CertificateData Get CertificateKeyPair's data type CertificateData struct { Data string `json:"data"` @@ -63,13 +66,19 @@ func (o *CertificateData) SetData(v string) { } func (o CertificateData) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["data"] = o.Data + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o CertificateData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: data is readOnly + return toSerialize, nil +} + type NullableCertificateData struct { value *CertificateData isSet bool diff --git a/model_certificate_generation_request.go b/model_certificate_generation_request.go index 7a7cd6e72..557668006 100644 --- a/model_certificate_generation_request.go +++ b/model_certificate_generation_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the CertificateGenerationRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CertificateGenerationRequest{} + // CertificateGenerationRequest Certificate generation parameters type CertificateGenerationRequest struct { CommonName string `json:"common_name"` @@ -67,7 +70,7 @@ func (o *CertificateGenerationRequest) SetCommonName(v string) { // GetSubjectAltName returns the SubjectAltName field value if set, zero value otherwise. func (o *CertificateGenerationRequest) GetSubjectAltName() string { - if o == nil || o.SubjectAltName == nil { + if o == nil || IsNil(o.SubjectAltName) { var ret string return ret } @@ -77,7 +80,7 @@ func (o *CertificateGenerationRequest) GetSubjectAltName() string { // GetSubjectAltNameOk returns a tuple with the SubjectAltName field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *CertificateGenerationRequest) GetSubjectAltNameOk() (*string, bool) { - if o == nil || o.SubjectAltName == nil { + if o == nil || IsNil(o.SubjectAltName) { return nil, false } return o.SubjectAltName, true @@ -85,7 +88,7 @@ func (o *CertificateGenerationRequest) GetSubjectAltNameOk() (*string, bool) { // HasSubjectAltName returns a boolean if a field has been set. func (o *CertificateGenerationRequest) HasSubjectAltName() bool { - if o != nil && o.SubjectAltName != nil { + if o != nil && !IsNil(o.SubjectAltName) { return true } @@ -122,17 +125,21 @@ func (o *CertificateGenerationRequest) SetValidityDays(v int32) { } func (o CertificateGenerationRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["common_name"] = o.CommonName + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.SubjectAltName != nil { + return json.Marshal(toSerialize) +} + +func (o CertificateGenerationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["common_name"] = o.CommonName + if !IsNil(o.SubjectAltName) { toSerialize["subject_alt_name"] = o.SubjectAltName } - if true { - toSerialize["validity_days"] = o.ValidityDays - } - return json.Marshal(toSerialize) + toSerialize["validity_days"] = o.ValidityDays + return toSerialize, nil } type NullableCertificateGenerationRequest struct { diff --git a/model_certificate_key_pair.go b/model_certificate_key_pair.go index 26b330582..4d8341a34 100644 --- a/model_certificate_key_pair.go +++ b/model_certificate_key_pair.go @@ -16,6 +16,9 @@ import ( "time" ) +// checks if the CertificateKeyPair type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CertificateKeyPair{} + // CertificateKeyPair CertificateKeyPair Serializer type CertificateKeyPair struct { Pk string `json:"pk"` @@ -319,7 +322,7 @@ func (o *CertificateKeyPair) SetPrivateKeyDownloadUrl(v string) { // GetManaged returns the Managed field value if set, zero value otherwise (both if not set or set to explicit null). func (o *CertificateKeyPair) GetManaged() string { - if o == nil || o.Managed.Get() == nil { + if o == nil || IsNil(o.Managed.Get()) { var ret string return ret } @@ -361,41 +364,29 @@ func (o *CertificateKeyPair) UnsetManaged() { } func (o CertificateKeyPair) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["fingerprint_sha256"] = o.FingerprintSha256.Get() - } - if true { - toSerialize["fingerprint_sha1"] = o.FingerprintSha1.Get() - } - if true { - toSerialize["cert_expiry"] = o.CertExpiry.Get() - } - if true { - toSerialize["cert_subject"] = o.CertSubject.Get() - } - if true { - toSerialize["private_key_available"] = o.PrivateKeyAvailable - } - if true { - toSerialize["private_key_type"] = o.PrivateKeyType.Get() - } - if true { - toSerialize["certificate_download_url"] = o.CertificateDownloadUrl - } - if true { - toSerialize["private_key_download_url"] = o.PrivateKeyDownloadUrl + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } + return json.Marshal(toSerialize) +} + +func (o CertificateKeyPair) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name + toSerialize["fingerprint_sha256"] = o.FingerprintSha256.Get() + toSerialize["fingerprint_sha1"] = o.FingerprintSha1.Get() + toSerialize["cert_expiry"] = o.CertExpiry.Get() + toSerialize["cert_subject"] = o.CertSubject.Get() + // skip: private_key_available is readOnly + toSerialize["private_key_type"] = o.PrivateKeyType.Get() + // skip: certificate_download_url is readOnly + // skip: private_key_download_url is readOnly if o.Managed.IsSet() { toSerialize["managed"] = o.Managed.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableCertificateKeyPair struct { diff --git a/model_certificate_key_pair_request.go b/model_certificate_key_pair_request.go index 5d6969e03..bf5bc2675 100644 --- a/model_certificate_key_pair_request.go +++ b/model_certificate_key_pair_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the CertificateKeyPairRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CertificateKeyPairRequest{} + // CertificateKeyPairRequest CertificateKeyPair Serializer type CertificateKeyPairRequest struct { Name string `json:"name"` @@ -95,7 +98,7 @@ func (o *CertificateKeyPairRequest) SetCertificateData(v string) { // GetKeyData returns the KeyData field value if set, zero value otherwise. func (o *CertificateKeyPairRequest) GetKeyData() string { - if o == nil || o.KeyData == nil { + if o == nil || IsNil(o.KeyData) { var ret string return ret } @@ -105,7 +108,7 @@ func (o *CertificateKeyPairRequest) GetKeyData() string { // GetKeyDataOk returns a tuple with the KeyData field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *CertificateKeyPairRequest) GetKeyDataOk() (*string, bool) { - if o == nil || o.KeyData == nil { + if o == nil || IsNil(o.KeyData) { return nil, false } return o.KeyData, true @@ -113,7 +116,7 @@ func (o *CertificateKeyPairRequest) GetKeyDataOk() (*string, bool) { // HasKeyData returns a boolean if a field has been set. func (o *CertificateKeyPairRequest) HasKeyData() bool { - if o != nil && o.KeyData != nil { + if o != nil && !IsNil(o.KeyData) { return true } @@ -127,7 +130,7 @@ func (o *CertificateKeyPairRequest) SetKeyData(v string) { // GetManaged returns the Managed field value if set, zero value otherwise (both if not set or set to explicit null). func (o *CertificateKeyPairRequest) GetManaged() string { - if o == nil || o.Managed.Get() == nil { + if o == nil || IsNil(o.Managed.Get()) { var ret string return ret } @@ -169,20 +172,24 @@ func (o *CertificateKeyPairRequest) UnsetManaged() { } func (o CertificateKeyPairRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if true { - toSerialize["certificate_data"] = o.CertificateData - } - if o.KeyData != nil { + return json.Marshal(toSerialize) +} + +func (o CertificateKeyPairRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["certificate_data"] = o.CertificateData + if !IsNil(o.KeyData) { toSerialize["key_data"] = o.KeyData } if o.Managed.IsSet() { toSerialize["managed"] = o.Managed.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableCertificateKeyPairRequest struct { diff --git a/model_challenge_types.go b/model_challenge_types.go index ca841b715..4b3c49b9c 100644 --- a/model_challenge_types.go +++ b/model_challenge_types.go @@ -211,7 +211,7 @@ func (dst *ChallengeTypes) UnmarshalJSON(data []byte) error { var jsonDict map[string]interface{} err = newStrictDecoder(data).Decode(&jsonDict) if err != nil { - return fmt.Errorf("Failed to unmarshal JSON into map for the discriminator lookup.") + return fmt.Errorf("failed to unmarshal JSON into map for the discriminator lookup") } // check if the discriminator value is 'AccessDeniedChallenge' @@ -222,7 +222,7 @@ func (dst *ChallengeTypes) UnmarshalJSON(data []byte) error { return nil // data stored in dst.AccessDeniedChallenge, return on the first match } else { dst.AccessDeniedChallenge = nil - return fmt.Errorf("Failed to unmarshal ChallengeTypes as AccessDeniedChallenge: %s", err.Error()) + return fmt.Errorf("failed to unmarshal ChallengeTypes as AccessDeniedChallenge: %s", err.Error()) } } @@ -234,7 +234,7 @@ func (dst *ChallengeTypes) UnmarshalJSON(data []byte) error { return nil // data stored in dst.AppleLoginChallenge, return on the first match } else { dst.AppleLoginChallenge = nil - return fmt.Errorf("Failed to unmarshal ChallengeTypes as AppleLoginChallenge: %s", err.Error()) + return fmt.Errorf("failed to unmarshal ChallengeTypes as AppleLoginChallenge: %s", err.Error()) } } @@ -246,7 +246,7 @@ func (dst *ChallengeTypes) UnmarshalJSON(data []byte) error { return nil // data stored in dst.AuthenticatorDuoChallenge, return on the first match } else { dst.AuthenticatorDuoChallenge = nil - return fmt.Errorf("Failed to unmarshal ChallengeTypes as AuthenticatorDuoChallenge: %s", err.Error()) + return fmt.Errorf("failed to unmarshal ChallengeTypes as AuthenticatorDuoChallenge: %s", err.Error()) } } @@ -258,7 +258,7 @@ func (dst *ChallengeTypes) UnmarshalJSON(data []byte) error { return nil // data stored in dst.AuthenticatorSMSChallenge, return on the first match } else { dst.AuthenticatorSMSChallenge = nil - return fmt.Errorf("Failed to unmarshal ChallengeTypes as AuthenticatorSMSChallenge: %s", err.Error()) + return fmt.Errorf("failed to unmarshal ChallengeTypes as AuthenticatorSMSChallenge: %s", err.Error()) } } @@ -270,7 +270,7 @@ func (dst *ChallengeTypes) UnmarshalJSON(data []byte) error { return nil // data stored in dst.AuthenticatorStaticChallenge, return on the first match } else { dst.AuthenticatorStaticChallenge = nil - return fmt.Errorf("Failed to unmarshal ChallengeTypes as AuthenticatorStaticChallenge: %s", err.Error()) + return fmt.Errorf("failed to unmarshal ChallengeTypes as AuthenticatorStaticChallenge: %s", err.Error()) } } @@ -282,7 +282,7 @@ func (dst *ChallengeTypes) UnmarshalJSON(data []byte) error { return nil // data stored in dst.AuthenticatorTOTPChallenge, return on the first match } else { dst.AuthenticatorTOTPChallenge = nil - return fmt.Errorf("Failed to unmarshal ChallengeTypes as AuthenticatorTOTPChallenge: %s", err.Error()) + return fmt.Errorf("failed to unmarshal ChallengeTypes as AuthenticatorTOTPChallenge: %s", err.Error()) } } @@ -294,7 +294,7 @@ func (dst *ChallengeTypes) UnmarshalJSON(data []byte) error { return nil // data stored in dst.AuthenticatorValidationChallenge, return on the first match } else { dst.AuthenticatorValidationChallenge = nil - return fmt.Errorf("Failed to unmarshal ChallengeTypes as AuthenticatorValidationChallenge: %s", err.Error()) + return fmt.Errorf("failed to unmarshal ChallengeTypes as AuthenticatorValidationChallenge: %s", err.Error()) } } @@ -306,7 +306,7 @@ func (dst *ChallengeTypes) UnmarshalJSON(data []byte) error { return nil // data stored in dst.AuthenticatorWebAuthnChallenge, return on the first match } else { dst.AuthenticatorWebAuthnChallenge = nil - return fmt.Errorf("Failed to unmarshal ChallengeTypes as AuthenticatorWebAuthnChallenge: %s", err.Error()) + return fmt.Errorf("failed to unmarshal ChallengeTypes as AuthenticatorWebAuthnChallenge: %s", err.Error()) } } @@ -318,7 +318,7 @@ func (dst *ChallengeTypes) UnmarshalJSON(data []byte) error { return nil // data stored in dst.AutosubmitChallenge, return on the first match } else { dst.AutosubmitChallenge = nil - return fmt.Errorf("Failed to unmarshal ChallengeTypes as AutosubmitChallenge: %s", err.Error()) + return fmt.Errorf("failed to unmarshal ChallengeTypes as AutosubmitChallenge: %s", err.Error()) } } @@ -330,7 +330,7 @@ func (dst *ChallengeTypes) UnmarshalJSON(data []byte) error { return nil // data stored in dst.CaptchaChallenge, return on the first match } else { dst.CaptchaChallenge = nil - return fmt.Errorf("Failed to unmarshal ChallengeTypes as CaptchaChallenge: %s", err.Error()) + return fmt.Errorf("failed to unmarshal ChallengeTypes as CaptchaChallenge: %s", err.Error()) } } @@ -342,7 +342,7 @@ func (dst *ChallengeTypes) UnmarshalJSON(data []byte) error { return nil // data stored in dst.ConsentChallenge, return on the first match } else { dst.ConsentChallenge = nil - return fmt.Errorf("Failed to unmarshal ChallengeTypes as ConsentChallenge: %s", err.Error()) + return fmt.Errorf("failed to unmarshal ChallengeTypes as ConsentChallenge: %s", err.Error()) } } @@ -354,7 +354,7 @@ func (dst *ChallengeTypes) UnmarshalJSON(data []byte) error { return nil // data stored in dst.DummyChallenge, return on the first match } else { dst.DummyChallenge = nil - return fmt.Errorf("Failed to unmarshal ChallengeTypes as DummyChallenge: %s", err.Error()) + return fmt.Errorf("failed to unmarshal ChallengeTypes as DummyChallenge: %s", err.Error()) } } @@ -366,7 +366,7 @@ func (dst *ChallengeTypes) UnmarshalJSON(data []byte) error { return nil // data stored in dst.EmailChallenge, return on the first match } else { dst.EmailChallenge = nil - return fmt.Errorf("Failed to unmarshal ChallengeTypes as EmailChallenge: %s", err.Error()) + return fmt.Errorf("failed to unmarshal ChallengeTypes as EmailChallenge: %s", err.Error()) } } @@ -378,7 +378,7 @@ func (dst *ChallengeTypes) UnmarshalJSON(data []byte) error { return nil // data stored in dst.FlowErrorChallenge, return on the first match } else { dst.FlowErrorChallenge = nil - return fmt.Errorf("Failed to unmarshal ChallengeTypes as FlowErrorChallenge: %s", err.Error()) + return fmt.Errorf("failed to unmarshal ChallengeTypes as FlowErrorChallenge: %s", err.Error()) } } @@ -390,7 +390,7 @@ func (dst *ChallengeTypes) UnmarshalJSON(data []byte) error { return nil // data stored in dst.IdentificationChallenge, return on the first match } else { dst.IdentificationChallenge = nil - return fmt.Errorf("Failed to unmarshal ChallengeTypes as IdentificationChallenge: %s", err.Error()) + return fmt.Errorf("failed to unmarshal ChallengeTypes as IdentificationChallenge: %s", err.Error()) } } @@ -402,7 +402,7 @@ func (dst *ChallengeTypes) UnmarshalJSON(data []byte) error { return nil // data stored in dst.OAuthDeviceCodeChallenge, return on the first match } else { dst.OAuthDeviceCodeChallenge = nil - return fmt.Errorf("Failed to unmarshal ChallengeTypes as OAuthDeviceCodeChallenge: %s", err.Error()) + return fmt.Errorf("failed to unmarshal ChallengeTypes as OAuthDeviceCodeChallenge: %s", err.Error()) } } @@ -414,7 +414,7 @@ func (dst *ChallengeTypes) UnmarshalJSON(data []byte) error { return nil // data stored in dst.OAuthDeviceCodeFinishChallenge, return on the first match } else { dst.OAuthDeviceCodeFinishChallenge = nil - return fmt.Errorf("Failed to unmarshal ChallengeTypes as OAuthDeviceCodeFinishChallenge: %s", err.Error()) + return fmt.Errorf("failed to unmarshal ChallengeTypes as OAuthDeviceCodeFinishChallenge: %s", err.Error()) } } @@ -426,7 +426,7 @@ func (dst *ChallengeTypes) UnmarshalJSON(data []byte) error { return nil // data stored in dst.PasswordChallenge, return on the first match } else { dst.PasswordChallenge = nil - return fmt.Errorf("Failed to unmarshal ChallengeTypes as PasswordChallenge: %s", err.Error()) + return fmt.Errorf("failed to unmarshal ChallengeTypes as PasswordChallenge: %s", err.Error()) } } @@ -438,7 +438,7 @@ func (dst *ChallengeTypes) UnmarshalJSON(data []byte) error { return nil // data stored in dst.PlexAuthenticationChallenge, return on the first match } else { dst.PlexAuthenticationChallenge = nil - return fmt.Errorf("Failed to unmarshal ChallengeTypes as PlexAuthenticationChallenge: %s", err.Error()) + return fmt.Errorf("failed to unmarshal ChallengeTypes as PlexAuthenticationChallenge: %s", err.Error()) } } @@ -450,7 +450,7 @@ func (dst *ChallengeTypes) UnmarshalJSON(data []byte) error { return nil // data stored in dst.PromptChallenge, return on the first match } else { dst.PromptChallenge = nil - return fmt.Errorf("Failed to unmarshal ChallengeTypes as PromptChallenge: %s", err.Error()) + return fmt.Errorf("failed to unmarshal ChallengeTypes as PromptChallenge: %s", err.Error()) } } @@ -462,7 +462,7 @@ func (dst *ChallengeTypes) UnmarshalJSON(data []byte) error { return nil // data stored in dst.RedirectChallenge, return on the first match } else { dst.RedirectChallenge = nil - return fmt.Errorf("Failed to unmarshal ChallengeTypes as RedirectChallenge: %s", err.Error()) + return fmt.Errorf("failed to unmarshal ChallengeTypes as RedirectChallenge: %s", err.Error()) } } @@ -474,7 +474,7 @@ func (dst *ChallengeTypes) UnmarshalJSON(data []byte) error { return nil // data stored in dst.ShellChallenge, return on the first match } else { dst.ShellChallenge = nil - return fmt.Errorf("Failed to unmarshal ChallengeTypes as ShellChallenge: %s", err.Error()) + return fmt.Errorf("failed to unmarshal ChallengeTypes as ShellChallenge: %s", err.Error()) } } @@ -486,7 +486,7 @@ func (dst *ChallengeTypes) UnmarshalJSON(data []byte) error { return nil // data stored in dst.UserLoginChallenge, return on the first match } else { dst.UserLoginChallenge = nil - return fmt.Errorf("Failed to unmarshal ChallengeTypes as UserLoginChallenge: %s", err.Error()) + return fmt.Errorf("failed to unmarshal ChallengeTypes as UserLoginChallenge: %s", err.Error()) } } @@ -498,7 +498,7 @@ func (dst *ChallengeTypes) UnmarshalJSON(data []byte) error { return nil // data stored in dst.OAuthDeviceCodeChallenge, return on the first match } else { dst.OAuthDeviceCodeChallenge = nil - return fmt.Errorf("Failed to unmarshal ChallengeTypes as OAuthDeviceCodeChallenge: %s", err.Error()) + return fmt.Errorf("failed to unmarshal ChallengeTypes as OAuthDeviceCodeChallenge: %s", err.Error()) } } @@ -510,7 +510,7 @@ func (dst *ChallengeTypes) UnmarshalJSON(data []byte) error { return nil // data stored in dst.OAuthDeviceCodeFinishChallenge, return on the first match } else { dst.OAuthDeviceCodeFinishChallenge = nil - return fmt.Errorf("Failed to unmarshal ChallengeTypes as OAuthDeviceCodeFinishChallenge: %s", err.Error()) + return fmt.Errorf("failed to unmarshal ChallengeTypes as OAuthDeviceCodeFinishChallenge: %s", err.Error()) } } @@ -522,7 +522,7 @@ func (dst *ChallengeTypes) UnmarshalJSON(data []byte) error { return nil // data stored in dst.AppleLoginChallenge, return on the first match } else { dst.AppleLoginChallenge = nil - return fmt.Errorf("Failed to unmarshal ChallengeTypes as AppleLoginChallenge: %s", err.Error()) + return fmt.Errorf("failed to unmarshal ChallengeTypes as AppleLoginChallenge: %s", err.Error()) } } @@ -534,7 +534,7 @@ func (dst *ChallengeTypes) UnmarshalJSON(data []byte) error { return nil // data stored in dst.PlexAuthenticationChallenge, return on the first match } else { dst.PlexAuthenticationChallenge = nil - return fmt.Errorf("Failed to unmarshal ChallengeTypes as PlexAuthenticationChallenge: %s", err.Error()) + return fmt.Errorf("failed to unmarshal ChallengeTypes as PlexAuthenticationChallenge: %s", err.Error()) } } @@ -546,7 +546,7 @@ func (dst *ChallengeTypes) UnmarshalJSON(data []byte) error { return nil // data stored in dst.AccessDeniedChallenge, return on the first match } else { dst.AccessDeniedChallenge = nil - return fmt.Errorf("Failed to unmarshal ChallengeTypes as AccessDeniedChallenge: %s", err.Error()) + return fmt.Errorf("failed to unmarshal ChallengeTypes as AccessDeniedChallenge: %s", err.Error()) } } @@ -558,7 +558,7 @@ func (dst *ChallengeTypes) UnmarshalJSON(data []byte) error { return nil // data stored in dst.AuthenticatorDuoChallenge, return on the first match } else { dst.AuthenticatorDuoChallenge = nil - return fmt.Errorf("Failed to unmarshal ChallengeTypes as AuthenticatorDuoChallenge: %s", err.Error()) + return fmt.Errorf("failed to unmarshal ChallengeTypes as AuthenticatorDuoChallenge: %s", err.Error()) } } @@ -570,7 +570,7 @@ func (dst *ChallengeTypes) UnmarshalJSON(data []byte) error { return nil // data stored in dst.AuthenticatorSMSChallenge, return on the first match } else { dst.AuthenticatorSMSChallenge = nil - return fmt.Errorf("Failed to unmarshal ChallengeTypes as AuthenticatorSMSChallenge: %s", err.Error()) + return fmt.Errorf("failed to unmarshal ChallengeTypes as AuthenticatorSMSChallenge: %s", err.Error()) } } @@ -582,7 +582,7 @@ func (dst *ChallengeTypes) UnmarshalJSON(data []byte) error { return nil // data stored in dst.AuthenticatorStaticChallenge, return on the first match } else { dst.AuthenticatorStaticChallenge = nil - return fmt.Errorf("Failed to unmarshal ChallengeTypes as AuthenticatorStaticChallenge: %s", err.Error()) + return fmt.Errorf("failed to unmarshal ChallengeTypes as AuthenticatorStaticChallenge: %s", err.Error()) } } @@ -594,7 +594,7 @@ func (dst *ChallengeTypes) UnmarshalJSON(data []byte) error { return nil // data stored in dst.AuthenticatorTOTPChallenge, return on the first match } else { dst.AuthenticatorTOTPChallenge = nil - return fmt.Errorf("Failed to unmarshal ChallengeTypes as AuthenticatorTOTPChallenge: %s", err.Error()) + return fmt.Errorf("failed to unmarshal ChallengeTypes as AuthenticatorTOTPChallenge: %s", err.Error()) } } @@ -606,7 +606,7 @@ func (dst *ChallengeTypes) UnmarshalJSON(data []byte) error { return nil // data stored in dst.AuthenticatorValidationChallenge, return on the first match } else { dst.AuthenticatorValidationChallenge = nil - return fmt.Errorf("Failed to unmarshal ChallengeTypes as AuthenticatorValidationChallenge: %s", err.Error()) + return fmt.Errorf("failed to unmarshal ChallengeTypes as AuthenticatorValidationChallenge: %s", err.Error()) } } @@ -618,7 +618,7 @@ func (dst *ChallengeTypes) UnmarshalJSON(data []byte) error { return nil // data stored in dst.AuthenticatorWebAuthnChallenge, return on the first match } else { dst.AuthenticatorWebAuthnChallenge = nil - return fmt.Errorf("Failed to unmarshal ChallengeTypes as AuthenticatorWebAuthnChallenge: %s", err.Error()) + return fmt.Errorf("failed to unmarshal ChallengeTypes as AuthenticatorWebAuthnChallenge: %s", err.Error()) } } @@ -630,7 +630,7 @@ func (dst *ChallengeTypes) UnmarshalJSON(data []byte) error { return nil // data stored in dst.AutosubmitChallenge, return on the first match } else { dst.AutosubmitChallenge = nil - return fmt.Errorf("Failed to unmarshal ChallengeTypes as AutosubmitChallenge: %s", err.Error()) + return fmt.Errorf("failed to unmarshal ChallengeTypes as AutosubmitChallenge: %s", err.Error()) } } @@ -642,7 +642,7 @@ func (dst *ChallengeTypes) UnmarshalJSON(data []byte) error { return nil // data stored in dst.CaptchaChallenge, return on the first match } else { dst.CaptchaChallenge = nil - return fmt.Errorf("Failed to unmarshal ChallengeTypes as CaptchaChallenge: %s", err.Error()) + return fmt.Errorf("failed to unmarshal ChallengeTypes as CaptchaChallenge: %s", err.Error()) } } @@ -654,7 +654,7 @@ func (dst *ChallengeTypes) UnmarshalJSON(data []byte) error { return nil // data stored in dst.ConsentChallenge, return on the first match } else { dst.ConsentChallenge = nil - return fmt.Errorf("Failed to unmarshal ChallengeTypes as ConsentChallenge: %s", err.Error()) + return fmt.Errorf("failed to unmarshal ChallengeTypes as ConsentChallenge: %s", err.Error()) } } @@ -666,7 +666,7 @@ func (dst *ChallengeTypes) UnmarshalJSON(data []byte) error { return nil // data stored in dst.DummyChallenge, return on the first match } else { dst.DummyChallenge = nil - return fmt.Errorf("Failed to unmarshal ChallengeTypes as DummyChallenge: %s", err.Error()) + return fmt.Errorf("failed to unmarshal ChallengeTypes as DummyChallenge: %s", err.Error()) } } @@ -678,7 +678,7 @@ func (dst *ChallengeTypes) UnmarshalJSON(data []byte) error { return nil // data stored in dst.EmailChallenge, return on the first match } else { dst.EmailChallenge = nil - return fmt.Errorf("Failed to unmarshal ChallengeTypes as EmailChallenge: %s", err.Error()) + return fmt.Errorf("failed to unmarshal ChallengeTypes as EmailChallenge: %s", err.Error()) } } @@ -690,7 +690,7 @@ func (dst *ChallengeTypes) UnmarshalJSON(data []byte) error { return nil // data stored in dst.FlowErrorChallenge, return on the first match } else { dst.FlowErrorChallenge = nil - return fmt.Errorf("Failed to unmarshal ChallengeTypes as FlowErrorChallenge: %s", err.Error()) + return fmt.Errorf("failed to unmarshal ChallengeTypes as FlowErrorChallenge: %s", err.Error()) } } @@ -702,7 +702,7 @@ func (dst *ChallengeTypes) UnmarshalJSON(data []byte) error { return nil // data stored in dst.IdentificationChallenge, return on the first match } else { dst.IdentificationChallenge = nil - return fmt.Errorf("Failed to unmarshal ChallengeTypes as IdentificationChallenge: %s", err.Error()) + return fmt.Errorf("failed to unmarshal ChallengeTypes as IdentificationChallenge: %s", err.Error()) } } @@ -714,7 +714,7 @@ func (dst *ChallengeTypes) UnmarshalJSON(data []byte) error { return nil // data stored in dst.PasswordChallenge, return on the first match } else { dst.PasswordChallenge = nil - return fmt.Errorf("Failed to unmarshal ChallengeTypes as PasswordChallenge: %s", err.Error()) + return fmt.Errorf("failed to unmarshal ChallengeTypes as PasswordChallenge: %s", err.Error()) } } @@ -726,7 +726,7 @@ func (dst *ChallengeTypes) UnmarshalJSON(data []byte) error { return nil // data stored in dst.PromptChallenge, return on the first match } else { dst.PromptChallenge = nil - return fmt.Errorf("Failed to unmarshal ChallengeTypes as PromptChallenge: %s", err.Error()) + return fmt.Errorf("failed to unmarshal ChallengeTypes as PromptChallenge: %s", err.Error()) } } @@ -738,7 +738,7 @@ func (dst *ChallengeTypes) UnmarshalJSON(data []byte) error { return nil // data stored in dst.UserLoginChallenge, return on the first match } else { dst.UserLoginChallenge = nil - return fmt.Errorf("Failed to unmarshal ChallengeTypes as UserLoginChallenge: %s", err.Error()) + return fmt.Errorf("failed to unmarshal ChallengeTypes as UserLoginChallenge: %s", err.Error()) } } @@ -750,7 +750,7 @@ func (dst *ChallengeTypes) UnmarshalJSON(data []byte) error { return nil // data stored in dst.RedirectChallenge, return on the first match } else { dst.RedirectChallenge = nil - return fmt.Errorf("Failed to unmarshal ChallengeTypes as RedirectChallenge: %s", err.Error()) + return fmt.Errorf("failed to unmarshal ChallengeTypes as RedirectChallenge: %s", err.Error()) } } @@ -762,7 +762,7 @@ func (dst *ChallengeTypes) UnmarshalJSON(data []byte) error { return nil // data stored in dst.ShellChallenge, return on the first match } else { dst.ShellChallenge = nil - return fmt.Errorf("Failed to unmarshal ChallengeTypes as ShellChallenge: %s", err.Error()) + return fmt.Errorf("failed to unmarshal ChallengeTypes as ShellChallenge: %s", err.Error()) } } diff --git a/model_config.go b/model_config.go index 34a36e4e6..46db28364 100644 --- a/model_config.go +++ b/model_config.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the Config type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Config{} + // Config Serialize authentik Config into DRF Object type Config struct { ErrorReporting ErrorReportingConfig `json:"error_reporting"` @@ -193,28 +196,24 @@ func (o *Config) SetCacheTimeoutReputation(v int32) { } func (o Config) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["error_reporting"] = o.ErrorReporting - } - if true { - toSerialize["capabilities"] = o.Capabilities - } - if true { - toSerialize["cache_timeout"] = o.CacheTimeout - } - if true { - toSerialize["cache_timeout_flows"] = o.CacheTimeoutFlows - } - if true { - toSerialize["cache_timeout_policies"] = o.CacheTimeoutPolicies - } - if true { - toSerialize["cache_timeout_reputation"] = o.CacheTimeoutReputation + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o Config) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["error_reporting"] = o.ErrorReporting + toSerialize["capabilities"] = o.Capabilities + toSerialize["cache_timeout"] = o.CacheTimeout + toSerialize["cache_timeout_flows"] = o.CacheTimeoutFlows + toSerialize["cache_timeout_policies"] = o.CacheTimeoutPolicies + toSerialize["cache_timeout_reputation"] = o.CacheTimeoutReputation + return toSerialize, nil +} + type NullableConfig struct { value *Config isSet bool diff --git a/model_consent_challenge.go b/model_consent_challenge.go index 2e9582518..0cf18e58a 100644 --- a/model_consent_challenge.go +++ b/model_consent_challenge.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ConsentChallenge type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ConsentChallenge{} + // ConsentChallenge Challenge info for consent screens type ConsentChallenge struct { Type ChallengeChoices `json:"type"` @@ -82,7 +85,7 @@ func (o *ConsentChallenge) SetType(v ChallengeChoices) { // GetFlowInfo returns the FlowInfo field value if set, zero value otherwise. func (o *ConsentChallenge) GetFlowInfo() ContextualFlowInfo { - if o == nil || o.FlowInfo == nil { + if o == nil || IsNil(o.FlowInfo) { var ret ContextualFlowInfo return ret } @@ -92,7 +95,7 @@ func (o *ConsentChallenge) GetFlowInfo() ContextualFlowInfo { // GetFlowInfoOk returns a tuple with the FlowInfo field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ConsentChallenge) GetFlowInfoOk() (*ContextualFlowInfo, bool) { - if o == nil || o.FlowInfo == nil { + if o == nil || IsNil(o.FlowInfo) { return nil, false } return o.FlowInfo, true @@ -100,7 +103,7 @@ func (o *ConsentChallenge) GetFlowInfoOk() (*ContextualFlowInfo, bool) { // HasFlowInfo returns a boolean if a field has been set. func (o *ConsentChallenge) HasFlowInfo() bool { - if o != nil && o.FlowInfo != nil { + if o != nil && !IsNil(o.FlowInfo) { return true } @@ -114,7 +117,7 @@ func (o *ConsentChallenge) SetFlowInfo(v ContextualFlowInfo) { // GetComponent returns the Component field value if set, zero value otherwise. func (o *ConsentChallenge) GetComponent() string { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { var ret string return ret } @@ -124,7 +127,7 @@ func (o *ConsentChallenge) GetComponent() string { // GetComponentOk returns a tuple with the Component field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ConsentChallenge) GetComponentOk() (*string, bool) { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { return nil, false } return o.Component, true @@ -132,7 +135,7 @@ func (o *ConsentChallenge) GetComponentOk() (*string, bool) { // HasComponent returns a boolean if a field has been set. func (o *ConsentChallenge) HasComponent() bool { - if o != nil && o.Component != nil { + if o != nil && !IsNil(o.Component) { return true } @@ -146,7 +149,7 @@ func (o *ConsentChallenge) SetComponent(v string) { // GetResponseErrors returns the ResponseErrors field value if set, zero value otherwise. func (o *ConsentChallenge) GetResponseErrors() map[string][]ErrorDetail { - if o == nil || o.ResponseErrors == nil { + if o == nil || IsNil(o.ResponseErrors) { var ret map[string][]ErrorDetail return ret } @@ -156,7 +159,7 @@ func (o *ConsentChallenge) GetResponseErrors() map[string][]ErrorDetail { // GetResponseErrorsOk returns a tuple with the ResponseErrors field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ConsentChallenge) GetResponseErrorsOk() (*map[string][]ErrorDetail, bool) { - if o == nil || o.ResponseErrors == nil { + if o == nil || IsNil(o.ResponseErrors) { return nil, false } return o.ResponseErrors, true @@ -164,7 +167,7 @@ func (o *ConsentChallenge) GetResponseErrorsOk() (*map[string][]ErrorDetail, boo // HasResponseErrors returns a boolean if a field has been set. func (o *ConsentChallenge) HasResponseErrors() bool { - if o != nil && o.ResponseErrors != nil { + if o != nil && !IsNil(o.ResponseErrors) { return true } @@ -226,7 +229,7 @@ func (o *ConsentChallenge) SetPendingUserAvatar(v string) { // GetHeaderText returns the HeaderText field value if set, zero value otherwise. func (o *ConsentChallenge) GetHeaderText() string { - if o == nil || o.HeaderText == nil { + if o == nil || IsNil(o.HeaderText) { var ret string return ret } @@ -236,7 +239,7 @@ func (o *ConsentChallenge) GetHeaderText() string { // GetHeaderTextOk returns a tuple with the HeaderText field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ConsentChallenge) GetHeaderTextOk() (*string, bool) { - if o == nil || o.HeaderText == nil { + if o == nil || IsNil(o.HeaderText) { return nil, false } return o.HeaderText, true @@ -244,7 +247,7 @@ func (o *ConsentChallenge) GetHeaderTextOk() (*string, bool) { // HasHeaderText returns a boolean if a field has been set. func (o *ConsentChallenge) HasHeaderText() bool { - if o != nil && o.HeaderText != nil { + if o != nil && !IsNil(o.HeaderText) { return true } @@ -329,38 +332,34 @@ func (o *ConsentChallenge) SetToken(v string) { } func (o ConsentChallenge) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["type"] = o.Type + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.FlowInfo != nil { + return json.Marshal(toSerialize) +} + +func (o ConsentChallenge) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + if !IsNil(o.FlowInfo) { toSerialize["flow_info"] = o.FlowInfo } - if o.Component != nil { + if !IsNil(o.Component) { toSerialize["component"] = o.Component } - if o.ResponseErrors != nil { + if !IsNil(o.ResponseErrors) { toSerialize["response_errors"] = o.ResponseErrors } - if true { - toSerialize["pending_user"] = o.PendingUser - } - if true { - toSerialize["pending_user_avatar"] = o.PendingUserAvatar - } - if o.HeaderText != nil { + toSerialize["pending_user"] = o.PendingUser + toSerialize["pending_user_avatar"] = o.PendingUserAvatar + if !IsNil(o.HeaderText) { toSerialize["header_text"] = o.HeaderText } - if true { - toSerialize["permissions"] = o.Permissions - } - if true { - toSerialize["additional_permissions"] = o.AdditionalPermissions - } - if true { - toSerialize["token"] = o.Token - } - return json.Marshal(toSerialize) + toSerialize["permissions"] = o.Permissions + toSerialize["additional_permissions"] = o.AdditionalPermissions + toSerialize["token"] = o.Token + return toSerialize, nil } type NullableConsentChallenge struct { diff --git a/model_consent_challenge_response_request.go b/model_consent_challenge_response_request.go index 1d55a91e7..8391db100 100644 --- a/model_consent_challenge_response_request.go +++ b/model_consent_challenge_response_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ConsentChallengeResponseRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ConsentChallengeResponseRequest{} + // ConsentChallengeResponseRequest Consent challenge response, any valid response request is valid type ConsentChallengeResponseRequest struct { Component *string `json:"component,omitempty"` @@ -45,7 +48,7 @@ func NewConsentChallengeResponseRequestWithDefaults() *ConsentChallengeResponseR // GetComponent returns the Component field value if set, zero value otherwise. func (o *ConsentChallengeResponseRequest) GetComponent() string { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { var ret string return ret } @@ -55,7 +58,7 @@ func (o *ConsentChallengeResponseRequest) GetComponent() string { // GetComponentOk returns a tuple with the Component field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ConsentChallengeResponseRequest) GetComponentOk() (*string, bool) { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { return nil, false } return o.Component, true @@ -63,7 +66,7 @@ func (o *ConsentChallengeResponseRequest) GetComponentOk() (*string, bool) { // HasComponent returns a boolean if a field has been set. func (o *ConsentChallengeResponseRequest) HasComponent() bool { - if o != nil && o.Component != nil { + if o != nil && !IsNil(o.Component) { return true } @@ -100,14 +103,20 @@ func (o *ConsentChallengeResponseRequest) SetToken(v string) { } func (o ConsentChallengeResponseRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ConsentChallengeResponseRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Component != nil { + if !IsNil(o.Component) { toSerialize["component"] = o.Component } - if true { - toSerialize["token"] = o.Token - } - return json.Marshal(toSerialize) + toSerialize["token"] = o.Token + return toSerialize, nil } type NullableConsentChallengeResponseRequest struct { diff --git a/model_consent_stage.go b/model_consent_stage.go index 370b2b805..415a5a15d 100644 --- a/model_consent_stage.go +++ b/model_consent_stage.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ConsentStage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ConsentStage{} + // ConsentStage ConsentStage Serializer type ConsentStage struct { Pk string `json:"pk"` @@ -202,7 +205,7 @@ func (o *ConsentStage) SetMetaModelName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *ConsentStage) GetFlowSet() []FlowSet { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSet return ret } @@ -212,7 +215,7 @@ func (o *ConsentStage) GetFlowSet() []FlowSet { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ConsentStage) GetFlowSetOk() ([]FlowSet, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -220,7 +223,7 @@ func (o *ConsentStage) GetFlowSetOk() ([]FlowSet, bool) { // HasFlowSet returns a boolean if a field has been set. func (o *ConsentStage) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -234,7 +237,7 @@ func (o *ConsentStage) SetFlowSet(v []FlowSet) { // GetMode returns the Mode field value if set, zero value otherwise. func (o *ConsentStage) GetMode() ConsentStageModeEnum { - if o == nil || o.Mode == nil { + if o == nil || IsNil(o.Mode) { var ret ConsentStageModeEnum return ret } @@ -244,7 +247,7 @@ func (o *ConsentStage) GetMode() ConsentStageModeEnum { // GetModeOk returns a tuple with the Mode field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ConsentStage) GetModeOk() (*ConsentStageModeEnum, bool) { - if o == nil || o.Mode == nil { + if o == nil || IsNil(o.Mode) { return nil, false } return o.Mode, true @@ -252,7 +255,7 @@ func (o *ConsentStage) GetModeOk() (*ConsentStageModeEnum, bool) { // HasMode returns a boolean if a field has been set. func (o *ConsentStage) HasMode() bool { - if o != nil && o.Mode != nil { + if o != nil && !IsNil(o.Mode) { return true } @@ -266,7 +269,7 @@ func (o *ConsentStage) SetMode(v ConsentStageModeEnum) { // GetConsentExpireIn returns the ConsentExpireIn field value if set, zero value otherwise. func (o *ConsentStage) GetConsentExpireIn() string { - if o == nil || o.ConsentExpireIn == nil { + if o == nil || IsNil(o.ConsentExpireIn) { var ret string return ret } @@ -276,7 +279,7 @@ func (o *ConsentStage) GetConsentExpireIn() string { // GetConsentExpireInOk returns a tuple with the ConsentExpireIn field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ConsentStage) GetConsentExpireInOk() (*string, bool) { - if o == nil || o.ConsentExpireIn == nil { + if o == nil || IsNil(o.ConsentExpireIn) { return nil, false } return o.ConsentExpireIn, true @@ -284,7 +287,7 @@ func (o *ConsentStage) GetConsentExpireInOk() (*string, bool) { // HasConsentExpireIn returns a boolean if a field has been set. func (o *ConsentStage) HasConsentExpireIn() bool { - if o != nil && o.ConsentExpireIn != nil { + if o != nil && !IsNil(o.ConsentExpireIn) { return true } @@ -297,35 +300,31 @@ func (o *ConsentStage) SetConsentExpireIn(v string) { } func (o ConsentStage) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["component"] = o.Component - } - if true { - toSerialize["verbose_name"] = o.VerboseName - } - if true { - toSerialize["verbose_name_plural"] = o.VerboseNamePlural + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if true { - toSerialize["meta_model_name"] = o.MetaModelName - } - if o.FlowSet != nil { + return json.Marshal(toSerialize) +} + +func (o ConsentStage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name + // skip: component is readOnly + // skip: verbose_name is readOnly + // skip: verbose_name_plural is readOnly + // skip: meta_model_name is readOnly + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } - if o.Mode != nil { + if !IsNil(o.Mode) { toSerialize["mode"] = o.Mode } - if o.ConsentExpireIn != nil { + if !IsNil(o.ConsentExpireIn) { toSerialize["consent_expire_in"] = o.ConsentExpireIn } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableConsentStage struct { diff --git a/model_consent_stage_request.go b/model_consent_stage_request.go index 0250b0f9a..796500b6e 100644 --- a/model_consent_stage_request.go +++ b/model_consent_stage_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ConsentStageRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ConsentStageRequest{} + // ConsentStageRequest ConsentStage Serializer type ConsentStageRequest struct { Name string `json:"name"` @@ -68,7 +71,7 @@ func (o *ConsentStageRequest) SetName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *ConsentStageRequest) GetFlowSet() []FlowSetRequest { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSetRequest return ret } @@ -78,7 +81,7 @@ func (o *ConsentStageRequest) GetFlowSet() []FlowSetRequest { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ConsentStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -86,7 +89,7 @@ func (o *ConsentStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { // HasFlowSet returns a boolean if a field has been set. func (o *ConsentStageRequest) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -100,7 +103,7 @@ func (o *ConsentStageRequest) SetFlowSet(v []FlowSetRequest) { // GetMode returns the Mode field value if set, zero value otherwise. func (o *ConsentStageRequest) GetMode() ConsentStageModeEnum { - if o == nil || o.Mode == nil { + if o == nil || IsNil(o.Mode) { var ret ConsentStageModeEnum return ret } @@ -110,7 +113,7 @@ func (o *ConsentStageRequest) GetMode() ConsentStageModeEnum { // GetModeOk returns a tuple with the Mode field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ConsentStageRequest) GetModeOk() (*ConsentStageModeEnum, bool) { - if o == nil || o.Mode == nil { + if o == nil || IsNil(o.Mode) { return nil, false } return o.Mode, true @@ -118,7 +121,7 @@ func (o *ConsentStageRequest) GetModeOk() (*ConsentStageModeEnum, bool) { // HasMode returns a boolean if a field has been set. func (o *ConsentStageRequest) HasMode() bool { - if o != nil && o.Mode != nil { + if o != nil && !IsNil(o.Mode) { return true } @@ -132,7 +135,7 @@ func (o *ConsentStageRequest) SetMode(v ConsentStageModeEnum) { // GetConsentExpireIn returns the ConsentExpireIn field value if set, zero value otherwise. func (o *ConsentStageRequest) GetConsentExpireIn() string { - if o == nil || o.ConsentExpireIn == nil { + if o == nil || IsNil(o.ConsentExpireIn) { var ret string return ret } @@ -142,7 +145,7 @@ func (o *ConsentStageRequest) GetConsentExpireIn() string { // GetConsentExpireInOk returns a tuple with the ConsentExpireIn field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ConsentStageRequest) GetConsentExpireInOk() (*string, bool) { - if o == nil || o.ConsentExpireIn == nil { + if o == nil || IsNil(o.ConsentExpireIn) { return nil, false } return o.ConsentExpireIn, true @@ -150,7 +153,7 @@ func (o *ConsentStageRequest) GetConsentExpireInOk() (*string, bool) { // HasConsentExpireIn returns a boolean if a field has been set. func (o *ConsentStageRequest) HasConsentExpireIn() bool { - if o != nil && o.ConsentExpireIn != nil { + if o != nil && !IsNil(o.ConsentExpireIn) { return true } @@ -163,20 +166,26 @@ func (o *ConsentStageRequest) SetConsentExpireIn(v string) { } func (o ConsentStageRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.FlowSet != nil { + return json.Marshal(toSerialize) +} + +func (o ConsentStageRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } - if o.Mode != nil { + if !IsNil(o.Mode) { toSerialize["mode"] = o.Mode } - if o.ConsentExpireIn != nil { + if !IsNil(o.ConsentExpireIn) { toSerialize["consent_expire_in"] = o.ConsentExpireIn } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableConsentStageRequest struct { diff --git a/model_contextual_flow_info.go b/model_contextual_flow_info.go index 75bc5f9b6..bf3667791 100644 --- a/model_contextual_flow_info.go +++ b/model_contextual_flow_info.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ContextualFlowInfo type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ContextualFlowInfo{} + // ContextualFlowInfo Contextual flow information for a challenge type ContextualFlowInfo struct { Title *string `json:"title,omitempty"` @@ -44,7 +47,7 @@ func NewContextualFlowInfoWithDefaults() *ContextualFlowInfo { // GetTitle returns the Title field value if set, zero value otherwise. func (o *ContextualFlowInfo) GetTitle() string { - if o == nil || o.Title == nil { + if o == nil || IsNil(o.Title) { var ret string return ret } @@ -54,7 +57,7 @@ func (o *ContextualFlowInfo) GetTitle() string { // GetTitleOk returns a tuple with the Title field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ContextualFlowInfo) GetTitleOk() (*string, bool) { - if o == nil || o.Title == nil { + if o == nil || IsNil(o.Title) { return nil, false } return o.Title, true @@ -62,7 +65,7 @@ func (o *ContextualFlowInfo) GetTitleOk() (*string, bool) { // HasTitle returns a boolean if a field has been set. func (o *ContextualFlowInfo) HasTitle() bool { - if o != nil && o.Title != nil { + if o != nil && !IsNil(o.Title) { return true } @@ -76,7 +79,7 @@ func (o *ContextualFlowInfo) SetTitle(v string) { // GetBackground returns the Background field value if set, zero value otherwise. func (o *ContextualFlowInfo) GetBackground() string { - if o == nil || o.Background == nil { + if o == nil || IsNil(o.Background) { var ret string return ret } @@ -86,7 +89,7 @@ func (o *ContextualFlowInfo) GetBackground() string { // GetBackgroundOk returns a tuple with the Background field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ContextualFlowInfo) GetBackgroundOk() (*string, bool) { - if o == nil || o.Background == nil { + if o == nil || IsNil(o.Background) { return nil, false } return o.Background, true @@ -94,7 +97,7 @@ func (o *ContextualFlowInfo) GetBackgroundOk() (*string, bool) { // HasBackground returns a boolean if a field has been set. func (o *ContextualFlowInfo) HasBackground() bool { - if o != nil && o.Background != nil { + if o != nil && !IsNil(o.Background) { return true } @@ -155,20 +158,24 @@ func (o *ContextualFlowInfo) SetLayout(v LayoutEnum) { } func (o ContextualFlowInfo) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ContextualFlowInfo) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Title != nil { + if !IsNil(o.Title) { toSerialize["title"] = o.Title } - if o.Background != nil { + if !IsNil(o.Background) { toSerialize["background"] = o.Background } - if true { - toSerialize["cancel_url"] = o.CancelUrl - } - if true { - toSerialize["layout"] = o.Layout - } - return json.Marshal(toSerialize) + toSerialize["cancel_url"] = o.CancelUrl + toSerialize["layout"] = o.Layout + return toSerialize, nil } type NullableContextualFlowInfo struct { diff --git a/model_coordinate.go b/model_coordinate.go index baad5e00c..b6db7e4a4 100644 --- a/model_coordinate.go +++ b/model_coordinate.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the Coordinate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Coordinate{} + // Coordinate Coordinates for diagrams type Coordinate struct { XCord int32 `json:"x_cord"` @@ -89,16 +92,20 @@ func (o *Coordinate) SetYCord(v int32) { } func (o Coordinate) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["x_cord"] = o.XCord - } - if true { - toSerialize["y_cord"] = o.YCord + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o Coordinate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: x_cord is readOnly + // skip: y_cord is readOnly + return toSerialize, nil +} + type NullableCoordinate struct { value *Coordinate isSet bool diff --git a/model_current_tenant.go b/model_current_tenant.go index 4e94e4009..9536a71c2 100644 --- a/model_current_tenant.go +++ b/model_current_tenant.go @@ -15,28 +15,31 @@ import ( "encoding/json" ) +// checks if the CurrentTenant type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CurrentTenant{} + // CurrentTenant Partial tenant information for styling type CurrentTenant struct { - MatchedDomain string `json:"matched_domain"` - BrandingTitle string `json:"branding_title"` - BrandingLogo string `json:"branding_logo"` - BrandingFavicon string `json:"branding_favicon"` - UiFooterLinks []FooterLink `json:"ui_footer_links"` - UiTheme NullableUiThemeEnum `json:"ui_theme"` - FlowAuthentication *string `json:"flow_authentication,omitempty"` - FlowInvalidation *string `json:"flow_invalidation,omitempty"` - FlowRecovery *string `json:"flow_recovery,omitempty"` - FlowUnenrollment *string `json:"flow_unenrollment,omitempty"` - FlowUserSettings *string `json:"flow_user_settings,omitempty"` - FlowDeviceCode *string `json:"flow_device_code,omitempty"` - DefaultLocale string `json:"default_locale"` + MatchedDomain string `json:"matched_domain"` + BrandingTitle string `json:"branding_title"` + BrandingLogo string `json:"branding_logo"` + BrandingFavicon string `json:"branding_favicon"` + UiFooterLinks []FooterLink `json:"ui_footer_links"` + UiTheme UiThemeEnum `json:"ui_theme"` + FlowAuthentication *string `json:"flow_authentication,omitempty"` + FlowInvalidation *string `json:"flow_invalidation,omitempty"` + FlowRecovery *string `json:"flow_recovery,omitempty"` + FlowUnenrollment *string `json:"flow_unenrollment,omitempty"` + FlowUserSettings *string `json:"flow_user_settings,omitempty"` + FlowDeviceCode *string `json:"flow_device_code,omitempty"` + DefaultLocale string `json:"default_locale"` } // NewCurrentTenant instantiates a new CurrentTenant object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewCurrentTenant(matchedDomain string, brandingTitle string, brandingLogo string, brandingFavicon string, uiFooterLinks []FooterLink, uiTheme NullableUiThemeEnum, defaultLocale string) *CurrentTenant { +func NewCurrentTenant(matchedDomain string, brandingTitle string, brandingLogo string, brandingFavicon string, uiFooterLinks []FooterLink, uiTheme UiThemeEnum, defaultLocale string) *CurrentTenant { this := CurrentTenant{} this.MatchedDomain = matchedDomain this.BrandingTitle = brandingTitle @@ -177,34 +180,32 @@ func (o *CurrentTenant) SetUiFooterLinks(v []FooterLink) { } // GetUiTheme returns the UiTheme field value -// If the value is explicit nil, the zero value for UiThemeEnum will be returned func (o *CurrentTenant) GetUiTheme() UiThemeEnum { - if o == nil || o.UiTheme.Get() == nil { + if o == nil { var ret UiThemeEnum return ret } - return *o.UiTheme.Get() + return o.UiTheme } // GetUiThemeOk returns a tuple with the UiTheme field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *CurrentTenant) GetUiThemeOk() (*UiThemeEnum, bool) { if o == nil { return nil, false } - return o.UiTheme.Get(), o.UiTheme.IsSet() + return &o.UiTheme, true } // SetUiTheme sets field value func (o *CurrentTenant) SetUiTheme(v UiThemeEnum) { - o.UiTheme.Set(&v) + o.UiTheme = v } // GetFlowAuthentication returns the FlowAuthentication field value if set, zero value otherwise. func (o *CurrentTenant) GetFlowAuthentication() string { - if o == nil || o.FlowAuthentication == nil { + if o == nil || IsNil(o.FlowAuthentication) { var ret string return ret } @@ -214,7 +215,7 @@ func (o *CurrentTenant) GetFlowAuthentication() string { // GetFlowAuthenticationOk returns a tuple with the FlowAuthentication field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *CurrentTenant) GetFlowAuthenticationOk() (*string, bool) { - if o == nil || o.FlowAuthentication == nil { + if o == nil || IsNil(o.FlowAuthentication) { return nil, false } return o.FlowAuthentication, true @@ -222,7 +223,7 @@ func (o *CurrentTenant) GetFlowAuthenticationOk() (*string, bool) { // HasFlowAuthentication returns a boolean if a field has been set. func (o *CurrentTenant) HasFlowAuthentication() bool { - if o != nil && o.FlowAuthentication != nil { + if o != nil && !IsNil(o.FlowAuthentication) { return true } @@ -236,7 +237,7 @@ func (o *CurrentTenant) SetFlowAuthentication(v string) { // GetFlowInvalidation returns the FlowInvalidation field value if set, zero value otherwise. func (o *CurrentTenant) GetFlowInvalidation() string { - if o == nil || o.FlowInvalidation == nil { + if o == nil || IsNil(o.FlowInvalidation) { var ret string return ret } @@ -246,7 +247,7 @@ func (o *CurrentTenant) GetFlowInvalidation() string { // GetFlowInvalidationOk returns a tuple with the FlowInvalidation field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *CurrentTenant) GetFlowInvalidationOk() (*string, bool) { - if o == nil || o.FlowInvalidation == nil { + if o == nil || IsNil(o.FlowInvalidation) { return nil, false } return o.FlowInvalidation, true @@ -254,7 +255,7 @@ func (o *CurrentTenant) GetFlowInvalidationOk() (*string, bool) { // HasFlowInvalidation returns a boolean if a field has been set. func (o *CurrentTenant) HasFlowInvalidation() bool { - if o != nil && o.FlowInvalidation != nil { + if o != nil && !IsNil(o.FlowInvalidation) { return true } @@ -268,7 +269,7 @@ func (o *CurrentTenant) SetFlowInvalidation(v string) { // GetFlowRecovery returns the FlowRecovery field value if set, zero value otherwise. func (o *CurrentTenant) GetFlowRecovery() string { - if o == nil || o.FlowRecovery == nil { + if o == nil || IsNil(o.FlowRecovery) { var ret string return ret } @@ -278,7 +279,7 @@ func (o *CurrentTenant) GetFlowRecovery() string { // GetFlowRecoveryOk returns a tuple with the FlowRecovery field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *CurrentTenant) GetFlowRecoveryOk() (*string, bool) { - if o == nil || o.FlowRecovery == nil { + if o == nil || IsNil(o.FlowRecovery) { return nil, false } return o.FlowRecovery, true @@ -286,7 +287,7 @@ func (o *CurrentTenant) GetFlowRecoveryOk() (*string, bool) { // HasFlowRecovery returns a boolean if a field has been set. func (o *CurrentTenant) HasFlowRecovery() bool { - if o != nil && o.FlowRecovery != nil { + if o != nil && !IsNil(o.FlowRecovery) { return true } @@ -300,7 +301,7 @@ func (o *CurrentTenant) SetFlowRecovery(v string) { // GetFlowUnenrollment returns the FlowUnenrollment field value if set, zero value otherwise. func (o *CurrentTenant) GetFlowUnenrollment() string { - if o == nil || o.FlowUnenrollment == nil { + if o == nil || IsNil(o.FlowUnenrollment) { var ret string return ret } @@ -310,7 +311,7 @@ func (o *CurrentTenant) GetFlowUnenrollment() string { // GetFlowUnenrollmentOk returns a tuple with the FlowUnenrollment field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *CurrentTenant) GetFlowUnenrollmentOk() (*string, bool) { - if o == nil || o.FlowUnenrollment == nil { + if o == nil || IsNil(o.FlowUnenrollment) { return nil, false } return o.FlowUnenrollment, true @@ -318,7 +319,7 @@ func (o *CurrentTenant) GetFlowUnenrollmentOk() (*string, bool) { // HasFlowUnenrollment returns a boolean if a field has been set. func (o *CurrentTenant) HasFlowUnenrollment() bool { - if o != nil && o.FlowUnenrollment != nil { + if o != nil && !IsNil(o.FlowUnenrollment) { return true } @@ -332,7 +333,7 @@ func (o *CurrentTenant) SetFlowUnenrollment(v string) { // GetFlowUserSettings returns the FlowUserSettings field value if set, zero value otherwise. func (o *CurrentTenant) GetFlowUserSettings() string { - if o == nil || o.FlowUserSettings == nil { + if o == nil || IsNil(o.FlowUserSettings) { var ret string return ret } @@ -342,7 +343,7 @@ func (o *CurrentTenant) GetFlowUserSettings() string { // GetFlowUserSettingsOk returns a tuple with the FlowUserSettings field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *CurrentTenant) GetFlowUserSettingsOk() (*string, bool) { - if o == nil || o.FlowUserSettings == nil { + if o == nil || IsNil(o.FlowUserSettings) { return nil, false } return o.FlowUserSettings, true @@ -350,7 +351,7 @@ func (o *CurrentTenant) GetFlowUserSettingsOk() (*string, bool) { // HasFlowUserSettings returns a boolean if a field has been set. func (o *CurrentTenant) HasFlowUserSettings() bool { - if o != nil && o.FlowUserSettings != nil { + if o != nil && !IsNil(o.FlowUserSettings) { return true } @@ -364,7 +365,7 @@ func (o *CurrentTenant) SetFlowUserSettings(v string) { // GetFlowDeviceCode returns the FlowDeviceCode field value if set, zero value otherwise. func (o *CurrentTenant) GetFlowDeviceCode() string { - if o == nil || o.FlowDeviceCode == nil { + if o == nil || IsNil(o.FlowDeviceCode) { var ret string return ret } @@ -374,7 +375,7 @@ func (o *CurrentTenant) GetFlowDeviceCode() string { // GetFlowDeviceCodeOk returns a tuple with the FlowDeviceCode field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *CurrentTenant) GetFlowDeviceCodeOk() (*string, bool) { - if o == nil || o.FlowDeviceCode == nil { + if o == nil || IsNil(o.FlowDeviceCode) { return nil, false } return o.FlowDeviceCode, true @@ -382,7 +383,7 @@ func (o *CurrentTenant) GetFlowDeviceCodeOk() (*string, bool) { // HasFlowDeviceCode returns a boolean if a field has been set. func (o *CurrentTenant) HasFlowDeviceCode() bool { - if o != nil && o.FlowDeviceCode != nil { + if o != nil && !IsNil(o.FlowDeviceCode) { return true } @@ -419,47 +420,41 @@ func (o *CurrentTenant) SetDefaultLocale(v string) { } func (o CurrentTenant) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["matched_domain"] = o.MatchedDomain - } - if true { - toSerialize["branding_title"] = o.BrandingTitle - } - if true { - toSerialize["branding_logo"] = o.BrandingLogo - } - if true { - toSerialize["branding_favicon"] = o.BrandingFavicon - } - if true { - toSerialize["ui_footer_links"] = o.UiFooterLinks + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if true { - toSerialize["ui_theme"] = o.UiTheme.Get() - } - if o.FlowAuthentication != nil { + return json.Marshal(toSerialize) +} + +func (o CurrentTenant) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["matched_domain"] = o.MatchedDomain + toSerialize["branding_title"] = o.BrandingTitle + toSerialize["branding_logo"] = o.BrandingLogo + toSerialize["branding_favicon"] = o.BrandingFavicon + // skip: ui_footer_links is readOnly + // skip: ui_theme is readOnly + if !IsNil(o.FlowAuthentication) { toSerialize["flow_authentication"] = o.FlowAuthentication } - if o.FlowInvalidation != nil { + if !IsNil(o.FlowInvalidation) { toSerialize["flow_invalidation"] = o.FlowInvalidation } - if o.FlowRecovery != nil { + if !IsNil(o.FlowRecovery) { toSerialize["flow_recovery"] = o.FlowRecovery } - if o.FlowUnenrollment != nil { + if !IsNil(o.FlowUnenrollment) { toSerialize["flow_unenrollment"] = o.FlowUnenrollment } - if o.FlowUserSettings != nil { + if !IsNil(o.FlowUserSettings) { toSerialize["flow_user_settings"] = o.FlowUserSettings } - if o.FlowDeviceCode != nil { + if !IsNil(o.FlowDeviceCode) { toSerialize["flow_device_code"] = o.FlowDeviceCode } - if true { - toSerialize["default_locale"] = o.DefaultLocale - } - return json.Marshal(toSerialize) + // skip: default_locale is readOnly + return toSerialize, nil } type NullableCurrentTenant struct { diff --git a/model_deny_stage.go b/model_deny_stage.go index 5fe95d27d..c9094da2a 100644 --- a/model_deny_stage.go +++ b/model_deny_stage.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the DenyStage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DenyStage{} + // DenyStage DenyStage Serializer type DenyStage struct { Pk string `json:"pk"` @@ -199,7 +202,7 @@ func (o *DenyStage) SetMetaModelName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *DenyStage) GetFlowSet() []FlowSet { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSet return ret } @@ -209,7 +212,7 @@ func (o *DenyStage) GetFlowSet() []FlowSet { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *DenyStage) GetFlowSetOk() ([]FlowSet, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -217,7 +220,7 @@ func (o *DenyStage) GetFlowSetOk() ([]FlowSet, bool) { // HasFlowSet returns a boolean if a field has been set. func (o *DenyStage) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -230,29 +233,25 @@ func (o *DenyStage) SetFlowSet(v []FlowSet) { } func (o DenyStage) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["component"] = o.Component - } - if true { - toSerialize["verbose_name"] = o.VerboseName - } - if true { - toSerialize["verbose_name_plural"] = o.VerboseNamePlural + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if true { - toSerialize["meta_model_name"] = o.MetaModelName - } - if o.FlowSet != nil { + return json.Marshal(toSerialize) +} + +func (o DenyStage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name + // skip: component is readOnly + // skip: verbose_name is readOnly + // skip: verbose_name_plural is readOnly + // skip: meta_model_name is readOnly + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableDenyStage struct { diff --git a/model_deny_stage_request.go b/model_deny_stage_request.go index 449f5fb25..9070ce016 100644 --- a/model_deny_stage_request.go +++ b/model_deny_stage_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the DenyStageRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DenyStageRequest{} + // DenyStageRequest DenyStage Serializer type DenyStageRequest struct { Name string `json:"name"` @@ -65,7 +68,7 @@ func (o *DenyStageRequest) SetName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *DenyStageRequest) GetFlowSet() []FlowSetRequest { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSetRequest return ret } @@ -75,7 +78,7 @@ func (o *DenyStageRequest) GetFlowSet() []FlowSetRequest { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *DenyStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -83,7 +86,7 @@ func (o *DenyStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { // HasFlowSet returns a boolean if a field has been set. func (o *DenyStageRequest) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -96,14 +99,20 @@ func (o *DenyStageRequest) SetFlowSet(v []FlowSetRequest) { } func (o DenyStageRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.FlowSet != nil { + return json.Marshal(toSerialize) +} + +func (o DenyStageRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableDenyStageRequest struct { diff --git a/model_device.go b/model_device.go index eb14adfab..6b9339b48 100644 --- a/model_device.go +++ b/model_device.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the Device type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Device{} + // Device Serializer for Duo authenticator devices type Device struct { // Return object's verbose_name @@ -223,31 +226,25 @@ func (o *Device) SetConfirmed(v bool) { } func (o Device) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["verbose_name"] = o.VerboseName - } - if true { - toSerialize["verbose_name_plural"] = o.VerboseNamePlural - } - if true { - toSerialize["meta_model_name"] = o.MetaModelName - } - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["type"] = o.Type - } - if true { - toSerialize["confirmed"] = o.Confirmed + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o Device) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: verbose_name is readOnly + // skip: verbose_name_plural is readOnly + // skip: meta_model_name is readOnly + toSerialize["pk"] = o.Pk + toSerialize["name"] = o.Name + // skip: type is readOnly + toSerialize["confirmed"] = o.Confirmed + return toSerialize, nil +} + type NullableDevice struct { value *Device isSet bool diff --git a/model_device_challenge.go b/model_device_challenge.go index 3cb36abda..8d3c60461 100644 --- a/model_device_challenge.go +++ b/model_device_challenge.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the DeviceChallenge type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DeviceChallenge{} + // DeviceChallenge Single device challenge type DeviceChallenge struct { DeviceClass string `json:"device_class"` @@ -104,7 +107,7 @@ func (o *DeviceChallenge) GetChallenge() map[string]interface{} { // and a boolean to check if the value has been set. func (o *DeviceChallenge) GetChallengeOk() (map[string]interface{}, bool) { if o == nil { - return nil, false + return map[string]interface{}{}, false } return o.Challenge, true } @@ -115,19 +118,21 @@ func (o *DeviceChallenge) SetChallenge(v map[string]interface{}) { } func (o DeviceChallenge) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["device_class"] = o.DeviceClass - } - if true { - toSerialize["device_uid"] = o.DeviceUid - } - if true { - toSerialize["challenge"] = o.Challenge + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o DeviceChallenge) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["device_class"] = o.DeviceClass + toSerialize["device_uid"] = o.DeviceUid + toSerialize["challenge"] = o.Challenge + return toSerialize, nil +} + type NullableDeviceChallenge struct { value *DeviceChallenge isSet bool diff --git a/model_device_challenge_request.go b/model_device_challenge_request.go index c139142ea..9bd064622 100644 --- a/model_device_challenge_request.go +++ b/model_device_challenge_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the DeviceChallengeRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DeviceChallengeRequest{} + // DeviceChallengeRequest Single device challenge type DeviceChallengeRequest struct { DeviceClass string `json:"device_class"` @@ -104,7 +107,7 @@ func (o *DeviceChallengeRequest) GetChallenge() map[string]interface{} { // and a boolean to check if the value has been set. func (o *DeviceChallengeRequest) GetChallengeOk() (map[string]interface{}, bool) { if o == nil { - return nil, false + return map[string]interface{}{}, false } return o.Challenge, true } @@ -115,19 +118,21 @@ func (o *DeviceChallengeRequest) SetChallenge(v map[string]interface{}) { } func (o DeviceChallengeRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["device_class"] = o.DeviceClass - } - if true { - toSerialize["device_uid"] = o.DeviceUid - } - if true { - toSerialize["challenge"] = o.Challenge + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o DeviceChallengeRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["device_class"] = o.DeviceClass + toSerialize["device_uid"] = o.DeviceUid + toSerialize["challenge"] = o.Challenge + return toSerialize, nil +} + type NullableDeviceChallengeRequest struct { value *DeviceChallengeRequest isSet bool diff --git a/model_docker_service_connection.go b/model_docker_service_connection.go index 04f955082..518dc3a20 100644 --- a/model_docker_service_connection.go +++ b/model_docker_service_connection.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the DockerServiceConnection type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DockerServiceConnection{} + // DockerServiceConnection DockerServiceConnection Serializer type DockerServiceConnection struct { Pk string `json:"pk"` @@ -110,7 +113,7 @@ func (o *DockerServiceConnection) SetName(v string) { // GetLocal returns the Local field value if set, zero value otherwise. func (o *DockerServiceConnection) GetLocal() bool { - if o == nil || o.Local == nil { + if o == nil || IsNil(o.Local) { var ret bool return ret } @@ -120,7 +123,7 @@ func (o *DockerServiceConnection) GetLocal() bool { // GetLocalOk returns a tuple with the Local field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *DockerServiceConnection) GetLocalOk() (*bool, bool) { - if o == nil || o.Local == nil { + if o == nil || IsNil(o.Local) { return nil, false } return o.Local, true @@ -128,7 +131,7 @@ func (o *DockerServiceConnection) GetLocalOk() (*bool, bool) { // HasLocal returns a boolean if a field has been set. func (o *DockerServiceConnection) HasLocal() bool { - if o != nil && o.Local != nil { + if o != nil && !IsNil(o.Local) { return true } @@ -262,7 +265,7 @@ func (o *DockerServiceConnection) SetUrl(v string) { // GetTlsVerification returns the TlsVerification field value if set, zero value otherwise (both if not set or set to explicit null). func (o *DockerServiceConnection) GetTlsVerification() string { - if o == nil || o.TlsVerification.Get() == nil { + if o == nil || IsNil(o.TlsVerification.Get()) { var ret string return ret } @@ -305,7 +308,7 @@ func (o *DockerServiceConnection) UnsetTlsVerification() { // GetTlsAuthentication returns the TlsAuthentication field value if set, zero value otherwise (both if not set or set to explicit null). func (o *DockerServiceConnection) GetTlsAuthentication() string { - if o == nil || o.TlsAuthentication.Get() == nil { + if o == nil || IsNil(o.TlsAuthentication.Get()) { var ret string return ret } @@ -347,38 +350,32 @@ func (o *DockerServiceConnection) UnsetTlsAuthentication() { } func (o DockerServiceConnection) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if true { - toSerialize["name"] = o.Name - } - if o.Local != nil { + return json.Marshal(toSerialize) +} + +func (o DockerServiceConnection) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name + if !IsNil(o.Local) { toSerialize["local"] = o.Local } - if true { - toSerialize["component"] = o.Component - } - if true { - toSerialize["verbose_name"] = o.VerboseName - } - if true { - toSerialize["verbose_name_plural"] = o.VerboseNamePlural - } - if true { - toSerialize["meta_model_name"] = o.MetaModelName - } - if true { - toSerialize["url"] = o.Url - } + // skip: component is readOnly + // skip: verbose_name is readOnly + // skip: verbose_name_plural is readOnly + // skip: meta_model_name is readOnly + toSerialize["url"] = o.Url if o.TlsVerification.IsSet() { toSerialize["tls_verification"] = o.TlsVerification.Get() } if o.TlsAuthentication.IsSet() { toSerialize["tls_authentication"] = o.TlsAuthentication.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableDockerServiceConnection struct { diff --git a/model_docker_service_connection_request.go b/model_docker_service_connection_request.go index 3e925c7dd..0c37b3dfd 100644 --- a/model_docker_service_connection_request.go +++ b/model_docker_service_connection_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the DockerServiceConnectionRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DockerServiceConnectionRequest{} + // DockerServiceConnectionRequest DockerServiceConnection Serializer type DockerServiceConnectionRequest struct { Name string `json:"name"` @@ -73,7 +76,7 @@ func (o *DockerServiceConnectionRequest) SetName(v string) { // GetLocal returns the Local field value if set, zero value otherwise. func (o *DockerServiceConnectionRequest) GetLocal() bool { - if o == nil || o.Local == nil { + if o == nil || IsNil(o.Local) { var ret bool return ret } @@ -83,7 +86,7 @@ func (o *DockerServiceConnectionRequest) GetLocal() bool { // GetLocalOk returns a tuple with the Local field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *DockerServiceConnectionRequest) GetLocalOk() (*bool, bool) { - if o == nil || o.Local == nil { + if o == nil || IsNil(o.Local) { return nil, false } return o.Local, true @@ -91,7 +94,7 @@ func (o *DockerServiceConnectionRequest) GetLocalOk() (*bool, bool) { // HasLocal returns a boolean if a field has been set. func (o *DockerServiceConnectionRequest) HasLocal() bool { - if o != nil && o.Local != nil { + if o != nil && !IsNil(o.Local) { return true } @@ -129,7 +132,7 @@ func (o *DockerServiceConnectionRequest) SetUrl(v string) { // GetTlsVerification returns the TlsVerification field value if set, zero value otherwise (both if not set or set to explicit null). func (o *DockerServiceConnectionRequest) GetTlsVerification() string { - if o == nil || o.TlsVerification.Get() == nil { + if o == nil || IsNil(o.TlsVerification.Get()) { var ret string return ret } @@ -172,7 +175,7 @@ func (o *DockerServiceConnectionRequest) UnsetTlsVerification() { // GetTlsAuthentication returns the TlsAuthentication field value if set, zero value otherwise (both if not set or set to explicit null). func (o *DockerServiceConnectionRequest) GetTlsAuthentication() string { - if o == nil || o.TlsAuthentication.Get() == nil { + if o == nil || IsNil(o.TlsAuthentication.Get()) { var ret string return ret } @@ -214,23 +217,27 @@ func (o *DockerServiceConnectionRequest) UnsetTlsAuthentication() { } func (o DockerServiceConnectionRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.Local != nil { + return json.Marshal(toSerialize) +} + +func (o DockerServiceConnectionRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Local) { toSerialize["local"] = o.Local } - if true { - toSerialize["url"] = o.Url - } + toSerialize["url"] = o.Url if o.TlsVerification.IsSet() { toSerialize["tls_verification"] = o.TlsVerification.Get() } if o.TlsAuthentication.IsSet() { toSerialize["tls_authentication"] = o.TlsAuthentication.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableDockerServiceConnectionRequest struct { diff --git a/model_dummy_challenge.go b/model_dummy_challenge.go index e52c4a503..c636cc1cb 100644 --- a/model_dummy_challenge.go +++ b/model_dummy_challenge.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the DummyChallenge type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DummyChallenge{} + // DummyChallenge Dummy challenge type DummyChallenge struct { Type ChallengeChoices `json:"type"` @@ -71,7 +74,7 @@ func (o *DummyChallenge) SetType(v ChallengeChoices) { // GetFlowInfo returns the FlowInfo field value if set, zero value otherwise. func (o *DummyChallenge) GetFlowInfo() ContextualFlowInfo { - if o == nil || o.FlowInfo == nil { + if o == nil || IsNil(o.FlowInfo) { var ret ContextualFlowInfo return ret } @@ -81,7 +84,7 @@ func (o *DummyChallenge) GetFlowInfo() ContextualFlowInfo { // GetFlowInfoOk returns a tuple with the FlowInfo field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *DummyChallenge) GetFlowInfoOk() (*ContextualFlowInfo, bool) { - if o == nil || o.FlowInfo == nil { + if o == nil || IsNil(o.FlowInfo) { return nil, false } return o.FlowInfo, true @@ -89,7 +92,7 @@ func (o *DummyChallenge) GetFlowInfoOk() (*ContextualFlowInfo, bool) { // HasFlowInfo returns a boolean if a field has been set. func (o *DummyChallenge) HasFlowInfo() bool { - if o != nil && o.FlowInfo != nil { + if o != nil && !IsNil(o.FlowInfo) { return true } @@ -103,7 +106,7 @@ func (o *DummyChallenge) SetFlowInfo(v ContextualFlowInfo) { // GetComponent returns the Component field value if set, zero value otherwise. func (o *DummyChallenge) GetComponent() string { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { var ret string return ret } @@ -113,7 +116,7 @@ func (o *DummyChallenge) GetComponent() string { // GetComponentOk returns a tuple with the Component field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *DummyChallenge) GetComponentOk() (*string, bool) { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { return nil, false } return o.Component, true @@ -121,7 +124,7 @@ func (o *DummyChallenge) GetComponentOk() (*string, bool) { // HasComponent returns a boolean if a field has been set. func (o *DummyChallenge) HasComponent() bool { - if o != nil && o.Component != nil { + if o != nil && !IsNil(o.Component) { return true } @@ -135,7 +138,7 @@ func (o *DummyChallenge) SetComponent(v string) { // GetResponseErrors returns the ResponseErrors field value if set, zero value otherwise. func (o *DummyChallenge) GetResponseErrors() map[string][]ErrorDetail { - if o == nil || o.ResponseErrors == nil { + if o == nil || IsNil(o.ResponseErrors) { var ret map[string][]ErrorDetail return ret } @@ -145,7 +148,7 @@ func (o *DummyChallenge) GetResponseErrors() map[string][]ErrorDetail { // GetResponseErrorsOk returns a tuple with the ResponseErrors field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *DummyChallenge) GetResponseErrorsOk() (*map[string][]ErrorDetail, bool) { - if o == nil || o.ResponseErrors == nil { + if o == nil || IsNil(o.ResponseErrors) { return nil, false } return o.ResponseErrors, true @@ -153,7 +156,7 @@ func (o *DummyChallenge) GetResponseErrorsOk() (*map[string][]ErrorDetail, bool) // HasResponseErrors returns a boolean if a field has been set. func (o *DummyChallenge) HasResponseErrors() bool { - if o != nil && o.ResponseErrors != nil { + if o != nil && !IsNil(o.ResponseErrors) { return true } @@ -166,20 +169,26 @@ func (o *DummyChallenge) SetResponseErrors(v map[string][]ErrorDetail) { } func (o DummyChallenge) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["type"] = o.Type + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.FlowInfo != nil { + return json.Marshal(toSerialize) +} + +func (o DummyChallenge) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + if !IsNil(o.FlowInfo) { toSerialize["flow_info"] = o.FlowInfo } - if o.Component != nil { + if !IsNil(o.Component) { toSerialize["component"] = o.Component } - if o.ResponseErrors != nil { + if !IsNil(o.ResponseErrors) { toSerialize["response_errors"] = o.ResponseErrors } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableDummyChallenge struct { diff --git a/model_dummy_challenge_response_request.go b/model_dummy_challenge_response_request.go index 60d08631b..7a4e10f30 100644 --- a/model_dummy_challenge_response_request.go +++ b/model_dummy_challenge_response_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the DummyChallengeResponseRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DummyChallengeResponseRequest{} + // DummyChallengeResponseRequest Dummy challenge response type DummyChallengeResponseRequest struct { Component *string `json:"component,omitempty"` @@ -43,7 +46,7 @@ func NewDummyChallengeResponseRequestWithDefaults() *DummyChallengeResponseReque // GetComponent returns the Component field value if set, zero value otherwise. func (o *DummyChallengeResponseRequest) GetComponent() string { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { var ret string return ret } @@ -53,7 +56,7 @@ func (o *DummyChallengeResponseRequest) GetComponent() string { // GetComponentOk returns a tuple with the Component field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *DummyChallengeResponseRequest) GetComponentOk() (*string, bool) { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { return nil, false } return o.Component, true @@ -61,7 +64,7 @@ func (o *DummyChallengeResponseRequest) GetComponentOk() (*string, bool) { // HasComponent returns a boolean if a field has been set. func (o *DummyChallengeResponseRequest) HasComponent() bool { - if o != nil && o.Component != nil { + if o != nil && !IsNil(o.Component) { return true } @@ -74,11 +77,19 @@ func (o *DummyChallengeResponseRequest) SetComponent(v string) { } func (o DummyChallengeResponseRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DummyChallengeResponseRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Component != nil { + if !IsNil(o.Component) { toSerialize["component"] = o.Component } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableDummyChallengeResponseRequest struct { diff --git a/model_dummy_policy.go b/model_dummy_policy.go index ab22a6634..80918c9f7 100644 --- a/model_dummy_policy.go +++ b/model_dummy_policy.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the DummyPolicy type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DummyPolicy{} + // DummyPolicy Dummy Policy Serializer type DummyPolicy struct { Pk string `json:"pk"` @@ -110,7 +113,7 @@ func (o *DummyPolicy) SetName(v string) { // GetExecutionLogging returns the ExecutionLogging field value if set, zero value otherwise. func (o *DummyPolicy) GetExecutionLogging() bool { - if o == nil || o.ExecutionLogging == nil { + if o == nil || IsNil(o.ExecutionLogging) { var ret bool return ret } @@ -120,7 +123,7 @@ func (o *DummyPolicy) GetExecutionLogging() bool { // GetExecutionLoggingOk returns a tuple with the ExecutionLogging field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *DummyPolicy) GetExecutionLoggingOk() (*bool, bool) { - if o == nil || o.ExecutionLogging == nil { + if o == nil || IsNil(o.ExecutionLogging) { return nil, false } return o.ExecutionLogging, true @@ -128,7 +131,7 @@ func (o *DummyPolicy) GetExecutionLoggingOk() (*bool, bool) { // HasExecutionLogging returns a boolean if a field has been set. func (o *DummyPolicy) HasExecutionLogging() bool { - if o != nil && o.ExecutionLogging != nil { + if o != nil && !IsNil(o.ExecutionLogging) { return true } @@ -262,7 +265,7 @@ func (o *DummyPolicy) SetBoundTo(v int32) { // GetResult returns the Result field value if set, zero value otherwise. func (o *DummyPolicy) GetResult() bool { - if o == nil || o.Result == nil { + if o == nil || IsNil(o.Result) { var ret bool return ret } @@ -272,7 +275,7 @@ func (o *DummyPolicy) GetResult() bool { // GetResultOk returns a tuple with the Result field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *DummyPolicy) GetResultOk() (*bool, bool) { - if o == nil || o.Result == nil { + if o == nil || IsNil(o.Result) { return nil, false } return o.Result, true @@ -280,7 +283,7 @@ func (o *DummyPolicy) GetResultOk() (*bool, bool) { // HasResult returns a boolean if a field has been set. func (o *DummyPolicy) HasResult() bool { - if o != nil && o.Result != nil { + if o != nil && !IsNil(o.Result) { return true } @@ -294,7 +297,7 @@ func (o *DummyPolicy) SetResult(v bool) { // GetWaitMin returns the WaitMin field value if set, zero value otherwise. func (o *DummyPolicy) GetWaitMin() int32 { - if o == nil || o.WaitMin == nil { + if o == nil || IsNil(o.WaitMin) { var ret int32 return ret } @@ -304,7 +307,7 @@ func (o *DummyPolicy) GetWaitMin() int32 { // GetWaitMinOk returns a tuple with the WaitMin field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *DummyPolicy) GetWaitMinOk() (*int32, bool) { - if o == nil || o.WaitMin == nil { + if o == nil || IsNil(o.WaitMin) { return nil, false } return o.WaitMin, true @@ -312,7 +315,7 @@ func (o *DummyPolicy) GetWaitMinOk() (*int32, bool) { // HasWaitMin returns a boolean if a field has been set. func (o *DummyPolicy) HasWaitMin() bool { - if o != nil && o.WaitMin != nil { + if o != nil && !IsNil(o.WaitMin) { return true } @@ -326,7 +329,7 @@ func (o *DummyPolicy) SetWaitMin(v int32) { // GetWaitMax returns the WaitMax field value if set, zero value otherwise. func (o *DummyPolicy) GetWaitMax() int32 { - if o == nil || o.WaitMax == nil { + if o == nil || IsNil(o.WaitMax) { var ret int32 return ret } @@ -336,7 +339,7 @@ func (o *DummyPolicy) GetWaitMax() int32 { // GetWaitMaxOk returns a tuple with the WaitMax field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *DummyPolicy) GetWaitMaxOk() (*int32, bool) { - if o == nil || o.WaitMax == nil { + if o == nil || IsNil(o.WaitMax) { return nil, false } return o.WaitMax, true @@ -344,7 +347,7 @@ func (o *DummyPolicy) GetWaitMaxOk() (*int32, bool) { // HasWaitMax returns a boolean if a field has been set. func (o *DummyPolicy) HasWaitMax() bool { - if o != nil && o.WaitMax != nil { + if o != nil && !IsNil(o.WaitMax) { return true } @@ -357,41 +360,35 @@ func (o *DummyPolicy) SetWaitMax(v int32) { } func (o DummyPolicy) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if true { - toSerialize["name"] = o.Name - } - if o.ExecutionLogging != nil { + return json.Marshal(toSerialize) +} + +func (o DummyPolicy) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name + if !IsNil(o.ExecutionLogging) { toSerialize["execution_logging"] = o.ExecutionLogging } - if true { - toSerialize["component"] = o.Component - } - if true { - toSerialize["verbose_name"] = o.VerboseName - } - if true { - toSerialize["verbose_name_plural"] = o.VerboseNamePlural - } - if true { - toSerialize["meta_model_name"] = o.MetaModelName - } - if true { - toSerialize["bound_to"] = o.BoundTo - } - if o.Result != nil { + // skip: component is readOnly + // skip: verbose_name is readOnly + // skip: verbose_name_plural is readOnly + // skip: meta_model_name is readOnly + // skip: bound_to is readOnly + if !IsNil(o.Result) { toSerialize["result"] = o.Result } - if o.WaitMin != nil { + if !IsNil(o.WaitMin) { toSerialize["wait_min"] = o.WaitMin } - if o.WaitMax != nil { + if !IsNil(o.WaitMax) { toSerialize["wait_max"] = o.WaitMax } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableDummyPolicy struct { diff --git a/model_dummy_policy_request.go b/model_dummy_policy_request.go index e3e6cbf06..8ba16227e 100644 --- a/model_dummy_policy_request.go +++ b/model_dummy_policy_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the DummyPolicyRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DummyPolicyRequest{} + // DummyPolicyRequest Dummy Policy Serializer type DummyPolicyRequest struct { Name string `json:"name"` @@ -69,7 +72,7 @@ func (o *DummyPolicyRequest) SetName(v string) { // GetExecutionLogging returns the ExecutionLogging field value if set, zero value otherwise. func (o *DummyPolicyRequest) GetExecutionLogging() bool { - if o == nil || o.ExecutionLogging == nil { + if o == nil || IsNil(o.ExecutionLogging) { var ret bool return ret } @@ -79,7 +82,7 @@ func (o *DummyPolicyRequest) GetExecutionLogging() bool { // GetExecutionLoggingOk returns a tuple with the ExecutionLogging field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *DummyPolicyRequest) GetExecutionLoggingOk() (*bool, bool) { - if o == nil || o.ExecutionLogging == nil { + if o == nil || IsNil(o.ExecutionLogging) { return nil, false } return o.ExecutionLogging, true @@ -87,7 +90,7 @@ func (o *DummyPolicyRequest) GetExecutionLoggingOk() (*bool, bool) { // HasExecutionLogging returns a boolean if a field has been set. func (o *DummyPolicyRequest) HasExecutionLogging() bool { - if o != nil && o.ExecutionLogging != nil { + if o != nil && !IsNil(o.ExecutionLogging) { return true } @@ -101,7 +104,7 @@ func (o *DummyPolicyRequest) SetExecutionLogging(v bool) { // GetResult returns the Result field value if set, zero value otherwise. func (o *DummyPolicyRequest) GetResult() bool { - if o == nil || o.Result == nil { + if o == nil || IsNil(o.Result) { var ret bool return ret } @@ -111,7 +114,7 @@ func (o *DummyPolicyRequest) GetResult() bool { // GetResultOk returns a tuple with the Result field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *DummyPolicyRequest) GetResultOk() (*bool, bool) { - if o == nil || o.Result == nil { + if o == nil || IsNil(o.Result) { return nil, false } return o.Result, true @@ -119,7 +122,7 @@ func (o *DummyPolicyRequest) GetResultOk() (*bool, bool) { // HasResult returns a boolean if a field has been set. func (o *DummyPolicyRequest) HasResult() bool { - if o != nil && o.Result != nil { + if o != nil && !IsNil(o.Result) { return true } @@ -133,7 +136,7 @@ func (o *DummyPolicyRequest) SetResult(v bool) { // GetWaitMin returns the WaitMin field value if set, zero value otherwise. func (o *DummyPolicyRequest) GetWaitMin() int32 { - if o == nil || o.WaitMin == nil { + if o == nil || IsNil(o.WaitMin) { var ret int32 return ret } @@ -143,7 +146,7 @@ func (o *DummyPolicyRequest) GetWaitMin() int32 { // GetWaitMinOk returns a tuple with the WaitMin field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *DummyPolicyRequest) GetWaitMinOk() (*int32, bool) { - if o == nil || o.WaitMin == nil { + if o == nil || IsNil(o.WaitMin) { return nil, false } return o.WaitMin, true @@ -151,7 +154,7 @@ func (o *DummyPolicyRequest) GetWaitMinOk() (*int32, bool) { // HasWaitMin returns a boolean if a field has been set. func (o *DummyPolicyRequest) HasWaitMin() bool { - if o != nil && o.WaitMin != nil { + if o != nil && !IsNil(o.WaitMin) { return true } @@ -165,7 +168,7 @@ func (o *DummyPolicyRequest) SetWaitMin(v int32) { // GetWaitMax returns the WaitMax field value if set, zero value otherwise. func (o *DummyPolicyRequest) GetWaitMax() int32 { - if o == nil || o.WaitMax == nil { + if o == nil || IsNil(o.WaitMax) { var ret int32 return ret } @@ -175,7 +178,7 @@ func (o *DummyPolicyRequest) GetWaitMax() int32 { // GetWaitMaxOk returns a tuple with the WaitMax field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *DummyPolicyRequest) GetWaitMaxOk() (*int32, bool) { - if o == nil || o.WaitMax == nil { + if o == nil || IsNil(o.WaitMax) { return nil, false } return o.WaitMax, true @@ -183,7 +186,7 @@ func (o *DummyPolicyRequest) GetWaitMaxOk() (*int32, bool) { // HasWaitMax returns a boolean if a field has been set. func (o *DummyPolicyRequest) HasWaitMax() bool { - if o != nil && o.WaitMax != nil { + if o != nil && !IsNil(o.WaitMax) { return true } @@ -196,23 +199,29 @@ func (o *DummyPolicyRequest) SetWaitMax(v int32) { } func (o DummyPolicyRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.ExecutionLogging != nil { + return json.Marshal(toSerialize) +} + +func (o DummyPolicyRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.ExecutionLogging) { toSerialize["execution_logging"] = o.ExecutionLogging } - if o.Result != nil { + if !IsNil(o.Result) { toSerialize["result"] = o.Result } - if o.WaitMin != nil { + if !IsNil(o.WaitMin) { toSerialize["wait_min"] = o.WaitMin } - if o.WaitMax != nil { + if !IsNil(o.WaitMax) { toSerialize["wait_max"] = o.WaitMax } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableDummyPolicyRequest struct { diff --git a/model_dummy_stage.go b/model_dummy_stage.go index 97391aafa..ead844d93 100644 --- a/model_dummy_stage.go +++ b/model_dummy_stage.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the DummyStage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DummyStage{} + // DummyStage DummyStage Serializer type DummyStage struct { Pk string `json:"pk"` @@ -200,7 +203,7 @@ func (o *DummyStage) SetMetaModelName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *DummyStage) GetFlowSet() []FlowSet { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSet return ret } @@ -210,7 +213,7 @@ func (o *DummyStage) GetFlowSet() []FlowSet { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *DummyStage) GetFlowSetOk() ([]FlowSet, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -218,7 +221,7 @@ func (o *DummyStage) GetFlowSetOk() ([]FlowSet, bool) { // HasFlowSet returns a boolean if a field has been set. func (o *DummyStage) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -232,7 +235,7 @@ func (o *DummyStage) SetFlowSet(v []FlowSet) { // GetThrowError returns the ThrowError field value if set, zero value otherwise. func (o *DummyStage) GetThrowError() bool { - if o == nil || o.ThrowError == nil { + if o == nil || IsNil(o.ThrowError) { var ret bool return ret } @@ -242,7 +245,7 @@ func (o *DummyStage) GetThrowError() bool { // GetThrowErrorOk returns a tuple with the ThrowError field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *DummyStage) GetThrowErrorOk() (*bool, bool) { - if o == nil || o.ThrowError == nil { + if o == nil || IsNil(o.ThrowError) { return nil, false } return o.ThrowError, true @@ -250,7 +253,7 @@ func (o *DummyStage) GetThrowErrorOk() (*bool, bool) { // HasThrowError returns a boolean if a field has been set. func (o *DummyStage) HasThrowError() bool { - if o != nil && o.ThrowError != nil { + if o != nil && !IsNil(o.ThrowError) { return true } @@ -263,32 +266,28 @@ func (o *DummyStage) SetThrowError(v bool) { } func (o DummyStage) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["component"] = o.Component - } - if true { - toSerialize["verbose_name"] = o.VerboseName - } - if true { - toSerialize["verbose_name_plural"] = o.VerboseNamePlural + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if true { - toSerialize["meta_model_name"] = o.MetaModelName - } - if o.FlowSet != nil { + return json.Marshal(toSerialize) +} + +func (o DummyStage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name + // skip: component is readOnly + // skip: verbose_name is readOnly + // skip: verbose_name_plural is readOnly + // skip: meta_model_name is readOnly + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } - if o.ThrowError != nil { + if !IsNil(o.ThrowError) { toSerialize["throw_error"] = o.ThrowError } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableDummyStage struct { diff --git a/model_dummy_stage_request.go b/model_dummy_stage_request.go index 8fc780e24..94fae6252 100644 --- a/model_dummy_stage_request.go +++ b/model_dummy_stage_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the DummyStageRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DummyStageRequest{} + // DummyStageRequest DummyStage Serializer type DummyStageRequest struct { Name string `json:"name"` @@ -66,7 +69,7 @@ func (o *DummyStageRequest) SetName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *DummyStageRequest) GetFlowSet() []FlowSetRequest { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSetRequest return ret } @@ -76,7 +79,7 @@ func (o *DummyStageRequest) GetFlowSet() []FlowSetRequest { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *DummyStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -84,7 +87,7 @@ func (o *DummyStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { // HasFlowSet returns a boolean if a field has been set. func (o *DummyStageRequest) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -98,7 +101,7 @@ func (o *DummyStageRequest) SetFlowSet(v []FlowSetRequest) { // GetThrowError returns the ThrowError field value if set, zero value otherwise. func (o *DummyStageRequest) GetThrowError() bool { - if o == nil || o.ThrowError == nil { + if o == nil || IsNil(o.ThrowError) { var ret bool return ret } @@ -108,7 +111,7 @@ func (o *DummyStageRequest) GetThrowError() bool { // GetThrowErrorOk returns a tuple with the ThrowError field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *DummyStageRequest) GetThrowErrorOk() (*bool, bool) { - if o == nil || o.ThrowError == nil { + if o == nil || IsNil(o.ThrowError) { return nil, false } return o.ThrowError, true @@ -116,7 +119,7 @@ func (o *DummyStageRequest) GetThrowErrorOk() (*bool, bool) { // HasThrowError returns a boolean if a field has been set. func (o *DummyStageRequest) HasThrowError() bool { - if o != nil && o.ThrowError != nil { + if o != nil && !IsNil(o.ThrowError) { return true } @@ -129,17 +132,23 @@ func (o *DummyStageRequest) SetThrowError(v bool) { } func (o DummyStageRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.FlowSet != nil { + return json.Marshal(toSerialize) +} + +func (o DummyStageRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } - if o.ThrowError != nil { + if !IsNil(o.ThrowError) { toSerialize["throw_error"] = o.ThrowError } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableDummyStageRequest struct { diff --git a/model_duo_device.go b/model_duo_device.go index 4658bd2fd..d7fdc2c9c 100644 --- a/model_duo_device.go +++ b/model_duo_device.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the DuoDevice type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DuoDevice{} + // DuoDevice Serializer for Duo authenticator devices type DuoDevice struct { Pk int32 `json:"pk"` @@ -90,16 +93,20 @@ func (o *DuoDevice) SetName(v string) { } func (o DuoDevice) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o DuoDevice) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name + return toSerialize, nil +} + type NullableDuoDevice struct { value *DuoDevice isSet bool diff --git a/model_duo_device_enrollment_status.go b/model_duo_device_enrollment_status.go index 59cb41776..f82f405a9 100644 --- a/model_duo_device_enrollment_status.go +++ b/model_duo_device_enrollment_status.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the DuoDeviceEnrollmentStatus type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DuoDeviceEnrollmentStatus{} + // DuoDeviceEnrollmentStatus struct for DuoDeviceEnrollmentStatus type DuoDeviceEnrollmentStatus struct { DuoResponse DuoResponseEnum `json:"duo_response"` @@ -63,13 +66,19 @@ func (o *DuoDeviceEnrollmentStatus) SetDuoResponse(v DuoResponseEnum) { } func (o DuoDeviceEnrollmentStatus) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["duo_response"] = o.DuoResponse + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o DuoDeviceEnrollmentStatus) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["duo_response"] = o.DuoResponse + return toSerialize, nil +} + type NullableDuoDeviceEnrollmentStatus struct { value *DuoDeviceEnrollmentStatus isSet bool diff --git a/model_duo_device_request.go b/model_duo_device_request.go index 5622c4d6b..e2a5dfcdf 100644 --- a/model_duo_device_request.go +++ b/model_duo_device_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the DuoDeviceRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DuoDeviceRequest{} + // DuoDeviceRequest Serializer for Duo authenticator devices type DuoDeviceRequest struct { // The human-readable name of this device. @@ -64,13 +67,19 @@ func (o *DuoDeviceRequest) SetName(v string) { } func (o DuoDeviceRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o DuoDeviceRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + return toSerialize, nil +} + type NullableDuoDeviceRequest struct { value *DuoDeviceRequest isSet bool diff --git a/model_email_challenge.go b/model_email_challenge.go index 0dacd2b71..3c6b9c00e 100644 --- a/model_email_challenge.go +++ b/model_email_challenge.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the EmailChallenge type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EmailChallenge{} + // EmailChallenge Email challenge type EmailChallenge struct { Type ChallengeChoices `json:"type"` @@ -71,7 +74,7 @@ func (o *EmailChallenge) SetType(v ChallengeChoices) { // GetFlowInfo returns the FlowInfo field value if set, zero value otherwise. func (o *EmailChallenge) GetFlowInfo() ContextualFlowInfo { - if o == nil || o.FlowInfo == nil { + if o == nil || IsNil(o.FlowInfo) { var ret ContextualFlowInfo return ret } @@ -81,7 +84,7 @@ func (o *EmailChallenge) GetFlowInfo() ContextualFlowInfo { // GetFlowInfoOk returns a tuple with the FlowInfo field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *EmailChallenge) GetFlowInfoOk() (*ContextualFlowInfo, bool) { - if o == nil || o.FlowInfo == nil { + if o == nil || IsNil(o.FlowInfo) { return nil, false } return o.FlowInfo, true @@ -89,7 +92,7 @@ func (o *EmailChallenge) GetFlowInfoOk() (*ContextualFlowInfo, bool) { // HasFlowInfo returns a boolean if a field has been set. func (o *EmailChallenge) HasFlowInfo() bool { - if o != nil && o.FlowInfo != nil { + if o != nil && !IsNil(o.FlowInfo) { return true } @@ -103,7 +106,7 @@ func (o *EmailChallenge) SetFlowInfo(v ContextualFlowInfo) { // GetComponent returns the Component field value if set, zero value otherwise. func (o *EmailChallenge) GetComponent() string { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { var ret string return ret } @@ -113,7 +116,7 @@ func (o *EmailChallenge) GetComponent() string { // GetComponentOk returns a tuple with the Component field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *EmailChallenge) GetComponentOk() (*string, bool) { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { return nil, false } return o.Component, true @@ -121,7 +124,7 @@ func (o *EmailChallenge) GetComponentOk() (*string, bool) { // HasComponent returns a boolean if a field has been set. func (o *EmailChallenge) HasComponent() bool { - if o != nil && o.Component != nil { + if o != nil && !IsNil(o.Component) { return true } @@ -135,7 +138,7 @@ func (o *EmailChallenge) SetComponent(v string) { // GetResponseErrors returns the ResponseErrors field value if set, zero value otherwise. func (o *EmailChallenge) GetResponseErrors() map[string][]ErrorDetail { - if o == nil || o.ResponseErrors == nil { + if o == nil || IsNil(o.ResponseErrors) { var ret map[string][]ErrorDetail return ret } @@ -145,7 +148,7 @@ func (o *EmailChallenge) GetResponseErrors() map[string][]ErrorDetail { // GetResponseErrorsOk returns a tuple with the ResponseErrors field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *EmailChallenge) GetResponseErrorsOk() (*map[string][]ErrorDetail, bool) { - if o == nil || o.ResponseErrors == nil { + if o == nil || IsNil(o.ResponseErrors) { return nil, false } return o.ResponseErrors, true @@ -153,7 +156,7 @@ func (o *EmailChallenge) GetResponseErrorsOk() (*map[string][]ErrorDetail, bool) // HasResponseErrors returns a boolean if a field has been set. func (o *EmailChallenge) HasResponseErrors() bool { - if o != nil && o.ResponseErrors != nil { + if o != nil && !IsNil(o.ResponseErrors) { return true } @@ -166,20 +169,26 @@ func (o *EmailChallenge) SetResponseErrors(v map[string][]ErrorDetail) { } func (o EmailChallenge) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["type"] = o.Type + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.FlowInfo != nil { + return json.Marshal(toSerialize) +} + +func (o EmailChallenge) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + if !IsNil(o.FlowInfo) { toSerialize["flow_info"] = o.FlowInfo } - if o.Component != nil { + if !IsNil(o.Component) { toSerialize["component"] = o.Component } - if o.ResponseErrors != nil { + if !IsNil(o.ResponseErrors) { toSerialize["response_errors"] = o.ResponseErrors } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableEmailChallenge struct { diff --git a/model_email_challenge_response_request.go b/model_email_challenge_response_request.go index baba750c3..6fd66656c 100644 --- a/model_email_challenge_response_request.go +++ b/model_email_challenge_response_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the EmailChallengeResponseRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EmailChallengeResponseRequest{} + // EmailChallengeResponseRequest Email challenge resposen. No fields. This challenge is always declared invalid to give the user a chance to retry type EmailChallengeResponseRequest struct { Component *string `json:"component,omitempty"` @@ -43,7 +46,7 @@ func NewEmailChallengeResponseRequestWithDefaults() *EmailChallengeResponseReque // GetComponent returns the Component field value if set, zero value otherwise. func (o *EmailChallengeResponseRequest) GetComponent() string { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { var ret string return ret } @@ -53,7 +56,7 @@ func (o *EmailChallengeResponseRequest) GetComponent() string { // GetComponentOk returns a tuple with the Component field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *EmailChallengeResponseRequest) GetComponentOk() (*string, bool) { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { return nil, false } return o.Component, true @@ -61,7 +64,7 @@ func (o *EmailChallengeResponseRequest) GetComponentOk() (*string, bool) { // HasComponent returns a boolean if a field has been set. func (o *EmailChallengeResponseRequest) HasComponent() bool { - if o != nil && o.Component != nil { + if o != nil && !IsNil(o.Component) { return true } @@ -74,11 +77,19 @@ func (o *EmailChallengeResponseRequest) SetComponent(v string) { } func (o EmailChallengeResponseRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EmailChallengeResponseRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Component != nil { + if !IsNil(o.Component) { toSerialize["component"] = o.Component } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableEmailChallengeResponseRequest struct { diff --git a/model_email_stage.go b/model_email_stage.go index 2dc0ae8bd..7ed048c27 100644 --- a/model_email_stage.go +++ b/model_email_stage.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the EmailStage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EmailStage{} + // EmailStage EmailStage Serializer type EmailStage struct { Pk string `json:"pk"` @@ -214,7 +217,7 @@ func (o *EmailStage) SetMetaModelName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *EmailStage) GetFlowSet() []FlowSet { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSet return ret } @@ -224,7 +227,7 @@ func (o *EmailStage) GetFlowSet() []FlowSet { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *EmailStage) GetFlowSetOk() ([]FlowSet, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -232,7 +235,7 @@ func (o *EmailStage) GetFlowSetOk() ([]FlowSet, bool) { // HasFlowSet returns a boolean if a field has been set. func (o *EmailStage) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -246,7 +249,7 @@ func (o *EmailStage) SetFlowSet(v []FlowSet) { // GetUseGlobalSettings returns the UseGlobalSettings field value if set, zero value otherwise. func (o *EmailStage) GetUseGlobalSettings() bool { - if o == nil || o.UseGlobalSettings == nil { + if o == nil || IsNil(o.UseGlobalSettings) { var ret bool return ret } @@ -256,7 +259,7 @@ func (o *EmailStage) GetUseGlobalSettings() bool { // GetUseGlobalSettingsOk returns a tuple with the UseGlobalSettings field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *EmailStage) GetUseGlobalSettingsOk() (*bool, bool) { - if o == nil || o.UseGlobalSettings == nil { + if o == nil || IsNil(o.UseGlobalSettings) { return nil, false } return o.UseGlobalSettings, true @@ -264,7 +267,7 @@ func (o *EmailStage) GetUseGlobalSettingsOk() (*bool, bool) { // HasUseGlobalSettings returns a boolean if a field has been set. func (o *EmailStage) HasUseGlobalSettings() bool { - if o != nil && o.UseGlobalSettings != nil { + if o != nil && !IsNil(o.UseGlobalSettings) { return true } @@ -278,7 +281,7 @@ func (o *EmailStage) SetUseGlobalSettings(v bool) { // GetHost returns the Host field value if set, zero value otherwise. func (o *EmailStage) GetHost() string { - if o == nil || o.Host == nil { + if o == nil || IsNil(o.Host) { var ret string return ret } @@ -288,7 +291,7 @@ func (o *EmailStage) GetHost() string { // GetHostOk returns a tuple with the Host field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *EmailStage) GetHostOk() (*string, bool) { - if o == nil || o.Host == nil { + if o == nil || IsNil(o.Host) { return nil, false } return o.Host, true @@ -296,7 +299,7 @@ func (o *EmailStage) GetHostOk() (*string, bool) { // HasHost returns a boolean if a field has been set. func (o *EmailStage) HasHost() bool { - if o != nil && o.Host != nil { + if o != nil && !IsNil(o.Host) { return true } @@ -310,7 +313,7 @@ func (o *EmailStage) SetHost(v string) { // GetPort returns the Port field value if set, zero value otherwise. func (o *EmailStage) GetPort() int32 { - if o == nil || o.Port == nil { + if o == nil || IsNil(o.Port) { var ret int32 return ret } @@ -320,7 +323,7 @@ func (o *EmailStage) GetPort() int32 { // GetPortOk returns a tuple with the Port field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *EmailStage) GetPortOk() (*int32, bool) { - if o == nil || o.Port == nil { + if o == nil || IsNil(o.Port) { return nil, false } return o.Port, true @@ -328,7 +331,7 @@ func (o *EmailStage) GetPortOk() (*int32, bool) { // HasPort returns a boolean if a field has been set. func (o *EmailStage) HasPort() bool { - if o != nil && o.Port != nil { + if o != nil && !IsNil(o.Port) { return true } @@ -342,7 +345,7 @@ func (o *EmailStage) SetPort(v int32) { // GetUsername returns the Username field value if set, zero value otherwise. func (o *EmailStage) GetUsername() string { - if o == nil || o.Username == nil { + if o == nil || IsNil(o.Username) { var ret string return ret } @@ -352,7 +355,7 @@ func (o *EmailStage) GetUsername() string { // GetUsernameOk returns a tuple with the Username field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *EmailStage) GetUsernameOk() (*string, bool) { - if o == nil || o.Username == nil { + if o == nil || IsNil(o.Username) { return nil, false } return o.Username, true @@ -360,7 +363,7 @@ func (o *EmailStage) GetUsernameOk() (*string, bool) { // HasUsername returns a boolean if a field has been set. func (o *EmailStage) HasUsername() bool { - if o != nil && o.Username != nil { + if o != nil && !IsNil(o.Username) { return true } @@ -374,7 +377,7 @@ func (o *EmailStage) SetUsername(v string) { // GetUseTls returns the UseTls field value if set, zero value otherwise. func (o *EmailStage) GetUseTls() bool { - if o == nil || o.UseTls == nil { + if o == nil || IsNil(o.UseTls) { var ret bool return ret } @@ -384,7 +387,7 @@ func (o *EmailStage) GetUseTls() bool { // GetUseTlsOk returns a tuple with the UseTls field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *EmailStage) GetUseTlsOk() (*bool, bool) { - if o == nil || o.UseTls == nil { + if o == nil || IsNil(o.UseTls) { return nil, false } return o.UseTls, true @@ -392,7 +395,7 @@ func (o *EmailStage) GetUseTlsOk() (*bool, bool) { // HasUseTls returns a boolean if a field has been set. func (o *EmailStage) HasUseTls() bool { - if o != nil && o.UseTls != nil { + if o != nil && !IsNil(o.UseTls) { return true } @@ -406,7 +409,7 @@ func (o *EmailStage) SetUseTls(v bool) { // GetUseSsl returns the UseSsl field value if set, zero value otherwise. func (o *EmailStage) GetUseSsl() bool { - if o == nil || o.UseSsl == nil { + if o == nil || IsNil(o.UseSsl) { var ret bool return ret } @@ -416,7 +419,7 @@ func (o *EmailStage) GetUseSsl() bool { // GetUseSslOk returns a tuple with the UseSsl field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *EmailStage) GetUseSslOk() (*bool, bool) { - if o == nil || o.UseSsl == nil { + if o == nil || IsNil(o.UseSsl) { return nil, false } return o.UseSsl, true @@ -424,7 +427,7 @@ func (o *EmailStage) GetUseSslOk() (*bool, bool) { // HasUseSsl returns a boolean if a field has been set. func (o *EmailStage) HasUseSsl() bool { - if o != nil && o.UseSsl != nil { + if o != nil && !IsNil(o.UseSsl) { return true } @@ -438,7 +441,7 @@ func (o *EmailStage) SetUseSsl(v bool) { // GetTimeout returns the Timeout field value if set, zero value otherwise. func (o *EmailStage) GetTimeout() int32 { - if o == nil || o.Timeout == nil { + if o == nil || IsNil(o.Timeout) { var ret int32 return ret } @@ -448,7 +451,7 @@ func (o *EmailStage) GetTimeout() int32 { // GetTimeoutOk returns a tuple with the Timeout field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *EmailStage) GetTimeoutOk() (*int32, bool) { - if o == nil || o.Timeout == nil { + if o == nil || IsNil(o.Timeout) { return nil, false } return o.Timeout, true @@ -456,7 +459,7 @@ func (o *EmailStage) GetTimeoutOk() (*int32, bool) { // HasTimeout returns a boolean if a field has been set. func (o *EmailStage) HasTimeout() bool { - if o != nil && o.Timeout != nil { + if o != nil && !IsNil(o.Timeout) { return true } @@ -470,7 +473,7 @@ func (o *EmailStage) SetTimeout(v int32) { // GetFromAddress returns the FromAddress field value if set, zero value otherwise. func (o *EmailStage) GetFromAddress() string { - if o == nil || o.FromAddress == nil { + if o == nil || IsNil(o.FromAddress) { var ret string return ret } @@ -480,7 +483,7 @@ func (o *EmailStage) GetFromAddress() string { // GetFromAddressOk returns a tuple with the FromAddress field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *EmailStage) GetFromAddressOk() (*string, bool) { - if o == nil || o.FromAddress == nil { + if o == nil || IsNil(o.FromAddress) { return nil, false } return o.FromAddress, true @@ -488,7 +491,7 @@ func (o *EmailStage) GetFromAddressOk() (*string, bool) { // HasFromAddress returns a boolean if a field has been set. func (o *EmailStage) HasFromAddress() bool { - if o != nil && o.FromAddress != nil { + if o != nil && !IsNil(o.FromAddress) { return true } @@ -502,7 +505,7 @@ func (o *EmailStage) SetFromAddress(v string) { // GetTokenExpiry returns the TokenExpiry field value if set, zero value otherwise. func (o *EmailStage) GetTokenExpiry() int32 { - if o == nil || o.TokenExpiry == nil { + if o == nil || IsNil(o.TokenExpiry) { var ret int32 return ret } @@ -512,7 +515,7 @@ func (o *EmailStage) GetTokenExpiry() int32 { // GetTokenExpiryOk returns a tuple with the TokenExpiry field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *EmailStage) GetTokenExpiryOk() (*int32, bool) { - if o == nil || o.TokenExpiry == nil { + if o == nil || IsNil(o.TokenExpiry) { return nil, false } return o.TokenExpiry, true @@ -520,7 +523,7 @@ func (o *EmailStage) GetTokenExpiryOk() (*int32, bool) { // HasTokenExpiry returns a boolean if a field has been set. func (o *EmailStage) HasTokenExpiry() bool { - if o != nil && o.TokenExpiry != nil { + if o != nil && !IsNil(o.TokenExpiry) { return true } @@ -534,7 +537,7 @@ func (o *EmailStage) SetTokenExpiry(v int32) { // GetSubject returns the Subject field value if set, zero value otherwise. func (o *EmailStage) GetSubject() string { - if o == nil || o.Subject == nil { + if o == nil || IsNil(o.Subject) { var ret string return ret } @@ -544,7 +547,7 @@ func (o *EmailStage) GetSubject() string { // GetSubjectOk returns a tuple with the Subject field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *EmailStage) GetSubjectOk() (*string, bool) { - if o == nil || o.Subject == nil { + if o == nil || IsNil(o.Subject) { return nil, false } return o.Subject, true @@ -552,7 +555,7 @@ func (o *EmailStage) GetSubjectOk() (*string, bool) { // HasSubject returns a boolean if a field has been set. func (o *EmailStage) HasSubject() bool { - if o != nil && o.Subject != nil { + if o != nil && !IsNil(o.Subject) { return true } @@ -566,7 +569,7 @@ func (o *EmailStage) SetSubject(v string) { // GetTemplate returns the Template field value if set, zero value otherwise. func (o *EmailStage) GetTemplate() string { - if o == nil || o.Template == nil { + if o == nil || IsNil(o.Template) { var ret string return ret } @@ -576,7 +579,7 @@ func (o *EmailStage) GetTemplate() string { // GetTemplateOk returns a tuple with the Template field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *EmailStage) GetTemplateOk() (*string, bool) { - if o == nil || o.Template == nil { + if o == nil || IsNil(o.Template) { return nil, false } return o.Template, true @@ -584,7 +587,7 @@ func (o *EmailStage) GetTemplateOk() (*string, bool) { // HasTemplate returns a boolean if a field has been set. func (o *EmailStage) HasTemplate() bool { - if o != nil && o.Template != nil { + if o != nil && !IsNil(o.Template) { return true } @@ -598,7 +601,7 @@ func (o *EmailStage) SetTemplate(v string) { // GetActivateUserOnSuccess returns the ActivateUserOnSuccess field value if set, zero value otherwise. func (o *EmailStage) GetActivateUserOnSuccess() bool { - if o == nil || o.ActivateUserOnSuccess == nil { + if o == nil || IsNil(o.ActivateUserOnSuccess) { var ret bool return ret } @@ -608,7 +611,7 @@ func (o *EmailStage) GetActivateUserOnSuccess() bool { // GetActivateUserOnSuccessOk returns a tuple with the ActivateUserOnSuccess field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *EmailStage) GetActivateUserOnSuccessOk() (*bool, bool) { - if o == nil || o.ActivateUserOnSuccess == nil { + if o == nil || IsNil(o.ActivateUserOnSuccess) { return nil, false } return o.ActivateUserOnSuccess, true @@ -616,7 +619,7 @@ func (o *EmailStage) GetActivateUserOnSuccessOk() (*bool, bool) { // HasActivateUserOnSuccess returns a boolean if a field has been set. func (o *EmailStage) HasActivateUserOnSuccess() bool { - if o != nil && o.ActivateUserOnSuccess != nil { + if o != nil && !IsNil(o.ActivateUserOnSuccess) { return true } @@ -629,65 +632,61 @@ func (o *EmailStage) SetActivateUserOnSuccess(v bool) { } func (o EmailStage) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["component"] = o.Component - } - if true { - toSerialize["verbose_name"] = o.VerboseName - } - if true { - toSerialize["verbose_name_plural"] = o.VerboseNamePlural + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if true { - toSerialize["meta_model_name"] = o.MetaModelName - } - if o.FlowSet != nil { + return json.Marshal(toSerialize) +} + +func (o EmailStage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name + // skip: component is readOnly + // skip: verbose_name is readOnly + // skip: verbose_name_plural is readOnly + // skip: meta_model_name is readOnly + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } - if o.UseGlobalSettings != nil { + if !IsNil(o.UseGlobalSettings) { toSerialize["use_global_settings"] = o.UseGlobalSettings } - if o.Host != nil { + if !IsNil(o.Host) { toSerialize["host"] = o.Host } - if o.Port != nil { + if !IsNil(o.Port) { toSerialize["port"] = o.Port } - if o.Username != nil { + if !IsNil(o.Username) { toSerialize["username"] = o.Username } - if o.UseTls != nil { + if !IsNil(o.UseTls) { toSerialize["use_tls"] = o.UseTls } - if o.UseSsl != nil { + if !IsNil(o.UseSsl) { toSerialize["use_ssl"] = o.UseSsl } - if o.Timeout != nil { + if !IsNil(o.Timeout) { toSerialize["timeout"] = o.Timeout } - if o.FromAddress != nil { + if !IsNil(o.FromAddress) { toSerialize["from_address"] = o.FromAddress } - if o.TokenExpiry != nil { + if !IsNil(o.TokenExpiry) { toSerialize["token_expiry"] = o.TokenExpiry } - if o.Subject != nil { + if !IsNil(o.Subject) { toSerialize["subject"] = o.Subject } - if o.Template != nil { + if !IsNil(o.Template) { toSerialize["template"] = o.Template } - if o.ActivateUserOnSuccess != nil { + if !IsNil(o.ActivateUserOnSuccess) { toSerialize["activate_user_on_success"] = o.ActivateUserOnSuccess } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableEmailStage struct { diff --git a/model_email_stage_request.go b/model_email_stage_request.go index bddba0f75..a2f7e025e 100644 --- a/model_email_stage_request.go +++ b/model_email_stage_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the EmailStageRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EmailStageRequest{} + // EmailStageRequest EmailStage Serializer type EmailStageRequest struct { Name string `json:"name"` @@ -81,7 +84,7 @@ func (o *EmailStageRequest) SetName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *EmailStageRequest) GetFlowSet() []FlowSetRequest { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSetRequest return ret } @@ -91,7 +94,7 @@ func (o *EmailStageRequest) GetFlowSet() []FlowSetRequest { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *EmailStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -99,7 +102,7 @@ func (o *EmailStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { // HasFlowSet returns a boolean if a field has been set. func (o *EmailStageRequest) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -113,7 +116,7 @@ func (o *EmailStageRequest) SetFlowSet(v []FlowSetRequest) { // GetUseGlobalSettings returns the UseGlobalSettings field value if set, zero value otherwise. func (o *EmailStageRequest) GetUseGlobalSettings() bool { - if o == nil || o.UseGlobalSettings == nil { + if o == nil || IsNil(o.UseGlobalSettings) { var ret bool return ret } @@ -123,7 +126,7 @@ func (o *EmailStageRequest) GetUseGlobalSettings() bool { // GetUseGlobalSettingsOk returns a tuple with the UseGlobalSettings field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *EmailStageRequest) GetUseGlobalSettingsOk() (*bool, bool) { - if o == nil || o.UseGlobalSettings == nil { + if o == nil || IsNil(o.UseGlobalSettings) { return nil, false } return o.UseGlobalSettings, true @@ -131,7 +134,7 @@ func (o *EmailStageRequest) GetUseGlobalSettingsOk() (*bool, bool) { // HasUseGlobalSettings returns a boolean if a field has been set. func (o *EmailStageRequest) HasUseGlobalSettings() bool { - if o != nil && o.UseGlobalSettings != nil { + if o != nil && !IsNil(o.UseGlobalSettings) { return true } @@ -145,7 +148,7 @@ func (o *EmailStageRequest) SetUseGlobalSettings(v bool) { // GetHost returns the Host field value if set, zero value otherwise. func (o *EmailStageRequest) GetHost() string { - if o == nil || o.Host == nil { + if o == nil || IsNil(o.Host) { var ret string return ret } @@ -155,7 +158,7 @@ func (o *EmailStageRequest) GetHost() string { // GetHostOk returns a tuple with the Host field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *EmailStageRequest) GetHostOk() (*string, bool) { - if o == nil || o.Host == nil { + if o == nil || IsNil(o.Host) { return nil, false } return o.Host, true @@ -163,7 +166,7 @@ func (o *EmailStageRequest) GetHostOk() (*string, bool) { // HasHost returns a boolean if a field has been set. func (o *EmailStageRequest) HasHost() bool { - if o != nil && o.Host != nil { + if o != nil && !IsNil(o.Host) { return true } @@ -177,7 +180,7 @@ func (o *EmailStageRequest) SetHost(v string) { // GetPort returns the Port field value if set, zero value otherwise. func (o *EmailStageRequest) GetPort() int32 { - if o == nil || o.Port == nil { + if o == nil || IsNil(o.Port) { var ret int32 return ret } @@ -187,7 +190,7 @@ func (o *EmailStageRequest) GetPort() int32 { // GetPortOk returns a tuple with the Port field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *EmailStageRequest) GetPortOk() (*int32, bool) { - if o == nil || o.Port == nil { + if o == nil || IsNil(o.Port) { return nil, false } return o.Port, true @@ -195,7 +198,7 @@ func (o *EmailStageRequest) GetPortOk() (*int32, bool) { // HasPort returns a boolean if a field has been set. func (o *EmailStageRequest) HasPort() bool { - if o != nil && o.Port != nil { + if o != nil && !IsNil(o.Port) { return true } @@ -209,7 +212,7 @@ func (o *EmailStageRequest) SetPort(v int32) { // GetUsername returns the Username field value if set, zero value otherwise. func (o *EmailStageRequest) GetUsername() string { - if o == nil || o.Username == nil { + if o == nil || IsNil(o.Username) { var ret string return ret } @@ -219,7 +222,7 @@ func (o *EmailStageRequest) GetUsername() string { // GetUsernameOk returns a tuple with the Username field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *EmailStageRequest) GetUsernameOk() (*string, bool) { - if o == nil || o.Username == nil { + if o == nil || IsNil(o.Username) { return nil, false } return o.Username, true @@ -227,7 +230,7 @@ func (o *EmailStageRequest) GetUsernameOk() (*string, bool) { // HasUsername returns a boolean if a field has been set. func (o *EmailStageRequest) HasUsername() bool { - if o != nil && o.Username != nil { + if o != nil && !IsNil(o.Username) { return true } @@ -241,7 +244,7 @@ func (o *EmailStageRequest) SetUsername(v string) { // GetPassword returns the Password field value if set, zero value otherwise. func (o *EmailStageRequest) GetPassword() string { - if o == nil || o.Password == nil { + if o == nil || IsNil(o.Password) { var ret string return ret } @@ -251,7 +254,7 @@ func (o *EmailStageRequest) GetPassword() string { // GetPasswordOk returns a tuple with the Password field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *EmailStageRequest) GetPasswordOk() (*string, bool) { - if o == nil || o.Password == nil { + if o == nil || IsNil(o.Password) { return nil, false } return o.Password, true @@ -259,7 +262,7 @@ func (o *EmailStageRequest) GetPasswordOk() (*string, bool) { // HasPassword returns a boolean if a field has been set. func (o *EmailStageRequest) HasPassword() bool { - if o != nil && o.Password != nil { + if o != nil && !IsNil(o.Password) { return true } @@ -273,7 +276,7 @@ func (o *EmailStageRequest) SetPassword(v string) { // GetUseTls returns the UseTls field value if set, zero value otherwise. func (o *EmailStageRequest) GetUseTls() bool { - if o == nil || o.UseTls == nil { + if o == nil || IsNil(o.UseTls) { var ret bool return ret } @@ -283,7 +286,7 @@ func (o *EmailStageRequest) GetUseTls() bool { // GetUseTlsOk returns a tuple with the UseTls field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *EmailStageRequest) GetUseTlsOk() (*bool, bool) { - if o == nil || o.UseTls == nil { + if o == nil || IsNil(o.UseTls) { return nil, false } return o.UseTls, true @@ -291,7 +294,7 @@ func (o *EmailStageRequest) GetUseTlsOk() (*bool, bool) { // HasUseTls returns a boolean if a field has been set. func (o *EmailStageRequest) HasUseTls() bool { - if o != nil && o.UseTls != nil { + if o != nil && !IsNil(o.UseTls) { return true } @@ -305,7 +308,7 @@ func (o *EmailStageRequest) SetUseTls(v bool) { // GetUseSsl returns the UseSsl field value if set, zero value otherwise. func (o *EmailStageRequest) GetUseSsl() bool { - if o == nil || o.UseSsl == nil { + if o == nil || IsNil(o.UseSsl) { var ret bool return ret } @@ -315,7 +318,7 @@ func (o *EmailStageRequest) GetUseSsl() bool { // GetUseSslOk returns a tuple with the UseSsl field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *EmailStageRequest) GetUseSslOk() (*bool, bool) { - if o == nil || o.UseSsl == nil { + if o == nil || IsNil(o.UseSsl) { return nil, false } return o.UseSsl, true @@ -323,7 +326,7 @@ func (o *EmailStageRequest) GetUseSslOk() (*bool, bool) { // HasUseSsl returns a boolean if a field has been set. func (o *EmailStageRequest) HasUseSsl() bool { - if o != nil && o.UseSsl != nil { + if o != nil && !IsNil(o.UseSsl) { return true } @@ -337,7 +340,7 @@ func (o *EmailStageRequest) SetUseSsl(v bool) { // GetTimeout returns the Timeout field value if set, zero value otherwise. func (o *EmailStageRequest) GetTimeout() int32 { - if o == nil || o.Timeout == nil { + if o == nil || IsNil(o.Timeout) { var ret int32 return ret } @@ -347,7 +350,7 @@ func (o *EmailStageRequest) GetTimeout() int32 { // GetTimeoutOk returns a tuple with the Timeout field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *EmailStageRequest) GetTimeoutOk() (*int32, bool) { - if o == nil || o.Timeout == nil { + if o == nil || IsNil(o.Timeout) { return nil, false } return o.Timeout, true @@ -355,7 +358,7 @@ func (o *EmailStageRequest) GetTimeoutOk() (*int32, bool) { // HasTimeout returns a boolean if a field has been set. func (o *EmailStageRequest) HasTimeout() bool { - if o != nil && o.Timeout != nil { + if o != nil && !IsNil(o.Timeout) { return true } @@ -369,7 +372,7 @@ func (o *EmailStageRequest) SetTimeout(v int32) { // GetFromAddress returns the FromAddress field value if set, zero value otherwise. func (o *EmailStageRequest) GetFromAddress() string { - if o == nil || o.FromAddress == nil { + if o == nil || IsNil(o.FromAddress) { var ret string return ret } @@ -379,7 +382,7 @@ func (o *EmailStageRequest) GetFromAddress() string { // GetFromAddressOk returns a tuple with the FromAddress field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *EmailStageRequest) GetFromAddressOk() (*string, bool) { - if o == nil || o.FromAddress == nil { + if o == nil || IsNil(o.FromAddress) { return nil, false } return o.FromAddress, true @@ -387,7 +390,7 @@ func (o *EmailStageRequest) GetFromAddressOk() (*string, bool) { // HasFromAddress returns a boolean if a field has been set. func (o *EmailStageRequest) HasFromAddress() bool { - if o != nil && o.FromAddress != nil { + if o != nil && !IsNil(o.FromAddress) { return true } @@ -401,7 +404,7 @@ func (o *EmailStageRequest) SetFromAddress(v string) { // GetTokenExpiry returns the TokenExpiry field value if set, zero value otherwise. func (o *EmailStageRequest) GetTokenExpiry() int32 { - if o == nil || o.TokenExpiry == nil { + if o == nil || IsNil(o.TokenExpiry) { var ret int32 return ret } @@ -411,7 +414,7 @@ func (o *EmailStageRequest) GetTokenExpiry() int32 { // GetTokenExpiryOk returns a tuple with the TokenExpiry field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *EmailStageRequest) GetTokenExpiryOk() (*int32, bool) { - if o == nil || o.TokenExpiry == nil { + if o == nil || IsNil(o.TokenExpiry) { return nil, false } return o.TokenExpiry, true @@ -419,7 +422,7 @@ func (o *EmailStageRequest) GetTokenExpiryOk() (*int32, bool) { // HasTokenExpiry returns a boolean if a field has been set. func (o *EmailStageRequest) HasTokenExpiry() bool { - if o != nil && o.TokenExpiry != nil { + if o != nil && !IsNil(o.TokenExpiry) { return true } @@ -433,7 +436,7 @@ func (o *EmailStageRequest) SetTokenExpiry(v int32) { // GetSubject returns the Subject field value if set, zero value otherwise. func (o *EmailStageRequest) GetSubject() string { - if o == nil || o.Subject == nil { + if o == nil || IsNil(o.Subject) { var ret string return ret } @@ -443,7 +446,7 @@ func (o *EmailStageRequest) GetSubject() string { // GetSubjectOk returns a tuple with the Subject field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *EmailStageRequest) GetSubjectOk() (*string, bool) { - if o == nil || o.Subject == nil { + if o == nil || IsNil(o.Subject) { return nil, false } return o.Subject, true @@ -451,7 +454,7 @@ func (o *EmailStageRequest) GetSubjectOk() (*string, bool) { // HasSubject returns a boolean if a field has been set. func (o *EmailStageRequest) HasSubject() bool { - if o != nil && o.Subject != nil { + if o != nil && !IsNil(o.Subject) { return true } @@ -465,7 +468,7 @@ func (o *EmailStageRequest) SetSubject(v string) { // GetTemplate returns the Template field value if set, zero value otherwise. func (o *EmailStageRequest) GetTemplate() string { - if o == nil || o.Template == nil { + if o == nil || IsNil(o.Template) { var ret string return ret } @@ -475,7 +478,7 @@ func (o *EmailStageRequest) GetTemplate() string { // GetTemplateOk returns a tuple with the Template field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *EmailStageRequest) GetTemplateOk() (*string, bool) { - if o == nil || o.Template == nil { + if o == nil || IsNil(o.Template) { return nil, false } return o.Template, true @@ -483,7 +486,7 @@ func (o *EmailStageRequest) GetTemplateOk() (*string, bool) { // HasTemplate returns a boolean if a field has been set. func (o *EmailStageRequest) HasTemplate() bool { - if o != nil && o.Template != nil { + if o != nil && !IsNil(o.Template) { return true } @@ -497,7 +500,7 @@ func (o *EmailStageRequest) SetTemplate(v string) { // GetActivateUserOnSuccess returns the ActivateUserOnSuccess field value if set, zero value otherwise. func (o *EmailStageRequest) GetActivateUserOnSuccess() bool { - if o == nil || o.ActivateUserOnSuccess == nil { + if o == nil || IsNil(o.ActivateUserOnSuccess) { var ret bool return ret } @@ -507,7 +510,7 @@ func (o *EmailStageRequest) GetActivateUserOnSuccess() bool { // GetActivateUserOnSuccessOk returns a tuple with the ActivateUserOnSuccess field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *EmailStageRequest) GetActivateUserOnSuccessOk() (*bool, bool) { - if o == nil || o.ActivateUserOnSuccess == nil { + if o == nil || IsNil(o.ActivateUserOnSuccess) { return nil, false } return o.ActivateUserOnSuccess, true @@ -515,7 +518,7 @@ func (o *EmailStageRequest) GetActivateUserOnSuccessOk() (*bool, bool) { // HasActivateUserOnSuccess returns a boolean if a field has been set. func (o *EmailStageRequest) HasActivateUserOnSuccess() bool { - if o != nil && o.ActivateUserOnSuccess != nil { + if o != nil && !IsNil(o.ActivateUserOnSuccess) { return true } @@ -528,53 +531,59 @@ func (o *EmailStageRequest) SetActivateUserOnSuccess(v bool) { } func (o EmailStageRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.FlowSet != nil { + return json.Marshal(toSerialize) +} + +func (o EmailStageRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } - if o.UseGlobalSettings != nil { + if !IsNil(o.UseGlobalSettings) { toSerialize["use_global_settings"] = o.UseGlobalSettings } - if o.Host != nil { + if !IsNil(o.Host) { toSerialize["host"] = o.Host } - if o.Port != nil { + if !IsNil(o.Port) { toSerialize["port"] = o.Port } - if o.Username != nil { + if !IsNil(o.Username) { toSerialize["username"] = o.Username } - if o.Password != nil { + if !IsNil(o.Password) { toSerialize["password"] = o.Password } - if o.UseTls != nil { + if !IsNil(o.UseTls) { toSerialize["use_tls"] = o.UseTls } - if o.UseSsl != nil { + if !IsNil(o.UseSsl) { toSerialize["use_ssl"] = o.UseSsl } - if o.Timeout != nil { + if !IsNil(o.Timeout) { toSerialize["timeout"] = o.Timeout } - if o.FromAddress != nil { + if !IsNil(o.FromAddress) { toSerialize["from_address"] = o.FromAddress } - if o.TokenExpiry != nil { + if !IsNil(o.TokenExpiry) { toSerialize["token_expiry"] = o.TokenExpiry } - if o.Subject != nil { + if !IsNil(o.Subject) { toSerialize["subject"] = o.Subject } - if o.Template != nil { + if !IsNil(o.Template) { toSerialize["template"] = o.Template } - if o.ActivateUserOnSuccess != nil { + if !IsNil(o.ActivateUserOnSuccess) { toSerialize["activate_user_on_success"] = o.ActivateUserOnSuccess } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableEmailStageRequest struct { diff --git a/model_error_detail.go b/model_error_detail.go index e88546fd0..d2f832713 100644 --- a/model_error_detail.go +++ b/model_error_detail.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ErrorDetail type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ErrorDetail{} + // ErrorDetail Serializer for rest_framework's error messages type ErrorDetail struct { String string `json:"string"` @@ -89,16 +92,20 @@ func (o *ErrorDetail) SetCode(v string) { } func (o ErrorDetail) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["string"] = o.String - } - if true { - toSerialize["code"] = o.Code + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o ErrorDetail) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["string"] = o.String + toSerialize["code"] = o.Code + return toSerialize, nil +} + type NullableErrorDetail struct { value *ErrorDetail isSet bool diff --git a/model_error_reporting_config.go b/model_error_reporting_config.go index e3caa1857..3116e0df9 100644 --- a/model_error_reporting_config.go +++ b/model_error_reporting_config.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ErrorReportingConfig type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ErrorReportingConfig{} + // ErrorReportingConfig Config for error reporting type ErrorReportingConfig struct { Enabled bool `json:"enabled"` @@ -167,25 +170,23 @@ func (o *ErrorReportingConfig) SetTracesSampleRate(v float64) { } func (o ErrorReportingConfig) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["enabled"] = o.Enabled - } - if true { - toSerialize["sentry_dsn"] = o.SentryDsn - } - if true { - toSerialize["environment"] = o.Environment - } - if true { - toSerialize["send_pii"] = o.SendPii - } - if true { - toSerialize["traces_sample_rate"] = o.TracesSampleRate + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o ErrorReportingConfig) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: enabled is readOnly + // skip: sentry_dsn is readOnly + // skip: environment is readOnly + // skip: send_pii is readOnly + // skip: traces_sample_rate is readOnly + return toSerialize, nil +} + type NullableErrorReportingConfig struct { value *ErrorReportingConfig isSet bool diff --git a/model_event.go b/model_event.go index 7bcca2a1c..144bba5fa 100644 --- a/model_event.go +++ b/model_event.go @@ -16,6 +16,9 @@ import ( "time" ) +// checks if the Event type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Event{} + // Event Event Serializer type Event struct { Pk string `json:"pk"` @@ -76,7 +79,7 @@ func (o *Event) SetPk(v string) { // GetUser returns the User field value if set, zero value otherwise. func (o *Event) GetUser() map[string]interface{} { - if o == nil || o.User == nil { + if o == nil || IsNil(o.User) { var ret map[string]interface{} return ret } @@ -86,15 +89,15 @@ func (o *Event) GetUser() map[string]interface{} { // GetUserOk returns a tuple with the User field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Event) GetUserOk() (map[string]interface{}, bool) { - if o == nil || o.User == nil { - return nil, false + if o == nil || IsNil(o.User) { + return map[string]interface{}{}, false } return o.User, true } // HasUser returns a boolean if a field has been set. func (o *Event) HasUser() bool { - if o != nil && o.User != nil { + if o != nil && !IsNil(o.User) { return true } @@ -156,7 +159,7 @@ func (o *Event) SetApp(v string) { // GetContext returns the Context field value if set, zero value otherwise. func (o *Event) GetContext() map[string]interface{} { - if o == nil || o.Context == nil { + if o == nil || IsNil(o.Context) { var ret map[string]interface{} return ret } @@ -166,15 +169,15 @@ func (o *Event) GetContext() map[string]interface{} { // GetContextOk returns a tuple with the Context field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Event) GetContextOk() (map[string]interface{}, bool) { - if o == nil || o.Context == nil { - return nil, false + if o == nil || IsNil(o.Context) { + return map[string]interface{}{}, false } return o.Context, true } // HasContext returns a boolean if a field has been set. func (o *Event) HasContext() bool { - if o != nil && o.Context != nil { + if o != nil && !IsNil(o.Context) { return true } @@ -188,7 +191,7 @@ func (o *Event) SetContext(v map[string]interface{}) { // GetClientIp returns the ClientIp field value if set, zero value otherwise (both if not set or set to explicit null). func (o *Event) GetClientIp() string { - if o == nil || o.ClientIp.Get() == nil { + if o == nil || IsNil(o.ClientIp.Get()) { var ret string return ret } @@ -255,7 +258,7 @@ func (o *Event) SetCreated(v time.Time) { // GetExpires returns the Expires field value if set, zero value otherwise. func (o *Event) GetExpires() time.Time { - if o == nil || o.Expires == nil { + if o == nil || IsNil(o.Expires) { var ret time.Time return ret } @@ -265,7 +268,7 @@ func (o *Event) GetExpires() time.Time { // GetExpiresOk returns a tuple with the Expires field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Event) GetExpiresOk() (*time.Time, bool) { - if o == nil || o.Expires == nil { + if o == nil || IsNil(o.Expires) { return nil, false } return o.Expires, true @@ -273,7 +276,7 @@ func (o *Event) GetExpiresOk() (*time.Time, bool) { // HasExpires returns a boolean if a field has been set. func (o *Event) HasExpires() bool { - if o != nil && o.Expires != nil { + if o != nil && !IsNil(o.Expires) { return true } @@ -287,7 +290,7 @@ func (o *Event) SetExpires(v time.Time) { // GetTenant returns the Tenant field value if set, zero value otherwise. func (o *Event) GetTenant() map[string]interface{} { - if o == nil || o.Tenant == nil { + if o == nil || IsNil(o.Tenant) { var ret map[string]interface{} return ret } @@ -297,15 +300,15 @@ func (o *Event) GetTenant() map[string]interface{} { // GetTenantOk returns a tuple with the Tenant field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Event) GetTenantOk() (map[string]interface{}, bool) { - if o == nil || o.Tenant == nil { - return nil, false + if o == nil || IsNil(o.Tenant) { + return map[string]interface{}{}, false } return o.Tenant, true } // HasTenant returns a boolean if a field has been set. func (o *Event) HasTenant() bool { - if o != nil && o.Tenant != nil { + if o != nil && !IsNil(o.Tenant) { return true } @@ -318,35 +321,35 @@ func (o *Event) SetTenant(v map[string]interface{}) { } func (o Event) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.User != nil { + return json.Marshal(toSerialize) +} + +func (o Event) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + if !IsNil(o.User) { toSerialize["user"] = o.User } - if true { - toSerialize["action"] = o.Action - } - if true { - toSerialize["app"] = o.App - } - if o.Context != nil { + toSerialize["action"] = o.Action + toSerialize["app"] = o.App + if !IsNil(o.Context) { toSerialize["context"] = o.Context } if o.ClientIp.IsSet() { toSerialize["client_ip"] = o.ClientIp.Get() } - if true { - toSerialize["created"] = o.Created - } - if o.Expires != nil { + // skip: created is readOnly + if !IsNil(o.Expires) { toSerialize["expires"] = o.Expires } - if o.Tenant != nil { + if !IsNil(o.Tenant) { toSerialize["tenant"] = o.Tenant } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableEvent struct { diff --git a/model_event_matcher_policy.go b/model_event_matcher_policy.go index fcbce4238..6491cf98e 100644 --- a/model_event_matcher_policy.go +++ b/model_event_matcher_policy.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the EventMatcherPolicy type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EventMatcherPolicy{} + // EventMatcherPolicy Event Matcher Policy Serializer type EventMatcherPolicy struct { Pk string `json:"pk"` @@ -30,13 +33,11 @@ type EventMatcherPolicy struct { // Return internal model name MetaModelName string `json:"meta_model_name"` // Return objects policy is bound to - BoundTo int32 `json:"bound_to"` - // Match created events with this action type. When left empty, all action types will be matched. * `login` - Login * `login_failed` - Login Failed * `logout` - Logout * `user_write` - User Write * `suspicious_request` - Suspicious Request * `password_set` - Password Set * `secret_view` - Secret View * `secret_rotate` - Secret Rotate * `invitation_used` - Invite Used * `authorize_application` - Authorize Application * `source_linked` - Source Linked * `impersonation_started` - Impersonation Started * `impersonation_ended` - Impersonation Ended * `flow_execution` - Flow Execution * `policy_execution` - Policy Execution * `policy_exception` - Policy Exception * `property_mapping_exception` - Property Mapping Exception * `system_task_execution` - System Task Execution * `system_task_exception` - System Task Exception * `system_exception` - System Exception * `configuration_error` - Configuration Error * `model_created` - Model Created * `model_updated` - Model Updated * `model_deleted` - Model Deleted * `email_sent` - Email Sent * `update_available` - Update Available * `custom_` - Custom Prefix - Action NullableEventActions `json:"action,omitempty"` + BoundTo int32 `json:"bound_to"` + Action *EventActions `json:"action,omitempty"` // Matches Event's Client IP (strict matching, for network matching use an Expression Policy) - ClientIp *string `json:"client_ip,omitempty"` - // Match events created by selected application. When left empty, all applications are matched. * `authentik.admin` - authentik Admin * `authentik.api` - authentik API * `authentik.crypto` - authentik Crypto * `authentik.events` - authentik Events * `authentik.flows` - authentik Flows * `authentik.lib` - authentik lib * `authentik.outposts` - authentik Outpost * `authentik.policies.dummy` - authentik Policies.Dummy * `authentik.policies.event_matcher` - authentik Policies.Event Matcher * `authentik.policies.expiry` - authentik Policies.Expiry * `authentik.policies.expression` - authentik Policies.Expression * `authentik.policies.password` - authentik Policies.Password * `authentik.policies.reputation` - authentik Policies.Reputation * `authentik.policies` - authentik Policies * `authentik.providers.ldap` - authentik Providers.LDAP * `authentik.providers.oauth2` - authentik Providers.OAuth2 * `authentik.providers.proxy` - authentik Providers.Proxy * `authentik.providers.radius` - authentik Providers.Radius * `authentik.providers.saml` - authentik Providers.SAML * `authentik.providers.scim` - authentik Providers.SCIM * `authentik.recovery` - authentik Recovery * `authentik.sources.ldap` - authentik Sources.LDAP * `authentik.sources.oauth` - authentik Sources.OAuth * `authentik.sources.plex` - authentik Sources.Plex * `authentik.sources.saml` - authentik Sources.SAML * `authentik.stages.authenticator_duo` - authentik Stages.Authenticator.Duo * `authentik.stages.authenticator_sms` - authentik Stages.Authenticator.SMS * `authentik.stages.authenticator_static` - authentik Stages.Authenticator.Static * `authentik.stages.authenticator_totp` - authentik Stages.Authenticator.TOTP * `authentik.stages.authenticator_validate` - authentik Stages.Authenticator.Validate * `authentik.stages.authenticator_webauthn` - authentik Stages.Authenticator.WebAuthn * `authentik.stages.captcha` - authentik Stages.Captcha * `authentik.stages.consent` - authentik Stages.Consent * `authentik.stages.deny` - authentik Stages.Deny * `authentik.stages.dummy` - authentik Stages.Dummy * `authentik.stages.email` - authentik Stages.Email * `authentik.stages.identification` - authentik Stages.Identification * `authentik.stages.invitation` - authentik Stages.User Invitation * `authentik.stages.password` - authentik Stages.Password * `authentik.stages.prompt` - authentik Stages.Prompt * `authentik.stages.user_delete` - authentik Stages.User Delete * `authentik.stages.user_login` - authentik Stages.User Login * `authentik.stages.user_logout` - authentik Stages.User Logout * `authentik.stages.user_write` - authentik Stages.User Write * `authentik.tenants` - authentik Tenants * `authentik.blueprints` - authentik Blueprints * `authentik.core` - authentik Core - App NullableAppEnum `json:"app,omitempty"` + ClientIp *string `json:"client_ip,omitempty"` + App *AppEnum `json:"app,omitempty"` } // NewEventMatcherPolicy instantiates a new EventMatcherPolicy object @@ -113,7 +114,7 @@ func (o *EventMatcherPolicy) SetName(v string) { // GetExecutionLogging returns the ExecutionLogging field value if set, zero value otherwise. func (o *EventMatcherPolicy) GetExecutionLogging() bool { - if o == nil || o.ExecutionLogging == nil { + if o == nil || IsNil(o.ExecutionLogging) { var ret bool return ret } @@ -123,7 +124,7 @@ func (o *EventMatcherPolicy) GetExecutionLogging() bool { // GetExecutionLoggingOk returns a tuple with the ExecutionLogging field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *EventMatcherPolicy) GetExecutionLoggingOk() (*bool, bool) { - if o == nil || o.ExecutionLogging == nil { + if o == nil || IsNil(o.ExecutionLogging) { return nil, false } return o.ExecutionLogging, true @@ -131,7 +132,7 @@ func (o *EventMatcherPolicy) GetExecutionLoggingOk() (*bool, bool) { // HasExecutionLogging returns a boolean if a field has been set. func (o *EventMatcherPolicy) HasExecutionLogging() bool { - if o != nil && o.ExecutionLogging != nil { + if o != nil && !IsNil(o.ExecutionLogging) { return true } @@ -263,52 +264,41 @@ func (o *EventMatcherPolicy) SetBoundTo(v int32) { o.BoundTo = v } -// GetAction returns the Action field value if set, zero value otherwise (both if not set or set to explicit null). +// GetAction returns the Action field value if set, zero value otherwise. func (o *EventMatcherPolicy) GetAction() EventActions { - if o == nil || o.Action.Get() == nil { + if o == nil || IsNil(o.Action) { var ret EventActions return ret } - return *o.Action.Get() + return *o.Action } // GetActionOk returns a tuple with the Action field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *EventMatcherPolicy) GetActionOk() (*EventActions, bool) { - if o == nil { + if o == nil || IsNil(o.Action) { return nil, false } - return o.Action.Get(), o.Action.IsSet() + return o.Action, true } // HasAction returns a boolean if a field has been set. func (o *EventMatcherPolicy) HasAction() bool { - if o != nil && o.Action.IsSet() { + if o != nil && !IsNil(o.Action) { return true } return false } -// SetAction gets a reference to the given NullableEventActions and assigns it to the Action field. +// SetAction gets a reference to the given EventActions and assigns it to the Action field. func (o *EventMatcherPolicy) SetAction(v EventActions) { - o.Action.Set(&v) -} - -// SetActionNil sets the value for Action to be an explicit nil -func (o *EventMatcherPolicy) SetActionNil() { - o.Action.Set(nil) -} - -// UnsetAction ensures that no value is present for Action, not even an explicit nil -func (o *EventMatcherPolicy) UnsetAction() { - o.Action.Unset() + o.Action = &v } // GetClientIp returns the ClientIp field value if set, zero value otherwise. func (o *EventMatcherPolicy) GetClientIp() string { - if o == nil || o.ClientIp == nil { + if o == nil || IsNil(o.ClientIp) { var ret string return ret } @@ -318,7 +308,7 @@ func (o *EventMatcherPolicy) GetClientIp() string { // GetClientIpOk returns a tuple with the ClientIp field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *EventMatcherPolicy) GetClientIpOk() (*string, bool) { - if o == nil || o.ClientIp == nil { + if o == nil || IsNil(o.ClientIp) { return nil, false } return o.ClientIp, true @@ -326,7 +316,7 @@ func (o *EventMatcherPolicy) GetClientIpOk() (*string, bool) { // HasClientIp returns a boolean if a field has been set. func (o *EventMatcherPolicy) HasClientIp() bool { - if o != nil && o.ClientIp != nil { + if o != nil && !IsNil(o.ClientIp) { return true } @@ -338,85 +328,68 @@ func (o *EventMatcherPolicy) SetClientIp(v string) { o.ClientIp = &v } -// GetApp returns the App field value if set, zero value otherwise (both if not set or set to explicit null). +// GetApp returns the App field value if set, zero value otherwise. func (o *EventMatcherPolicy) GetApp() AppEnum { - if o == nil || o.App.Get() == nil { + if o == nil || IsNil(o.App) { var ret AppEnum return ret } - return *o.App.Get() + return *o.App } // GetAppOk returns a tuple with the App field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *EventMatcherPolicy) GetAppOk() (*AppEnum, bool) { - if o == nil { + if o == nil || IsNil(o.App) { return nil, false } - return o.App.Get(), o.App.IsSet() + return o.App, true } // HasApp returns a boolean if a field has been set. func (o *EventMatcherPolicy) HasApp() bool { - if o != nil && o.App.IsSet() { + if o != nil && !IsNil(o.App) { return true } return false } -// SetApp gets a reference to the given NullableAppEnum and assigns it to the App field. +// SetApp gets a reference to the given AppEnum and assigns it to the App field. func (o *EventMatcherPolicy) SetApp(v AppEnum) { - o.App.Set(&v) -} - -// SetAppNil sets the value for App to be an explicit nil -func (o *EventMatcherPolicy) SetAppNil() { - o.App.Set(nil) + o.App = &v } -// UnsetApp ensures that no value is present for App, not even an explicit nil -func (o *EventMatcherPolicy) UnsetApp() { - o.App.Unset() +func (o EventMatcherPolicy) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) } -func (o EventMatcherPolicy) MarshalJSON() ([]byte, error) { +func (o EventMatcherPolicy) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["name"] = o.Name - } - if o.ExecutionLogging != nil { + // skip: pk is readOnly + toSerialize["name"] = o.Name + if !IsNil(o.ExecutionLogging) { toSerialize["execution_logging"] = o.ExecutionLogging } - if true { - toSerialize["component"] = o.Component - } - if true { - toSerialize["verbose_name"] = o.VerboseName + // skip: component is readOnly + // skip: verbose_name is readOnly + // skip: verbose_name_plural is readOnly + // skip: meta_model_name is readOnly + // skip: bound_to is readOnly + if !IsNil(o.Action) { + toSerialize["action"] = o.Action } - if true { - toSerialize["verbose_name_plural"] = o.VerboseNamePlural - } - if true { - toSerialize["meta_model_name"] = o.MetaModelName - } - if true { - toSerialize["bound_to"] = o.BoundTo - } - if o.Action.IsSet() { - toSerialize["action"] = o.Action.Get() - } - if o.ClientIp != nil { + if !IsNil(o.ClientIp) { toSerialize["client_ip"] = o.ClientIp } - if o.App.IsSet() { - toSerialize["app"] = o.App.Get() + if !IsNil(o.App) { + toSerialize["app"] = o.App } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableEventMatcherPolicy struct { diff --git a/model_event_matcher_policy_request.go b/model_event_matcher_policy_request.go index 5b7d1ccdc..dd9aace26 100644 --- a/model_event_matcher_policy_request.go +++ b/model_event_matcher_policy_request.go @@ -15,17 +15,18 @@ import ( "encoding/json" ) +// checks if the EventMatcherPolicyRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EventMatcherPolicyRequest{} + // EventMatcherPolicyRequest Event Matcher Policy Serializer type EventMatcherPolicyRequest struct { Name string `json:"name"` // When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. - ExecutionLogging *bool `json:"execution_logging,omitempty"` - // Match created events with this action type. When left empty, all action types will be matched. * `login` - Login * `login_failed` - Login Failed * `logout` - Logout * `user_write` - User Write * `suspicious_request` - Suspicious Request * `password_set` - Password Set * `secret_view` - Secret View * `secret_rotate` - Secret Rotate * `invitation_used` - Invite Used * `authorize_application` - Authorize Application * `source_linked` - Source Linked * `impersonation_started` - Impersonation Started * `impersonation_ended` - Impersonation Ended * `flow_execution` - Flow Execution * `policy_execution` - Policy Execution * `policy_exception` - Policy Exception * `property_mapping_exception` - Property Mapping Exception * `system_task_execution` - System Task Execution * `system_task_exception` - System Task Exception * `system_exception` - System Exception * `configuration_error` - Configuration Error * `model_created` - Model Created * `model_updated` - Model Updated * `model_deleted` - Model Deleted * `email_sent` - Email Sent * `update_available` - Update Available * `custom_` - Custom Prefix - Action NullableEventActions `json:"action,omitempty"` + ExecutionLogging *bool `json:"execution_logging,omitempty"` + Action *EventActions `json:"action,omitempty"` // Matches Event's Client IP (strict matching, for network matching use an Expression Policy) - ClientIp *string `json:"client_ip,omitempty"` - // Match events created by selected application. When left empty, all applications are matched. * `authentik.admin` - authentik Admin * `authentik.api` - authentik API * `authentik.crypto` - authentik Crypto * `authentik.events` - authentik Events * `authentik.flows` - authentik Flows * `authentik.lib` - authentik lib * `authentik.outposts` - authentik Outpost * `authentik.policies.dummy` - authentik Policies.Dummy * `authentik.policies.event_matcher` - authentik Policies.Event Matcher * `authentik.policies.expiry` - authentik Policies.Expiry * `authentik.policies.expression` - authentik Policies.Expression * `authentik.policies.password` - authentik Policies.Password * `authentik.policies.reputation` - authentik Policies.Reputation * `authentik.policies` - authentik Policies * `authentik.providers.ldap` - authentik Providers.LDAP * `authentik.providers.oauth2` - authentik Providers.OAuth2 * `authentik.providers.proxy` - authentik Providers.Proxy * `authentik.providers.radius` - authentik Providers.Radius * `authentik.providers.saml` - authentik Providers.SAML * `authentik.providers.scim` - authentik Providers.SCIM * `authentik.recovery` - authentik Recovery * `authentik.sources.ldap` - authentik Sources.LDAP * `authentik.sources.oauth` - authentik Sources.OAuth * `authentik.sources.plex` - authentik Sources.Plex * `authentik.sources.saml` - authentik Sources.SAML * `authentik.stages.authenticator_duo` - authentik Stages.Authenticator.Duo * `authentik.stages.authenticator_sms` - authentik Stages.Authenticator.SMS * `authentik.stages.authenticator_static` - authentik Stages.Authenticator.Static * `authentik.stages.authenticator_totp` - authentik Stages.Authenticator.TOTP * `authentik.stages.authenticator_validate` - authentik Stages.Authenticator.Validate * `authentik.stages.authenticator_webauthn` - authentik Stages.Authenticator.WebAuthn * `authentik.stages.captcha` - authentik Stages.Captcha * `authentik.stages.consent` - authentik Stages.Consent * `authentik.stages.deny` - authentik Stages.Deny * `authentik.stages.dummy` - authentik Stages.Dummy * `authentik.stages.email` - authentik Stages.Email * `authentik.stages.identification` - authentik Stages.Identification * `authentik.stages.invitation` - authentik Stages.User Invitation * `authentik.stages.password` - authentik Stages.Password * `authentik.stages.prompt` - authentik Stages.Prompt * `authentik.stages.user_delete` - authentik Stages.User Delete * `authentik.stages.user_login` - authentik Stages.User Login * `authentik.stages.user_logout` - authentik Stages.User Logout * `authentik.stages.user_write` - authentik Stages.User Write * `authentik.tenants` - authentik Tenants * `authentik.blueprints` - authentik Blueprints * `authentik.core` - authentik Core - App NullableAppEnum `json:"app,omitempty"` + ClientIp *string `json:"client_ip,omitempty"` + App *AppEnum `json:"app,omitempty"` } // NewEventMatcherPolicyRequest instantiates a new EventMatcherPolicyRequest object @@ -72,7 +73,7 @@ func (o *EventMatcherPolicyRequest) SetName(v string) { // GetExecutionLogging returns the ExecutionLogging field value if set, zero value otherwise. func (o *EventMatcherPolicyRequest) GetExecutionLogging() bool { - if o == nil || o.ExecutionLogging == nil { + if o == nil || IsNil(o.ExecutionLogging) { var ret bool return ret } @@ -82,7 +83,7 @@ func (o *EventMatcherPolicyRequest) GetExecutionLogging() bool { // GetExecutionLoggingOk returns a tuple with the ExecutionLogging field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *EventMatcherPolicyRequest) GetExecutionLoggingOk() (*bool, bool) { - if o == nil || o.ExecutionLogging == nil { + if o == nil || IsNil(o.ExecutionLogging) { return nil, false } return o.ExecutionLogging, true @@ -90,7 +91,7 @@ func (o *EventMatcherPolicyRequest) GetExecutionLoggingOk() (*bool, bool) { // HasExecutionLogging returns a boolean if a field has been set. func (o *EventMatcherPolicyRequest) HasExecutionLogging() bool { - if o != nil && o.ExecutionLogging != nil { + if o != nil && !IsNil(o.ExecutionLogging) { return true } @@ -102,52 +103,41 @@ func (o *EventMatcherPolicyRequest) SetExecutionLogging(v bool) { o.ExecutionLogging = &v } -// GetAction returns the Action field value if set, zero value otherwise (both if not set or set to explicit null). +// GetAction returns the Action field value if set, zero value otherwise. func (o *EventMatcherPolicyRequest) GetAction() EventActions { - if o == nil || o.Action.Get() == nil { + if o == nil || IsNil(o.Action) { var ret EventActions return ret } - return *o.Action.Get() + return *o.Action } // GetActionOk returns a tuple with the Action field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *EventMatcherPolicyRequest) GetActionOk() (*EventActions, bool) { - if o == nil { + if o == nil || IsNil(o.Action) { return nil, false } - return o.Action.Get(), o.Action.IsSet() + return o.Action, true } // HasAction returns a boolean if a field has been set. func (o *EventMatcherPolicyRequest) HasAction() bool { - if o != nil && o.Action.IsSet() { + if o != nil && !IsNil(o.Action) { return true } return false } -// SetAction gets a reference to the given NullableEventActions and assigns it to the Action field. +// SetAction gets a reference to the given EventActions and assigns it to the Action field. func (o *EventMatcherPolicyRequest) SetAction(v EventActions) { - o.Action.Set(&v) -} - -// SetActionNil sets the value for Action to be an explicit nil -func (o *EventMatcherPolicyRequest) SetActionNil() { - o.Action.Set(nil) -} - -// UnsetAction ensures that no value is present for Action, not even an explicit nil -func (o *EventMatcherPolicyRequest) UnsetAction() { - o.Action.Unset() + o.Action = &v } // GetClientIp returns the ClientIp field value if set, zero value otherwise. func (o *EventMatcherPolicyRequest) GetClientIp() string { - if o == nil || o.ClientIp == nil { + if o == nil || IsNil(o.ClientIp) { var ret string return ret } @@ -157,7 +147,7 @@ func (o *EventMatcherPolicyRequest) GetClientIp() string { // GetClientIpOk returns a tuple with the ClientIp field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *EventMatcherPolicyRequest) GetClientIpOk() (*string, bool) { - if o == nil || o.ClientIp == nil { + if o == nil || IsNil(o.ClientIp) { return nil, false } return o.ClientIp, true @@ -165,7 +155,7 @@ func (o *EventMatcherPolicyRequest) GetClientIpOk() (*string, bool) { // HasClientIp returns a boolean if a field has been set. func (o *EventMatcherPolicyRequest) HasClientIp() bool { - if o != nil && o.ClientIp != nil { + if o != nil && !IsNil(o.ClientIp) { return true } @@ -177,67 +167,62 @@ func (o *EventMatcherPolicyRequest) SetClientIp(v string) { o.ClientIp = &v } -// GetApp returns the App field value if set, zero value otherwise (both if not set or set to explicit null). +// GetApp returns the App field value if set, zero value otherwise. func (o *EventMatcherPolicyRequest) GetApp() AppEnum { - if o == nil || o.App.Get() == nil { + if o == nil || IsNil(o.App) { var ret AppEnum return ret } - return *o.App.Get() + return *o.App } // GetAppOk returns a tuple with the App field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *EventMatcherPolicyRequest) GetAppOk() (*AppEnum, bool) { - if o == nil { + if o == nil || IsNil(o.App) { return nil, false } - return o.App.Get(), o.App.IsSet() + return o.App, true } // HasApp returns a boolean if a field has been set. func (o *EventMatcherPolicyRequest) HasApp() bool { - if o != nil && o.App.IsSet() { + if o != nil && !IsNil(o.App) { return true } return false } -// SetApp gets a reference to the given NullableAppEnum and assigns it to the App field. +// SetApp gets a reference to the given AppEnum and assigns it to the App field. func (o *EventMatcherPolicyRequest) SetApp(v AppEnum) { - o.App.Set(&v) + o.App = &v } -// SetAppNil sets the value for App to be an explicit nil -func (o *EventMatcherPolicyRequest) SetAppNil() { - o.App.Set(nil) -} - -// UnsetApp ensures that no value is present for App, not even an explicit nil -func (o *EventMatcherPolicyRequest) UnsetApp() { - o.App.Unset() +func (o EventMatcherPolicyRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) } -func (o EventMatcherPolicyRequest) MarshalJSON() ([]byte, error) { +func (o EventMatcherPolicyRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name - } - if o.ExecutionLogging != nil { + toSerialize["name"] = o.Name + if !IsNil(o.ExecutionLogging) { toSerialize["execution_logging"] = o.ExecutionLogging } - if o.Action.IsSet() { - toSerialize["action"] = o.Action.Get() + if !IsNil(o.Action) { + toSerialize["action"] = o.Action } - if o.ClientIp != nil { + if !IsNil(o.ClientIp) { toSerialize["client_ip"] = o.ClientIp } - if o.App.IsSet() { - toSerialize["app"] = o.App.Get() + if !IsNil(o.App) { + toSerialize["app"] = o.App } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableEventMatcherPolicyRequest struct { diff --git a/model_event_request.go b/model_event_request.go index 6e7a21f3d..cc04b09b4 100644 --- a/model_event_request.go +++ b/model_event_request.go @@ -16,6 +16,9 @@ import ( "time" ) +// checks if the EventRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EventRequest{} + // EventRequest Event Serializer type EventRequest struct { User map[string]interface{} `json:"user,omitempty"` @@ -48,7 +51,7 @@ func NewEventRequestWithDefaults() *EventRequest { // GetUser returns the User field value if set, zero value otherwise. func (o *EventRequest) GetUser() map[string]interface{} { - if o == nil || o.User == nil { + if o == nil || IsNil(o.User) { var ret map[string]interface{} return ret } @@ -58,15 +61,15 @@ func (o *EventRequest) GetUser() map[string]interface{} { // GetUserOk returns a tuple with the User field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *EventRequest) GetUserOk() (map[string]interface{}, bool) { - if o == nil || o.User == nil { - return nil, false + if o == nil || IsNil(o.User) { + return map[string]interface{}{}, false } return o.User, true } // HasUser returns a boolean if a field has been set. func (o *EventRequest) HasUser() bool { - if o != nil && o.User != nil { + if o != nil && !IsNil(o.User) { return true } @@ -128,7 +131,7 @@ func (o *EventRequest) SetApp(v string) { // GetContext returns the Context field value if set, zero value otherwise. func (o *EventRequest) GetContext() map[string]interface{} { - if o == nil || o.Context == nil { + if o == nil || IsNil(o.Context) { var ret map[string]interface{} return ret } @@ -138,15 +141,15 @@ func (o *EventRequest) GetContext() map[string]interface{} { // GetContextOk returns a tuple with the Context field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *EventRequest) GetContextOk() (map[string]interface{}, bool) { - if o == nil || o.Context == nil { - return nil, false + if o == nil || IsNil(o.Context) { + return map[string]interface{}{}, false } return o.Context, true } // HasContext returns a boolean if a field has been set. func (o *EventRequest) HasContext() bool { - if o != nil && o.Context != nil { + if o != nil && !IsNil(o.Context) { return true } @@ -160,7 +163,7 @@ func (o *EventRequest) SetContext(v map[string]interface{}) { // GetClientIp returns the ClientIp field value if set, zero value otherwise (both if not set or set to explicit null). func (o *EventRequest) GetClientIp() string { - if o == nil || o.ClientIp.Get() == nil { + if o == nil || IsNil(o.ClientIp.Get()) { var ret string return ret } @@ -203,7 +206,7 @@ func (o *EventRequest) UnsetClientIp() { // GetExpires returns the Expires field value if set, zero value otherwise. func (o *EventRequest) GetExpires() time.Time { - if o == nil || o.Expires == nil { + if o == nil || IsNil(o.Expires) { var ret time.Time return ret } @@ -213,7 +216,7 @@ func (o *EventRequest) GetExpires() time.Time { // GetExpiresOk returns a tuple with the Expires field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *EventRequest) GetExpiresOk() (*time.Time, bool) { - if o == nil || o.Expires == nil { + if o == nil || IsNil(o.Expires) { return nil, false } return o.Expires, true @@ -221,7 +224,7 @@ func (o *EventRequest) GetExpiresOk() (*time.Time, bool) { // HasExpires returns a boolean if a field has been set. func (o *EventRequest) HasExpires() bool { - if o != nil && o.Expires != nil { + if o != nil && !IsNil(o.Expires) { return true } @@ -235,7 +238,7 @@ func (o *EventRequest) SetExpires(v time.Time) { // GetTenant returns the Tenant field value if set, zero value otherwise. func (o *EventRequest) GetTenant() map[string]interface{} { - if o == nil || o.Tenant == nil { + if o == nil || IsNil(o.Tenant) { var ret map[string]interface{} return ret } @@ -245,15 +248,15 @@ func (o *EventRequest) GetTenant() map[string]interface{} { // GetTenantOk returns a tuple with the Tenant field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *EventRequest) GetTenantOk() (map[string]interface{}, bool) { - if o == nil || o.Tenant == nil { - return nil, false + if o == nil || IsNil(o.Tenant) { + return map[string]interface{}{}, false } return o.Tenant, true } // HasTenant returns a boolean if a field has been set. func (o *EventRequest) HasTenant() bool { - if o != nil && o.Tenant != nil { + if o != nil && !IsNil(o.Tenant) { return true } @@ -266,29 +269,33 @@ func (o *EventRequest) SetTenant(v map[string]interface{}) { } func (o EventRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EventRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.User != nil { + if !IsNil(o.User) { toSerialize["user"] = o.User } - if true { - toSerialize["action"] = o.Action - } - if true { - toSerialize["app"] = o.App - } - if o.Context != nil { + toSerialize["action"] = o.Action + toSerialize["app"] = o.App + if !IsNil(o.Context) { toSerialize["context"] = o.Context } if o.ClientIp.IsSet() { toSerialize["client_ip"] = o.ClientIp.Get() } - if o.Expires != nil { + if !IsNil(o.Expires) { toSerialize["expires"] = o.Expires } - if o.Tenant != nil { + if !IsNil(o.Tenant) { toSerialize["tenant"] = o.Tenant } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableEventRequest struct { diff --git a/model_event_top_per_user.go b/model_event_top_per_user.go index 6b4931484..4e793b805 100644 --- a/model_event_top_per_user.go +++ b/model_event_top_per_user.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the EventTopPerUser type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EventTopPerUser{} + // EventTopPerUser Response object of Event's top_per_user type EventTopPerUser struct { Application map[string]interface{} `json:"application"` @@ -56,7 +59,7 @@ func (o *EventTopPerUser) GetApplication() map[string]interface{} { // and a boolean to check if the value has been set. func (o *EventTopPerUser) GetApplicationOk() (map[string]interface{}, bool) { if o == nil { - return nil, false + return map[string]interface{}{}, false } return o.Application, true } @@ -115,19 +118,21 @@ func (o *EventTopPerUser) SetUniqueUsers(v int32) { } func (o EventTopPerUser) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["application"] = o.Application - } - if true { - toSerialize["counted_events"] = o.CountedEvents - } - if true { - toSerialize["unique_users"] = o.UniqueUsers + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o EventTopPerUser) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["application"] = o.Application + toSerialize["counted_events"] = o.CountedEvents + toSerialize["unique_users"] = o.UniqueUsers + return toSerialize, nil +} + type NullableEventTopPerUser struct { value *EventTopPerUser isSet bool diff --git a/model_expiring_base_grant_model.go b/model_expiring_base_grant_model.go index ff5dc96e0..2314c0f96 100644 --- a/model_expiring_base_grant_model.go +++ b/model_expiring_base_grant_model.go @@ -16,6 +16,9 @@ import ( "time" ) +// checks if the ExpiringBaseGrantModel type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExpiringBaseGrantModel{} + // ExpiringBaseGrantModel Serializer for BaseGrantModel and ExpiringBaseGrant type ExpiringBaseGrantModel struct { Pk int32 `json:"pk"` @@ -147,7 +150,7 @@ func (o *ExpiringBaseGrantModel) SetIsExpired(v bool) { // GetExpires returns the Expires field value if set, zero value otherwise. func (o *ExpiringBaseGrantModel) GetExpires() time.Time { - if o == nil || o.Expires == nil { + if o == nil || IsNil(o.Expires) { var ret time.Time return ret } @@ -157,7 +160,7 @@ func (o *ExpiringBaseGrantModel) GetExpires() time.Time { // GetExpiresOk returns a tuple with the Expires field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ExpiringBaseGrantModel) GetExpiresOk() (*time.Time, bool) { - if o == nil || o.Expires == nil { + if o == nil || IsNil(o.Expires) { return nil, false } return o.Expires, true @@ -165,7 +168,7 @@ func (o *ExpiringBaseGrantModel) GetExpiresOk() (*time.Time, bool) { // HasExpires returns a boolean if a field has been set. func (o *ExpiringBaseGrantModel) HasExpires() bool { - if o != nil && o.Expires != nil { + if o != nil && !IsNil(o.Expires) { return true } @@ -202,26 +205,24 @@ func (o *ExpiringBaseGrantModel) SetScope(v []string) { } func (o ExpiringBaseGrantModel) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["provider"] = o.Provider + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if true { - toSerialize["user"] = o.User - } - if true { - toSerialize["is_expired"] = o.IsExpired - } - if o.Expires != nil { + return json.Marshal(toSerialize) +} + +func (o ExpiringBaseGrantModel) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["provider"] = o.Provider + toSerialize["user"] = o.User + // skip: is_expired is readOnly + if !IsNil(o.Expires) { toSerialize["expires"] = o.Expires } - if true { - toSerialize["scope"] = o.Scope - } - return json.Marshal(toSerialize) + toSerialize["scope"] = o.Scope + return toSerialize, nil } type NullableExpiringBaseGrantModel struct { diff --git a/model_expression_policy.go b/model_expression_policy.go index c7b356d19..9d8fe36b7 100644 --- a/model_expression_policy.go +++ b/model_expression_policy.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ExpressionPolicy type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExpressionPolicy{} + // ExpressionPolicy Group Membership Policy Serializer type ExpressionPolicy struct { Pk string `json:"pk"` @@ -109,7 +112,7 @@ func (o *ExpressionPolicy) SetName(v string) { // GetExecutionLogging returns the ExecutionLogging field value if set, zero value otherwise. func (o *ExpressionPolicy) GetExecutionLogging() bool { - if o == nil || o.ExecutionLogging == nil { + if o == nil || IsNil(o.ExecutionLogging) { var ret bool return ret } @@ -119,7 +122,7 @@ func (o *ExpressionPolicy) GetExecutionLogging() bool { // GetExecutionLoggingOk returns a tuple with the ExecutionLogging field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ExpressionPolicy) GetExecutionLoggingOk() (*bool, bool) { - if o == nil || o.ExecutionLogging == nil { + if o == nil || IsNil(o.ExecutionLogging) { return nil, false } return o.ExecutionLogging, true @@ -127,7 +130,7 @@ func (o *ExpressionPolicy) GetExecutionLoggingOk() (*bool, bool) { // HasExecutionLogging returns a boolean if a field has been set. func (o *ExpressionPolicy) HasExecutionLogging() bool { - if o != nil && o.ExecutionLogging != nil { + if o != nil && !IsNil(o.ExecutionLogging) { return true } @@ -284,35 +287,27 @@ func (o *ExpressionPolicy) SetExpression(v string) { } func (o ExpressionPolicy) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if true { - toSerialize["name"] = o.Name - } - if o.ExecutionLogging != nil { + return json.Marshal(toSerialize) +} + +func (o ExpressionPolicy) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name + if !IsNil(o.ExecutionLogging) { toSerialize["execution_logging"] = o.ExecutionLogging } - if true { - toSerialize["component"] = o.Component - } - if true { - toSerialize["verbose_name"] = o.VerboseName - } - if true { - toSerialize["verbose_name_plural"] = o.VerboseNamePlural - } - if true { - toSerialize["meta_model_name"] = o.MetaModelName - } - if true { - toSerialize["bound_to"] = o.BoundTo - } - if true { - toSerialize["expression"] = o.Expression - } - return json.Marshal(toSerialize) + // skip: component is readOnly + // skip: verbose_name is readOnly + // skip: verbose_name_plural is readOnly + // skip: meta_model_name is readOnly + // skip: bound_to is readOnly + toSerialize["expression"] = o.Expression + return toSerialize, nil } type NullableExpressionPolicy struct { diff --git a/model_expression_policy_request.go b/model_expression_policy_request.go index a1a0d34ea..1f170e5dc 100644 --- a/model_expression_policy_request.go +++ b/model_expression_policy_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ExpressionPolicyRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExpressionPolicyRequest{} + // ExpressionPolicyRequest Group Membership Policy Serializer type ExpressionPolicyRequest struct { Name string `json:"name"` @@ -68,7 +71,7 @@ func (o *ExpressionPolicyRequest) SetName(v string) { // GetExecutionLogging returns the ExecutionLogging field value if set, zero value otherwise. func (o *ExpressionPolicyRequest) GetExecutionLogging() bool { - if o == nil || o.ExecutionLogging == nil { + if o == nil || IsNil(o.ExecutionLogging) { var ret bool return ret } @@ -78,7 +81,7 @@ func (o *ExpressionPolicyRequest) GetExecutionLogging() bool { // GetExecutionLoggingOk returns a tuple with the ExecutionLogging field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ExpressionPolicyRequest) GetExecutionLoggingOk() (*bool, bool) { - if o == nil || o.ExecutionLogging == nil { + if o == nil || IsNil(o.ExecutionLogging) { return nil, false } return o.ExecutionLogging, true @@ -86,7 +89,7 @@ func (o *ExpressionPolicyRequest) GetExecutionLoggingOk() (*bool, bool) { // HasExecutionLogging returns a boolean if a field has been set. func (o *ExpressionPolicyRequest) HasExecutionLogging() bool { - if o != nil && o.ExecutionLogging != nil { + if o != nil && !IsNil(o.ExecutionLogging) { return true } @@ -123,17 +126,21 @@ func (o *ExpressionPolicyRequest) SetExpression(v string) { } func (o ExpressionPolicyRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.ExecutionLogging != nil { + return json.Marshal(toSerialize) +} + +func (o ExpressionPolicyRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.ExecutionLogging) { toSerialize["execution_logging"] = o.ExecutionLogging } - if true { - toSerialize["expression"] = o.Expression - } - return json.Marshal(toSerialize) + toSerialize["expression"] = o.Expression + return toSerialize, nil } type NullableExpressionPolicyRequest struct { diff --git a/model_file_path_request.go b/model_file_path_request.go index 0b848c956..57b0c3a9c 100644 --- a/model_file_path_request.go +++ b/model_file_path_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the FilePathRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FilePathRequest{} + // FilePathRequest Serializer to upload file type FilePathRequest struct { Url string `json:"url"` @@ -63,13 +66,19 @@ func (o *FilePathRequest) SetUrl(v string) { } func (o FilePathRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["url"] = o.Url + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o FilePathRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["url"] = o.Url + return toSerialize, nil +} + type NullableFilePathRequest struct { value *FilePathRequest isSet bool diff --git a/model_flow.go b/model_flow.go index 9d9b5a480..3a67c4ecd 100644 --- a/model_flow.go +++ b/model_flow.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the Flow type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Flow{} + // Flow Flow Serializer type Flow struct { Pk string `json:"pk"` @@ -23,9 +26,8 @@ type Flow struct { // Visible in the URL. Slug string `json:"slug"` // Shown as the Title in Flow pages. - Title string `json:"title"` - // Decides what this Flow is used for. For example, the Authentication flow is redirect to when an un-authenticated user visits authentik. * `authentication` - Authentication * `authorization` - Authorization * `invalidation` - Invalidation * `enrollment` - Enrollment * `unenrollment` - Unrenollment * `recovery` - Recovery * `stage_configuration` - Stage Configuration - Designation NullableFlowDesignationEnum `json:"designation"` + Title string `json:"title"` + Designation FlowDesignationEnum `json:"designation"` // Get the URL to the background image. If the name is /static or starts with http it is returned as-is Background string `json:"background"` Stages []string `json:"stages"` @@ -36,19 +38,17 @@ type Flow struct { // Enable compatibility mode, increases compatibility with password managers on mobile devices. CompatibilityMode *bool `json:"compatibility_mode,omitempty"` // Get export URL for flow - ExportUrl string `json:"export_url"` - Layout *LayoutEnum `json:"layout,omitempty"` - // Configure what should happen when a flow denies access to a user. * `message_continue` - Message Continue * `message` - Message * `continue` - Continue - DeniedAction NullableDeniedActionEnum `json:"denied_action,omitempty"` - // Required level of authentication and authorization to access a flow. * `none` - None * `require_authenticated` - Require Authenticated * `require_unauthenticated` - Require Unauthenticated * `require_superuser` - Require Superuser - Authentication NullableAuthenticationEnum `json:"authentication,omitempty"` + ExportUrl string `json:"export_url"` + Layout *LayoutEnum `json:"layout,omitempty"` + DeniedAction *DeniedActionEnum `json:"denied_action,omitempty"` + Authentication *AuthenticationEnum `json:"authentication,omitempty"` } // NewFlow instantiates a new Flow object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewFlow(pk string, policybindingmodelPtrId string, name string, slug string, title string, designation NullableFlowDesignationEnum, background string, stages []string, policies []string, cacheCount int32, exportUrl string) *Flow { +func NewFlow(pk string, policybindingmodelPtrId string, name string, slug string, title string, designation FlowDesignationEnum, background string, stages []string, policies []string, cacheCount int32, exportUrl string) *Flow { this := Flow{} this.Pk = pk this.PolicybindingmodelPtrId = policybindingmodelPtrId @@ -193,29 +193,27 @@ func (o *Flow) SetTitle(v string) { } // GetDesignation returns the Designation field value -// If the value is explicit nil, the zero value for FlowDesignationEnum will be returned func (o *Flow) GetDesignation() FlowDesignationEnum { - if o == nil || o.Designation.Get() == nil { + if o == nil { var ret FlowDesignationEnum return ret } - return *o.Designation.Get() + return o.Designation } // GetDesignationOk returns a tuple with the Designation field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Flow) GetDesignationOk() (*FlowDesignationEnum, bool) { if o == nil { return nil, false } - return o.Designation.Get(), o.Designation.IsSet() + return &o.Designation, true } // SetDesignation sets field value func (o *Flow) SetDesignation(v FlowDesignationEnum) { - o.Designation.Set(&v) + o.Designation = v } // GetBackground returns the Background field value @@ -316,7 +314,7 @@ func (o *Flow) SetCacheCount(v int32) { // GetPolicyEngineMode returns the PolicyEngineMode field value if set, zero value otherwise. func (o *Flow) GetPolicyEngineMode() PolicyEngineMode { - if o == nil || o.PolicyEngineMode == nil { + if o == nil || IsNil(o.PolicyEngineMode) { var ret PolicyEngineMode return ret } @@ -326,7 +324,7 @@ func (o *Flow) GetPolicyEngineMode() PolicyEngineMode { // GetPolicyEngineModeOk returns a tuple with the PolicyEngineMode field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Flow) GetPolicyEngineModeOk() (*PolicyEngineMode, bool) { - if o == nil || o.PolicyEngineMode == nil { + if o == nil || IsNil(o.PolicyEngineMode) { return nil, false } return o.PolicyEngineMode, true @@ -334,7 +332,7 @@ func (o *Flow) GetPolicyEngineModeOk() (*PolicyEngineMode, bool) { // HasPolicyEngineMode returns a boolean if a field has been set. func (o *Flow) HasPolicyEngineMode() bool { - if o != nil && o.PolicyEngineMode != nil { + if o != nil && !IsNil(o.PolicyEngineMode) { return true } @@ -348,7 +346,7 @@ func (o *Flow) SetPolicyEngineMode(v PolicyEngineMode) { // GetCompatibilityMode returns the CompatibilityMode field value if set, zero value otherwise. func (o *Flow) GetCompatibilityMode() bool { - if o == nil || o.CompatibilityMode == nil { + if o == nil || IsNil(o.CompatibilityMode) { var ret bool return ret } @@ -358,7 +356,7 @@ func (o *Flow) GetCompatibilityMode() bool { // GetCompatibilityModeOk returns a tuple with the CompatibilityMode field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Flow) GetCompatibilityModeOk() (*bool, bool) { - if o == nil || o.CompatibilityMode == nil { + if o == nil || IsNil(o.CompatibilityMode) { return nil, false } return o.CompatibilityMode, true @@ -366,7 +364,7 @@ func (o *Flow) GetCompatibilityModeOk() (*bool, bool) { // HasCompatibilityMode returns a boolean if a field has been set. func (o *Flow) HasCompatibilityMode() bool { - if o != nil && o.CompatibilityMode != nil { + if o != nil && !IsNil(o.CompatibilityMode) { return true } @@ -404,7 +402,7 @@ func (o *Flow) SetExportUrl(v string) { // GetLayout returns the Layout field value if set, zero value otherwise. func (o *Flow) GetLayout() LayoutEnum { - if o == nil || o.Layout == nil { + if o == nil || IsNil(o.Layout) { var ret LayoutEnum return ret } @@ -414,7 +412,7 @@ func (o *Flow) GetLayout() LayoutEnum { // GetLayoutOk returns a tuple with the Layout field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Flow) GetLayoutOk() (*LayoutEnum, bool) { - if o == nil || o.Layout == nil { + if o == nil || IsNil(o.Layout) { return nil, false } return o.Layout, true @@ -422,7 +420,7 @@ func (o *Flow) GetLayoutOk() (*LayoutEnum, bool) { // HasLayout returns a boolean if a field has been set. func (o *Flow) HasLayout() bool { - if o != nil && o.Layout != nil { + if o != nil && !IsNil(o.Layout) { return true } @@ -434,143 +432,107 @@ func (o *Flow) SetLayout(v LayoutEnum) { o.Layout = &v } -// GetDeniedAction returns the DeniedAction field value if set, zero value otherwise (both if not set or set to explicit null). +// GetDeniedAction returns the DeniedAction field value if set, zero value otherwise. func (o *Flow) GetDeniedAction() DeniedActionEnum { - if o == nil || o.DeniedAction.Get() == nil { + if o == nil || IsNil(o.DeniedAction) { var ret DeniedActionEnum return ret } - return *o.DeniedAction.Get() + return *o.DeniedAction } // GetDeniedActionOk returns a tuple with the DeniedAction field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Flow) GetDeniedActionOk() (*DeniedActionEnum, bool) { - if o == nil { + if o == nil || IsNil(o.DeniedAction) { return nil, false } - return o.DeniedAction.Get(), o.DeniedAction.IsSet() + return o.DeniedAction, true } // HasDeniedAction returns a boolean if a field has been set. func (o *Flow) HasDeniedAction() bool { - if o != nil && o.DeniedAction.IsSet() { + if o != nil && !IsNil(o.DeniedAction) { return true } return false } -// SetDeniedAction gets a reference to the given NullableDeniedActionEnum and assigns it to the DeniedAction field. +// SetDeniedAction gets a reference to the given DeniedActionEnum and assigns it to the DeniedAction field. func (o *Flow) SetDeniedAction(v DeniedActionEnum) { - o.DeniedAction.Set(&v) -} - -// SetDeniedActionNil sets the value for DeniedAction to be an explicit nil -func (o *Flow) SetDeniedActionNil() { - o.DeniedAction.Set(nil) -} - -// UnsetDeniedAction ensures that no value is present for DeniedAction, not even an explicit nil -func (o *Flow) UnsetDeniedAction() { - o.DeniedAction.Unset() + o.DeniedAction = &v } -// GetAuthentication returns the Authentication field value if set, zero value otherwise (both if not set or set to explicit null). +// GetAuthentication returns the Authentication field value if set, zero value otherwise. func (o *Flow) GetAuthentication() AuthenticationEnum { - if o == nil || o.Authentication.Get() == nil { + if o == nil || IsNil(o.Authentication) { var ret AuthenticationEnum return ret } - return *o.Authentication.Get() + return *o.Authentication } // GetAuthenticationOk returns a tuple with the Authentication field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Flow) GetAuthenticationOk() (*AuthenticationEnum, bool) { - if o == nil { + if o == nil || IsNil(o.Authentication) { return nil, false } - return o.Authentication.Get(), o.Authentication.IsSet() + return o.Authentication, true } // HasAuthentication returns a boolean if a field has been set. func (o *Flow) HasAuthentication() bool { - if o != nil && o.Authentication.IsSet() { + if o != nil && !IsNil(o.Authentication) { return true } return false } -// SetAuthentication gets a reference to the given NullableAuthenticationEnum and assigns it to the Authentication field. +// SetAuthentication gets a reference to the given AuthenticationEnum and assigns it to the Authentication field. func (o *Flow) SetAuthentication(v AuthenticationEnum) { - o.Authentication.Set(&v) -} - -// SetAuthenticationNil sets the value for Authentication to be an explicit nil -func (o *Flow) SetAuthenticationNil() { - o.Authentication.Set(nil) + o.Authentication = &v } -// UnsetAuthentication ensures that no value is present for Authentication, not even an explicit nil -func (o *Flow) UnsetAuthentication() { - o.Authentication.Unset() +func (o Flow) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) } -func (o Flow) MarshalJSON() ([]byte, error) { +func (o Flow) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["policybindingmodel_ptr_id"] = o.PolicybindingmodelPtrId - } - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["slug"] = o.Slug - } - if true { - toSerialize["title"] = o.Title - } - if true { - toSerialize["designation"] = o.Designation.Get() - } - if true { - toSerialize["background"] = o.Background - } - if true { - toSerialize["stages"] = o.Stages - } - if true { - toSerialize["policies"] = o.Policies - } - if true { - toSerialize["cache_count"] = o.CacheCount - } - if o.PolicyEngineMode != nil { + // skip: pk is readOnly + // skip: policybindingmodel_ptr_id is readOnly + toSerialize["name"] = o.Name + toSerialize["slug"] = o.Slug + toSerialize["title"] = o.Title + toSerialize["designation"] = o.Designation + // skip: background is readOnly + // skip: stages is readOnly + // skip: policies is readOnly + // skip: cache_count is readOnly + if !IsNil(o.PolicyEngineMode) { toSerialize["policy_engine_mode"] = o.PolicyEngineMode } - if o.CompatibilityMode != nil { + if !IsNil(o.CompatibilityMode) { toSerialize["compatibility_mode"] = o.CompatibilityMode } - if true { - toSerialize["export_url"] = o.ExportUrl - } - if o.Layout != nil { + // skip: export_url is readOnly + if !IsNil(o.Layout) { toSerialize["layout"] = o.Layout } - if o.DeniedAction.IsSet() { - toSerialize["denied_action"] = o.DeniedAction.Get() + if !IsNil(o.DeniedAction) { + toSerialize["denied_action"] = o.DeniedAction } - if o.Authentication.IsSet() { - toSerialize["authentication"] = o.Authentication.Get() + if !IsNil(o.Authentication) { + toSerialize["authentication"] = o.Authentication } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableFlow struct { diff --git a/model_flow_challenge_response_request.go b/model_flow_challenge_response_request.go index 6eba94773..328b24565 100644 --- a/model_flow_challenge_response_request.go +++ b/model_flow_challenge_response_request.go @@ -179,7 +179,7 @@ func (dst *FlowChallengeResponseRequest) UnmarshalJSON(data []byte) error { var jsonDict map[string]interface{} err = newStrictDecoder(data).Decode(&jsonDict) if err != nil { - return fmt.Errorf("Failed to unmarshal JSON into map for the discriminator lookup.") + return fmt.Errorf("failed to unmarshal JSON into map for the discriminator lookup") } // check if the discriminator value is 'AppleChallengeResponseRequest' @@ -190,7 +190,7 @@ func (dst *FlowChallengeResponseRequest) UnmarshalJSON(data []byte) error { return nil // data stored in dst.AppleChallengeResponseRequest, return on the first match } else { dst.AppleChallengeResponseRequest = nil - return fmt.Errorf("Failed to unmarshal FlowChallengeResponseRequest as AppleChallengeResponseRequest: %s", err.Error()) + return fmt.Errorf("failed to unmarshal FlowChallengeResponseRequest as AppleChallengeResponseRequest: %s", err.Error()) } } @@ -202,7 +202,7 @@ func (dst *FlowChallengeResponseRequest) UnmarshalJSON(data []byte) error { return nil // data stored in dst.AuthenticatorDuoChallengeResponseRequest, return on the first match } else { dst.AuthenticatorDuoChallengeResponseRequest = nil - return fmt.Errorf("Failed to unmarshal FlowChallengeResponseRequest as AuthenticatorDuoChallengeResponseRequest: %s", err.Error()) + return fmt.Errorf("failed to unmarshal FlowChallengeResponseRequest as AuthenticatorDuoChallengeResponseRequest: %s", err.Error()) } } @@ -214,7 +214,7 @@ func (dst *FlowChallengeResponseRequest) UnmarshalJSON(data []byte) error { return nil // data stored in dst.AuthenticatorSMSChallengeResponseRequest, return on the first match } else { dst.AuthenticatorSMSChallengeResponseRequest = nil - return fmt.Errorf("Failed to unmarshal FlowChallengeResponseRequest as AuthenticatorSMSChallengeResponseRequest: %s", err.Error()) + return fmt.Errorf("failed to unmarshal FlowChallengeResponseRequest as AuthenticatorSMSChallengeResponseRequest: %s", err.Error()) } } @@ -226,7 +226,7 @@ func (dst *FlowChallengeResponseRequest) UnmarshalJSON(data []byte) error { return nil // data stored in dst.AuthenticatorStaticChallengeResponseRequest, return on the first match } else { dst.AuthenticatorStaticChallengeResponseRequest = nil - return fmt.Errorf("Failed to unmarshal FlowChallengeResponseRequest as AuthenticatorStaticChallengeResponseRequest: %s", err.Error()) + return fmt.Errorf("failed to unmarshal FlowChallengeResponseRequest as AuthenticatorStaticChallengeResponseRequest: %s", err.Error()) } } @@ -238,7 +238,7 @@ func (dst *FlowChallengeResponseRequest) UnmarshalJSON(data []byte) error { return nil // data stored in dst.AuthenticatorTOTPChallengeResponseRequest, return on the first match } else { dst.AuthenticatorTOTPChallengeResponseRequest = nil - return fmt.Errorf("Failed to unmarshal FlowChallengeResponseRequest as AuthenticatorTOTPChallengeResponseRequest: %s", err.Error()) + return fmt.Errorf("failed to unmarshal FlowChallengeResponseRequest as AuthenticatorTOTPChallengeResponseRequest: %s", err.Error()) } } @@ -250,7 +250,7 @@ func (dst *FlowChallengeResponseRequest) UnmarshalJSON(data []byte) error { return nil // data stored in dst.AuthenticatorValidationChallengeResponseRequest, return on the first match } else { dst.AuthenticatorValidationChallengeResponseRequest = nil - return fmt.Errorf("Failed to unmarshal FlowChallengeResponseRequest as AuthenticatorValidationChallengeResponseRequest: %s", err.Error()) + return fmt.Errorf("failed to unmarshal FlowChallengeResponseRequest as AuthenticatorValidationChallengeResponseRequest: %s", err.Error()) } } @@ -262,7 +262,7 @@ func (dst *FlowChallengeResponseRequest) UnmarshalJSON(data []byte) error { return nil // data stored in dst.AuthenticatorWebAuthnChallengeResponseRequest, return on the first match } else { dst.AuthenticatorWebAuthnChallengeResponseRequest = nil - return fmt.Errorf("Failed to unmarshal FlowChallengeResponseRequest as AuthenticatorWebAuthnChallengeResponseRequest: %s", err.Error()) + return fmt.Errorf("failed to unmarshal FlowChallengeResponseRequest as AuthenticatorWebAuthnChallengeResponseRequest: %s", err.Error()) } } @@ -274,7 +274,7 @@ func (dst *FlowChallengeResponseRequest) UnmarshalJSON(data []byte) error { return nil // data stored in dst.AutoSubmitChallengeResponseRequest, return on the first match } else { dst.AutoSubmitChallengeResponseRequest = nil - return fmt.Errorf("Failed to unmarshal FlowChallengeResponseRequest as AutoSubmitChallengeResponseRequest: %s", err.Error()) + return fmt.Errorf("failed to unmarshal FlowChallengeResponseRequest as AutoSubmitChallengeResponseRequest: %s", err.Error()) } } @@ -286,7 +286,7 @@ func (dst *FlowChallengeResponseRequest) UnmarshalJSON(data []byte) error { return nil // data stored in dst.CaptchaChallengeResponseRequest, return on the first match } else { dst.CaptchaChallengeResponseRequest = nil - return fmt.Errorf("Failed to unmarshal FlowChallengeResponseRequest as CaptchaChallengeResponseRequest: %s", err.Error()) + return fmt.Errorf("failed to unmarshal FlowChallengeResponseRequest as CaptchaChallengeResponseRequest: %s", err.Error()) } } @@ -298,7 +298,7 @@ func (dst *FlowChallengeResponseRequest) UnmarshalJSON(data []byte) error { return nil // data stored in dst.ConsentChallengeResponseRequest, return on the first match } else { dst.ConsentChallengeResponseRequest = nil - return fmt.Errorf("Failed to unmarshal FlowChallengeResponseRequest as ConsentChallengeResponseRequest: %s", err.Error()) + return fmt.Errorf("failed to unmarshal FlowChallengeResponseRequest as ConsentChallengeResponseRequest: %s", err.Error()) } } @@ -310,7 +310,7 @@ func (dst *FlowChallengeResponseRequest) UnmarshalJSON(data []byte) error { return nil // data stored in dst.DummyChallengeResponseRequest, return on the first match } else { dst.DummyChallengeResponseRequest = nil - return fmt.Errorf("Failed to unmarshal FlowChallengeResponseRequest as DummyChallengeResponseRequest: %s", err.Error()) + return fmt.Errorf("failed to unmarshal FlowChallengeResponseRequest as DummyChallengeResponseRequest: %s", err.Error()) } } @@ -322,7 +322,7 @@ func (dst *FlowChallengeResponseRequest) UnmarshalJSON(data []byte) error { return nil // data stored in dst.EmailChallengeResponseRequest, return on the first match } else { dst.EmailChallengeResponseRequest = nil - return fmt.Errorf("Failed to unmarshal FlowChallengeResponseRequest as EmailChallengeResponseRequest: %s", err.Error()) + return fmt.Errorf("failed to unmarshal FlowChallengeResponseRequest as EmailChallengeResponseRequest: %s", err.Error()) } } @@ -334,7 +334,7 @@ func (dst *FlowChallengeResponseRequest) UnmarshalJSON(data []byte) error { return nil // data stored in dst.IdentificationChallengeResponseRequest, return on the first match } else { dst.IdentificationChallengeResponseRequest = nil - return fmt.Errorf("Failed to unmarshal FlowChallengeResponseRequest as IdentificationChallengeResponseRequest: %s", err.Error()) + return fmt.Errorf("failed to unmarshal FlowChallengeResponseRequest as IdentificationChallengeResponseRequest: %s", err.Error()) } } @@ -346,7 +346,7 @@ func (dst *FlowChallengeResponseRequest) UnmarshalJSON(data []byte) error { return nil // data stored in dst.OAuthDeviceCodeChallengeResponseRequest, return on the first match } else { dst.OAuthDeviceCodeChallengeResponseRequest = nil - return fmt.Errorf("Failed to unmarshal FlowChallengeResponseRequest as OAuthDeviceCodeChallengeResponseRequest: %s", err.Error()) + return fmt.Errorf("failed to unmarshal FlowChallengeResponseRequest as OAuthDeviceCodeChallengeResponseRequest: %s", err.Error()) } } @@ -358,7 +358,7 @@ func (dst *FlowChallengeResponseRequest) UnmarshalJSON(data []byte) error { return nil // data stored in dst.OAuthDeviceCodeFinishChallengeResponseRequest, return on the first match } else { dst.OAuthDeviceCodeFinishChallengeResponseRequest = nil - return fmt.Errorf("Failed to unmarshal FlowChallengeResponseRequest as OAuthDeviceCodeFinishChallengeResponseRequest: %s", err.Error()) + return fmt.Errorf("failed to unmarshal FlowChallengeResponseRequest as OAuthDeviceCodeFinishChallengeResponseRequest: %s", err.Error()) } } @@ -370,7 +370,7 @@ func (dst *FlowChallengeResponseRequest) UnmarshalJSON(data []byte) error { return nil // data stored in dst.PasswordChallengeResponseRequest, return on the first match } else { dst.PasswordChallengeResponseRequest = nil - return fmt.Errorf("Failed to unmarshal FlowChallengeResponseRequest as PasswordChallengeResponseRequest: %s", err.Error()) + return fmt.Errorf("failed to unmarshal FlowChallengeResponseRequest as PasswordChallengeResponseRequest: %s", err.Error()) } } @@ -382,7 +382,7 @@ func (dst *FlowChallengeResponseRequest) UnmarshalJSON(data []byte) error { return nil // data stored in dst.PlexAuthenticationChallengeResponseRequest, return on the first match } else { dst.PlexAuthenticationChallengeResponseRequest = nil - return fmt.Errorf("Failed to unmarshal FlowChallengeResponseRequest as PlexAuthenticationChallengeResponseRequest: %s", err.Error()) + return fmt.Errorf("failed to unmarshal FlowChallengeResponseRequest as PlexAuthenticationChallengeResponseRequest: %s", err.Error()) } } @@ -394,7 +394,7 @@ func (dst *FlowChallengeResponseRequest) UnmarshalJSON(data []byte) error { return nil // data stored in dst.PromptChallengeResponseRequest, return on the first match } else { dst.PromptChallengeResponseRequest = nil - return fmt.Errorf("Failed to unmarshal FlowChallengeResponseRequest as PromptChallengeResponseRequest: %s", err.Error()) + return fmt.Errorf("failed to unmarshal FlowChallengeResponseRequest as PromptChallengeResponseRequest: %s", err.Error()) } } @@ -406,7 +406,7 @@ func (dst *FlowChallengeResponseRequest) UnmarshalJSON(data []byte) error { return nil // data stored in dst.UserLoginChallengeResponseRequest, return on the first match } else { dst.UserLoginChallengeResponseRequest = nil - return fmt.Errorf("Failed to unmarshal FlowChallengeResponseRequest as UserLoginChallengeResponseRequest: %s", err.Error()) + return fmt.Errorf("failed to unmarshal FlowChallengeResponseRequest as UserLoginChallengeResponseRequest: %s", err.Error()) } } @@ -418,7 +418,7 @@ func (dst *FlowChallengeResponseRequest) UnmarshalJSON(data []byte) error { return nil // data stored in dst.OAuthDeviceCodeChallengeResponseRequest, return on the first match } else { dst.OAuthDeviceCodeChallengeResponseRequest = nil - return fmt.Errorf("Failed to unmarshal FlowChallengeResponseRequest as OAuthDeviceCodeChallengeResponseRequest: %s", err.Error()) + return fmt.Errorf("failed to unmarshal FlowChallengeResponseRequest as OAuthDeviceCodeChallengeResponseRequest: %s", err.Error()) } } @@ -430,7 +430,7 @@ func (dst *FlowChallengeResponseRequest) UnmarshalJSON(data []byte) error { return nil // data stored in dst.OAuthDeviceCodeFinishChallengeResponseRequest, return on the first match } else { dst.OAuthDeviceCodeFinishChallengeResponseRequest = nil - return fmt.Errorf("Failed to unmarshal FlowChallengeResponseRequest as OAuthDeviceCodeFinishChallengeResponseRequest: %s", err.Error()) + return fmt.Errorf("failed to unmarshal FlowChallengeResponseRequest as OAuthDeviceCodeFinishChallengeResponseRequest: %s", err.Error()) } } @@ -442,7 +442,7 @@ func (dst *FlowChallengeResponseRequest) UnmarshalJSON(data []byte) error { return nil // data stored in dst.AppleChallengeResponseRequest, return on the first match } else { dst.AppleChallengeResponseRequest = nil - return fmt.Errorf("Failed to unmarshal FlowChallengeResponseRequest as AppleChallengeResponseRequest: %s", err.Error()) + return fmt.Errorf("failed to unmarshal FlowChallengeResponseRequest as AppleChallengeResponseRequest: %s", err.Error()) } } @@ -454,7 +454,7 @@ func (dst *FlowChallengeResponseRequest) UnmarshalJSON(data []byte) error { return nil // data stored in dst.PlexAuthenticationChallengeResponseRequest, return on the first match } else { dst.PlexAuthenticationChallengeResponseRequest = nil - return fmt.Errorf("Failed to unmarshal FlowChallengeResponseRequest as PlexAuthenticationChallengeResponseRequest: %s", err.Error()) + return fmt.Errorf("failed to unmarshal FlowChallengeResponseRequest as PlexAuthenticationChallengeResponseRequest: %s", err.Error()) } } @@ -466,7 +466,7 @@ func (dst *FlowChallengeResponseRequest) UnmarshalJSON(data []byte) error { return nil // data stored in dst.AuthenticatorDuoChallengeResponseRequest, return on the first match } else { dst.AuthenticatorDuoChallengeResponseRequest = nil - return fmt.Errorf("Failed to unmarshal FlowChallengeResponseRequest as AuthenticatorDuoChallengeResponseRequest: %s", err.Error()) + return fmt.Errorf("failed to unmarshal FlowChallengeResponseRequest as AuthenticatorDuoChallengeResponseRequest: %s", err.Error()) } } @@ -478,7 +478,7 @@ func (dst *FlowChallengeResponseRequest) UnmarshalJSON(data []byte) error { return nil // data stored in dst.AuthenticatorSMSChallengeResponseRequest, return on the first match } else { dst.AuthenticatorSMSChallengeResponseRequest = nil - return fmt.Errorf("Failed to unmarshal FlowChallengeResponseRequest as AuthenticatorSMSChallengeResponseRequest: %s", err.Error()) + return fmt.Errorf("failed to unmarshal FlowChallengeResponseRequest as AuthenticatorSMSChallengeResponseRequest: %s", err.Error()) } } @@ -490,7 +490,7 @@ func (dst *FlowChallengeResponseRequest) UnmarshalJSON(data []byte) error { return nil // data stored in dst.AuthenticatorStaticChallengeResponseRequest, return on the first match } else { dst.AuthenticatorStaticChallengeResponseRequest = nil - return fmt.Errorf("Failed to unmarshal FlowChallengeResponseRequest as AuthenticatorStaticChallengeResponseRequest: %s", err.Error()) + return fmt.Errorf("failed to unmarshal FlowChallengeResponseRequest as AuthenticatorStaticChallengeResponseRequest: %s", err.Error()) } } @@ -502,7 +502,7 @@ func (dst *FlowChallengeResponseRequest) UnmarshalJSON(data []byte) error { return nil // data stored in dst.AuthenticatorTOTPChallengeResponseRequest, return on the first match } else { dst.AuthenticatorTOTPChallengeResponseRequest = nil - return fmt.Errorf("Failed to unmarshal FlowChallengeResponseRequest as AuthenticatorTOTPChallengeResponseRequest: %s", err.Error()) + return fmt.Errorf("failed to unmarshal FlowChallengeResponseRequest as AuthenticatorTOTPChallengeResponseRequest: %s", err.Error()) } } @@ -514,7 +514,7 @@ func (dst *FlowChallengeResponseRequest) UnmarshalJSON(data []byte) error { return nil // data stored in dst.AuthenticatorValidationChallengeResponseRequest, return on the first match } else { dst.AuthenticatorValidationChallengeResponseRequest = nil - return fmt.Errorf("Failed to unmarshal FlowChallengeResponseRequest as AuthenticatorValidationChallengeResponseRequest: %s", err.Error()) + return fmt.Errorf("failed to unmarshal FlowChallengeResponseRequest as AuthenticatorValidationChallengeResponseRequest: %s", err.Error()) } } @@ -526,7 +526,7 @@ func (dst *FlowChallengeResponseRequest) UnmarshalJSON(data []byte) error { return nil // data stored in dst.AuthenticatorWebAuthnChallengeResponseRequest, return on the first match } else { dst.AuthenticatorWebAuthnChallengeResponseRequest = nil - return fmt.Errorf("Failed to unmarshal FlowChallengeResponseRequest as AuthenticatorWebAuthnChallengeResponseRequest: %s", err.Error()) + return fmt.Errorf("failed to unmarshal FlowChallengeResponseRequest as AuthenticatorWebAuthnChallengeResponseRequest: %s", err.Error()) } } @@ -538,7 +538,7 @@ func (dst *FlowChallengeResponseRequest) UnmarshalJSON(data []byte) error { return nil // data stored in dst.AutoSubmitChallengeResponseRequest, return on the first match } else { dst.AutoSubmitChallengeResponseRequest = nil - return fmt.Errorf("Failed to unmarshal FlowChallengeResponseRequest as AutoSubmitChallengeResponseRequest: %s", err.Error()) + return fmt.Errorf("failed to unmarshal FlowChallengeResponseRequest as AutoSubmitChallengeResponseRequest: %s", err.Error()) } } @@ -550,7 +550,7 @@ func (dst *FlowChallengeResponseRequest) UnmarshalJSON(data []byte) error { return nil // data stored in dst.CaptchaChallengeResponseRequest, return on the first match } else { dst.CaptchaChallengeResponseRequest = nil - return fmt.Errorf("Failed to unmarshal FlowChallengeResponseRequest as CaptchaChallengeResponseRequest: %s", err.Error()) + return fmt.Errorf("failed to unmarshal FlowChallengeResponseRequest as CaptchaChallengeResponseRequest: %s", err.Error()) } } @@ -562,7 +562,7 @@ func (dst *FlowChallengeResponseRequest) UnmarshalJSON(data []byte) error { return nil // data stored in dst.ConsentChallengeResponseRequest, return on the first match } else { dst.ConsentChallengeResponseRequest = nil - return fmt.Errorf("Failed to unmarshal FlowChallengeResponseRequest as ConsentChallengeResponseRequest: %s", err.Error()) + return fmt.Errorf("failed to unmarshal FlowChallengeResponseRequest as ConsentChallengeResponseRequest: %s", err.Error()) } } @@ -574,7 +574,7 @@ func (dst *FlowChallengeResponseRequest) UnmarshalJSON(data []byte) error { return nil // data stored in dst.DummyChallengeResponseRequest, return on the first match } else { dst.DummyChallengeResponseRequest = nil - return fmt.Errorf("Failed to unmarshal FlowChallengeResponseRequest as DummyChallengeResponseRequest: %s", err.Error()) + return fmt.Errorf("failed to unmarshal FlowChallengeResponseRequest as DummyChallengeResponseRequest: %s", err.Error()) } } @@ -586,7 +586,7 @@ func (dst *FlowChallengeResponseRequest) UnmarshalJSON(data []byte) error { return nil // data stored in dst.EmailChallengeResponseRequest, return on the first match } else { dst.EmailChallengeResponseRequest = nil - return fmt.Errorf("Failed to unmarshal FlowChallengeResponseRequest as EmailChallengeResponseRequest: %s", err.Error()) + return fmt.Errorf("failed to unmarshal FlowChallengeResponseRequest as EmailChallengeResponseRequest: %s", err.Error()) } } @@ -598,7 +598,7 @@ func (dst *FlowChallengeResponseRequest) UnmarshalJSON(data []byte) error { return nil // data stored in dst.IdentificationChallengeResponseRequest, return on the first match } else { dst.IdentificationChallengeResponseRequest = nil - return fmt.Errorf("Failed to unmarshal FlowChallengeResponseRequest as IdentificationChallengeResponseRequest: %s", err.Error()) + return fmt.Errorf("failed to unmarshal FlowChallengeResponseRequest as IdentificationChallengeResponseRequest: %s", err.Error()) } } @@ -610,7 +610,7 @@ func (dst *FlowChallengeResponseRequest) UnmarshalJSON(data []byte) error { return nil // data stored in dst.PasswordChallengeResponseRequest, return on the first match } else { dst.PasswordChallengeResponseRequest = nil - return fmt.Errorf("Failed to unmarshal FlowChallengeResponseRequest as PasswordChallengeResponseRequest: %s", err.Error()) + return fmt.Errorf("failed to unmarshal FlowChallengeResponseRequest as PasswordChallengeResponseRequest: %s", err.Error()) } } @@ -622,7 +622,7 @@ func (dst *FlowChallengeResponseRequest) UnmarshalJSON(data []byte) error { return nil // data stored in dst.PromptChallengeResponseRequest, return on the first match } else { dst.PromptChallengeResponseRequest = nil - return fmt.Errorf("Failed to unmarshal FlowChallengeResponseRequest as PromptChallengeResponseRequest: %s", err.Error()) + return fmt.Errorf("failed to unmarshal FlowChallengeResponseRequest as PromptChallengeResponseRequest: %s", err.Error()) } } @@ -634,7 +634,7 @@ func (dst *FlowChallengeResponseRequest) UnmarshalJSON(data []byte) error { return nil // data stored in dst.UserLoginChallengeResponseRequest, return on the first match } else { dst.UserLoginChallengeResponseRequest = nil - return fmt.Errorf("Failed to unmarshal FlowChallengeResponseRequest as UserLoginChallengeResponseRequest: %s", err.Error()) + return fmt.Errorf("failed to unmarshal FlowChallengeResponseRequest as UserLoginChallengeResponseRequest: %s", err.Error()) } } diff --git a/model_flow_diagram.go b/model_flow_diagram.go index 2845eb75d..844ffb004 100644 --- a/model_flow_diagram.go +++ b/model_flow_diagram.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the FlowDiagram type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FlowDiagram{} + // FlowDiagram response of the flow's diagram action type FlowDiagram struct { Diagram string `json:"diagram"` @@ -63,13 +66,19 @@ func (o *FlowDiagram) SetDiagram(v string) { } func (o FlowDiagram) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["diagram"] = o.Diagram + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o FlowDiagram) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: diagram is readOnly + return toSerialize, nil +} + type NullableFlowDiagram struct { value *FlowDiagram isSet bool diff --git a/model_flow_error_challenge.go b/model_flow_error_challenge.go index c2bd397f0..0331e0b52 100644 --- a/model_flow_error_challenge.go +++ b/model_flow_error_challenge.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the FlowErrorChallenge type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FlowErrorChallenge{} + // FlowErrorChallenge Challenge class when an unhandled error occurs during a stage. Normal users are shown an error message, superusers are shown a full stacktrace. type FlowErrorChallenge struct { Type *string `json:"type,omitempty"` @@ -54,7 +57,7 @@ func NewFlowErrorChallengeWithDefaults() *FlowErrorChallenge { // GetType returns the Type field value if set, zero value otherwise. func (o *FlowErrorChallenge) GetType() string { - if o == nil || o.Type == nil { + if o == nil || IsNil(o.Type) { var ret string return ret } @@ -64,7 +67,7 @@ func (o *FlowErrorChallenge) GetType() string { // GetTypeOk returns a tuple with the Type field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *FlowErrorChallenge) GetTypeOk() (*string, bool) { - if o == nil || o.Type == nil { + if o == nil || IsNil(o.Type) { return nil, false } return o.Type, true @@ -72,7 +75,7 @@ func (o *FlowErrorChallenge) GetTypeOk() (*string, bool) { // HasType returns a boolean if a field has been set. func (o *FlowErrorChallenge) HasType() bool { - if o != nil && o.Type != nil { + if o != nil && !IsNil(o.Type) { return true } @@ -86,7 +89,7 @@ func (o *FlowErrorChallenge) SetType(v string) { // GetFlowInfo returns the FlowInfo field value if set, zero value otherwise. func (o *FlowErrorChallenge) GetFlowInfo() ContextualFlowInfo { - if o == nil || o.FlowInfo == nil { + if o == nil || IsNil(o.FlowInfo) { var ret ContextualFlowInfo return ret } @@ -96,7 +99,7 @@ func (o *FlowErrorChallenge) GetFlowInfo() ContextualFlowInfo { // GetFlowInfoOk returns a tuple with the FlowInfo field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *FlowErrorChallenge) GetFlowInfoOk() (*ContextualFlowInfo, bool) { - if o == nil || o.FlowInfo == nil { + if o == nil || IsNil(o.FlowInfo) { return nil, false } return o.FlowInfo, true @@ -104,7 +107,7 @@ func (o *FlowErrorChallenge) GetFlowInfoOk() (*ContextualFlowInfo, bool) { // HasFlowInfo returns a boolean if a field has been set. func (o *FlowErrorChallenge) HasFlowInfo() bool { - if o != nil && o.FlowInfo != nil { + if o != nil && !IsNil(o.FlowInfo) { return true } @@ -118,7 +121,7 @@ func (o *FlowErrorChallenge) SetFlowInfo(v ContextualFlowInfo) { // GetComponent returns the Component field value if set, zero value otherwise. func (o *FlowErrorChallenge) GetComponent() string { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { var ret string return ret } @@ -128,7 +131,7 @@ func (o *FlowErrorChallenge) GetComponent() string { // GetComponentOk returns a tuple with the Component field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *FlowErrorChallenge) GetComponentOk() (*string, bool) { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { return nil, false } return o.Component, true @@ -136,7 +139,7 @@ func (o *FlowErrorChallenge) GetComponentOk() (*string, bool) { // HasComponent returns a boolean if a field has been set. func (o *FlowErrorChallenge) HasComponent() bool { - if o != nil && o.Component != nil { + if o != nil && !IsNil(o.Component) { return true } @@ -150,7 +153,7 @@ func (o *FlowErrorChallenge) SetComponent(v string) { // GetResponseErrors returns the ResponseErrors field value if set, zero value otherwise. func (o *FlowErrorChallenge) GetResponseErrors() map[string][]ErrorDetail { - if o == nil || o.ResponseErrors == nil { + if o == nil || IsNil(o.ResponseErrors) { var ret map[string][]ErrorDetail return ret } @@ -160,7 +163,7 @@ func (o *FlowErrorChallenge) GetResponseErrors() map[string][]ErrorDetail { // GetResponseErrorsOk returns a tuple with the ResponseErrors field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *FlowErrorChallenge) GetResponseErrorsOk() (*map[string][]ErrorDetail, bool) { - if o == nil || o.ResponseErrors == nil { + if o == nil || IsNil(o.ResponseErrors) { return nil, false } return o.ResponseErrors, true @@ -168,7 +171,7 @@ func (o *FlowErrorChallenge) GetResponseErrorsOk() (*map[string][]ErrorDetail, b // HasResponseErrors returns a boolean if a field has been set. func (o *FlowErrorChallenge) HasResponseErrors() bool { - if o != nil && o.ResponseErrors != nil { + if o != nil && !IsNil(o.ResponseErrors) { return true } @@ -206,7 +209,7 @@ func (o *FlowErrorChallenge) SetRequestId(v string) { // GetError returns the Error field value if set, zero value otherwise. func (o *FlowErrorChallenge) GetError() string { - if o == nil || o.Error == nil { + if o == nil || IsNil(o.Error) { var ret string return ret } @@ -216,7 +219,7 @@ func (o *FlowErrorChallenge) GetError() string { // GetErrorOk returns a tuple with the Error field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *FlowErrorChallenge) GetErrorOk() (*string, bool) { - if o == nil || o.Error == nil { + if o == nil || IsNil(o.Error) { return nil, false } return o.Error, true @@ -224,7 +227,7 @@ func (o *FlowErrorChallenge) GetErrorOk() (*string, bool) { // HasError returns a boolean if a field has been set. func (o *FlowErrorChallenge) HasError() bool { - if o != nil && o.Error != nil { + if o != nil && !IsNil(o.Error) { return true } @@ -238,7 +241,7 @@ func (o *FlowErrorChallenge) SetError(v string) { // GetTraceback returns the Traceback field value if set, zero value otherwise. func (o *FlowErrorChallenge) GetTraceback() string { - if o == nil || o.Traceback == nil { + if o == nil || IsNil(o.Traceback) { var ret string return ret } @@ -248,7 +251,7 @@ func (o *FlowErrorChallenge) GetTraceback() string { // GetTracebackOk returns a tuple with the Traceback field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *FlowErrorChallenge) GetTracebackOk() (*string, bool) { - if o == nil || o.Traceback == nil { + if o == nil || IsNil(o.Traceback) { return nil, false } return o.Traceback, true @@ -256,7 +259,7 @@ func (o *FlowErrorChallenge) GetTracebackOk() (*string, bool) { // HasTraceback returns a boolean if a field has been set. func (o *FlowErrorChallenge) HasTraceback() bool { - if o != nil && o.Traceback != nil { + if o != nil && !IsNil(o.Traceback) { return true } @@ -269,29 +272,35 @@ func (o *FlowErrorChallenge) SetTraceback(v string) { } func (o FlowErrorChallenge) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FlowErrorChallenge) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Type != nil { + if !IsNil(o.Type) { toSerialize["type"] = o.Type } - if o.FlowInfo != nil { + if !IsNil(o.FlowInfo) { toSerialize["flow_info"] = o.FlowInfo } - if o.Component != nil { + if !IsNil(o.Component) { toSerialize["component"] = o.Component } - if o.ResponseErrors != nil { + if !IsNil(o.ResponseErrors) { toSerialize["response_errors"] = o.ResponseErrors } - if true { - toSerialize["request_id"] = o.RequestId - } - if o.Error != nil { + toSerialize["request_id"] = o.RequestId + if !IsNil(o.Error) { toSerialize["error"] = o.Error } - if o.Traceback != nil { + if !IsNil(o.Traceback) { toSerialize["traceback"] = o.Traceback } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableFlowErrorChallenge struct { diff --git a/model_flow_import_result.go b/model_flow_import_result.go index c7ffb877d..4905a5d22 100644 --- a/model_flow_import_result.go +++ b/model_flow_import_result.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the FlowImportResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FlowImportResult{} + // FlowImportResult Logs of an attempted flow import type FlowImportResult struct { Logs []map[string]interface{} `json:"logs"` @@ -89,16 +92,20 @@ func (o *FlowImportResult) SetSuccess(v bool) { } func (o FlowImportResult) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["logs"] = o.Logs - } - if true { - toSerialize["success"] = o.Success + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o FlowImportResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: logs is readOnly + // skip: success is readOnly + return toSerialize, nil +} + type NullableFlowImportResult struct { value *FlowImportResult isSet bool diff --git a/model_flow_inspection.go b/model_flow_inspection.go index b1acf7d12..d19361267 100644 --- a/model_flow_inspection.go +++ b/model_flow_inspection.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the FlowInspection type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FlowInspection{} + // FlowInspection Serializer for inspect endpoint type FlowInspection struct { Plans []FlowInspectorPlan `json:"plans"` @@ -67,7 +70,7 @@ func (o *FlowInspection) SetPlans(v []FlowInspectorPlan) { // GetCurrentPlan returns the CurrentPlan field value if set, zero value otherwise. func (o *FlowInspection) GetCurrentPlan() FlowInspectorPlan { - if o == nil || o.CurrentPlan == nil { + if o == nil || IsNil(o.CurrentPlan) { var ret FlowInspectorPlan return ret } @@ -77,7 +80,7 @@ func (o *FlowInspection) GetCurrentPlan() FlowInspectorPlan { // GetCurrentPlanOk returns a tuple with the CurrentPlan field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *FlowInspection) GetCurrentPlanOk() (*FlowInspectorPlan, bool) { - if o == nil || o.CurrentPlan == nil { + if o == nil || IsNil(o.CurrentPlan) { return nil, false } return o.CurrentPlan, true @@ -85,7 +88,7 @@ func (o *FlowInspection) GetCurrentPlanOk() (*FlowInspectorPlan, bool) { // HasCurrentPlan returns a boolean if a field has been set. func (o *FlowInspection) HasCurrentPlan() bool { - if o != nil && o.CurrentPlan != nil { + if o != nil && !IsNil(o.CurrentPlan) { return true } @@ -122,17 +125,21 @@ func (o *FlowInspection) SetIsCompleted(v bool) { } func (o FlowInspection) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["plans"] = o.Plans + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.CurrentPlan != nil { + return json.Marshal(toSerialize) +} + +func (o FlowInspection) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["plans"] = o.Plans + if !IsNil(o.CurrentPlan) { toSerialize["current_plan"] = o.CurrentPlan } - if true { - toSerialize["is_completed"] = o.IsCompleted - } - return json.Marshal(toSerialize) + toSerialize["is_completed"] = o.IsCompleted + return toSerialize, nil } type NullableFlowInspection struct { diff --git a/model_flow_inspector_plan.go b/model_flow_inspector_plan.go index 11489895c..641c819a4 100644 --- a/model_flow_inspector_plan.go +++ b/model_flow_inspector_plan.go @@ -15,10 +15,13 @@ import ( "encoding/json" ) +// checks if the FlowInspectorPlan type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FlowInspectorPlan{} + // FlowInspectorPlan Serializer for an active FlowPlan type FlowInspectorPlan struct { - CurrentStage FlowInspectorPlanCurrentStage `json:"current_stage"` - NextPlannedStage FlowInspectorPlanCurrentStage `json:"next_planned_stage"` + CurrentStage FlowStageBinding `json:"current_stage"` + NextPlannedStage FlowStageBinding `json:"next_planned_stage"` // Get the plan's context, sanitized PlanContext map[string]interface{} `json:"plan_context"` // Get a unique session ID @@ -29,7 +32,7 @@ type FlowInspectorPlan struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewFlowInspectorPlan(currentStage FlowInspectorPlanCurrentStage, nextPlannedStage FlowInspectorPlanCurrentStage, planContext map[string]interface{}, sessionId string) *FlowInspectorPlan { +func NewFlowInspectorPlan(currentStage FlowStageBinding, nextPlannedStage FlowStageBinding, planContext map[string]interface{}, sessionId string) *FlowInspectorPlan { this := FlowInspectorPlan{} this.CurrentStage = currentStage this.NextPlannedStage = nextPlannedStage @@ -47,9 +50,9 @@ func NewFlowInspectorPlanWithDefaults() *FlowInspectorPlan { } // GetCurrentStage returns the CurrentStage field value -func (o *FlowInspectorPlan) GetCurrentStage() FlowInspectorPlanCurrentStage { +func (o *FlowInspectorPlan) GetCurrentStage() FlowStageBinding { if o == nil { - var ret FlowInspectorPlanCurrentStage + var ret FlowStageBinding return ret } @@ -58,7 +61,7 @@ func (o *FlowInspectorPlan) GetCurrentStage() FlowInspectorPlanCurrentStage { // GetCurrentStageOk returns a tuple with the CurrentStage field value // and a boolean to check if the value has been set. -func (o *FlowInspectorPlan) GetCurrentStageOk() (*FlowInspectorPlanCurrentStage, bool) { +func (o *FlowInspectorPlan) GetCurrentStageOk() (*FlowStageBinding, bool) { if o == nil { return nil, false } @@ -66,14 +69,14 @@ func (o *FlowInspectorPlan) GetCurrentStageOk() (*FlowInspectorPlanCurrentStage, } // SetCurrentStage sets field value -func (o *FlowInspectorPlan) SetCurrentStage(v FlowInspectorPlanCurrentStage) { +func (o *FlowInspectorPlan) SetCurrentStage(v FlowStageBinding) { o.CurrentStage = v } // GetNextPlannedStage returns the NextPlannedStage field value -func (o *FlowInspectorPlan) GetNextPlannedStage() FlowInspectorPlanCurrentStage { +func (o *FlowInspectorPlan) GetNextPlannedStage() FlowStageBinding { if o == nil { - var ret FlowInspectorPlanCurrentStage + var ret FlowStageBinding return ret } @@ -82,7 +85,7 @@ func (o *FlowInspectorPlan) GetNextPlannedStage() FlowInspectorPlanCurrentStage // GetNextPlannedStageOk returns a tuple with the NextPlannedStage field value // and a boolean to check if the value has been set. -func (o *FlowInspectorPlan) GetNextPlannedStageOk() (*FlowInspectorPlanCurrentStage, bool) { +func (o *FlowInspectorPlan) GetNextPlannedStageOk() (*FlowStageBinding, bool) { if o == nil { return nil, false } @@ -90,7 +93,7 @@ func (o *FlowInspectorPlan) GetNextPlannedStageOk() (*FlowInspectorPlanCurrentSt } // SetNextPlannedStage sets field value -func (o *FlowInspectorPlan) SetNextPlannedStage(v FlowInspectorPlanCurrentStage) { +func (o *FlowInspectorPlan) SetNextPlannedStage(v FlowStageBinding) { o.NextPlannedStage = v } @@ -108,7 +111,7 @@ func (o *FlowInspectorPlan) GetPlanContext() map[string]interface{} { // and a boolean to check if the value has been set. func (o *FlowInspectorPlan) GetPlanContextOk() (map[string]interface{}, bool) { if o == nil { - return nil, false + return map[string]interface{}{}, false } return o.PlanContext, true } @@ -143,22 +146,22 @@ func (o *FlowInspectorPlan) SetSessionId(v string) { } func (o FlowInspectorPlan) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["current_stage"] = o.CurrentStage - } - if true { - toSerialize["next_planned_stage"] = o.NextPlannedStage - } - if true { - toSerialize["plan_context"] = o.PlanContext - } - if true { - toSerialize["session_id"] = o.SessionId + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o FlowInspectorPlan) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: current_stage is readOnly + // skip: next_planned_stage is readOnly + // skip: plan_context is readOnly + // skip: session_id is readOnly + return toSerialize, nil +} + type NullableFlowInspectorPlan struct { value *FlowInspectorPlan isSet bool diff --git a/model_flow_inspector_plan_current_stage.go b/model_flow_inspector_plan_current_stage.go deleted file mode 100644 index 27e43249f..000000000 --- a/model_flow_inspector_plan_current_stage.go +++ /dev/null @@ -1,410 +0,0 @@ -/* -authentik - -Making authentication simple. - -API version: 2023.3.1 -Contact: hello@goauthentik.io -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package api - -import ( - "encoding/json" -) - -// FlowInspectorPlanCurrentStage struct for FlowInspectorPlanCurrentStage -type FlowInspectorPlanCurrentStage struct { - Pk string `json:"pk"` - PolicybindingmodelPtrId string `json:"policybindingmodel_ptr_id"` - Target string `json:"target"` - Stage string `json:"stage"` - StageObj FlowStageBindingStageObj `json:"stage_obj"` - // Evaluate policies during the Flow planning process. - EvaluateOnPlan *bool `json:"evaluate_on_plan,omitempty"` - // Evaluate policies when the Stage is present to the user. - ReEvaluatePolicies *bool `json:"re_evaluate_policies,omitempty"` - Order int32 `json:"order"` - PolicyEngineMode *PolicyEngineMode `json:"policy_engine_mode,omitempty"` - // Configure how the flow executor should handle an invalid response to a challenge. RETRY returns the error message and a similar challenge to the executor. RESTART restarts the flow from the beginning, and RESTART_WITH_CONTEXT restarts the flow while keeping the current context. * `retry` - Retry * `restart` - Restart * `restart_with_context` - Restart With Context - InvalidResponseAction NullableInvalidResponseActionEnum `json:"invalid_response_action,omitempty"` -} - -// NewFlowInspectorPlanCurrentStage instantiates a new FlowInspectorPlanCurrentStage object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewFlowInspectorPlanCurrentStage(pk string, policybindingmodelPtrId string, target string, stage string, stageObj FlowStageBindingStageObj, order int32) *FlowInspectorPlanCurrentStage { - this := FlowInspectorPlanCurrentStage{} - this.Pk = pk - this.PolicybindingmodelPtrId = policybindingmodelPtrId - this.Target = target - this.Stage = stage - this.StageObj = stageObj - this.Order = order - return &this -} - -// NewFlowInspectorPlanCurrentStageWithDefaults instantiates a new FlowInspectorPlanCurrentStage object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewFlowInspectorPlanCurrentStageWithDefaults() *FlowInspectorPlanCurrentStage { - this := FlowInspectorPlanCurrentStage{} - return &this -} - -// GetPk returns the Pk field value -func (o *FlowInspectorPlanCurrentStage) GetPk() string { - if o == nil { - var ret string - return ret - } - - return o.Pk -} - -// GetPkOk returns a tuple with the Pk field value -// and a boolean to check if the value has been set. -func (o *FlowInspectorPlanCurrentStage) GetPkOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Pk, true -} - -// SetPk sets field value -func (o *FlowInspectorPlanCurrentStage) SetPk(v string) { - o.Pk = v -} - -// GetPolicybindingmodelPtrId returns the PolicybindingmodelPtrId field value -func (o *FlowInspectorPlanCurrentStage) GetPolicybindingmodelPtrId() string { - if o == nil { - var ret string - return ret - } - - return o.PolicybindingmodelPtrId -} - -// GetPolicybindingmodelPtrIdOk returns a tuple with the PolicybindingmodelPtrId field value -// and a boolean to check if the value has been set. -func (o *FlowInspectorPlanCurrentStage) GetPolicybindingmodelPtrIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.PolicybindingmodelPtrId, true -} - -// SetPolicybindingmodelPtrId sets field value -func (o *FlowInspectorPlanCurrentStage) SetPolicybindingmodelPtrId(v string) { - o.PolicybindingmodelPtrId = v -} - -// GetTarget returns the Target field value -func (o *FlowInspectorPlanCurrentStage) GetTarget() string { - if o == nil { - var ret string - return ret - } - - return o.Target -} - -// GetTargetOk returns a tuple with the Target field value -// and a boolean to check if the value has been set. -func (o *FlowInspectorPlanCurrentStage) GetTargetOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Target, true -} - -// SetTarget sets field value -func (o *FlowInspectorPlanCurrentStage) SetTarget(v string) { - o.Target = v -} - -// GetStage returns the Stage field value -func (o *FlowInspectorPlanCurrentStage) GetStage() string { - if o == nil { - var ret string - return ret - } - - return o.Stage -} - -// GetStageOk returns a tuple with the Stage field value -// and a boolean to check if the value has been set. -func (o *FlowInspectorPlanCurrentStage) GetStageOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Stage, true -} - -// SetStage sets field value -func (o *FlowInspectorPlanCurrentStage) SetStage(v string) { - o.Stage = v -} - -// GetStageObj returns the StageObj field value -func (o *FlowInspectorPlanCurrentStage) GetStageObj() FlowStageBindingStageObj { - if o == nil { - var ret FlowStageBindingStageObj - return ret - } - - return o.StageObj -} - -// GetStageObjOk returns a tuple with the StageObj field value -// and a boolean to check if the value has been set. -func (o *FlowInspectorPlanCurrentStage) GetStageObjOk() (*FlowStageBindingStageObj, bool) { - if o == nil { - return nil, false - } - return &o.StageObj, true -} - -// SetStageObj sets field value -func (o *FlowInspectorPlanCurrentStage) SetStageObj(v FlowStageBindingStageObj) { - o.StageObj = v -} - -// GetEvaluateOnPlan returns the EvaluateOnPlan field value if set, zero value otherwise. -func (o *FlowInspectorPlanCurrentStage) GetEvaluateOnPlan() bool { - if o == nil || o.EvaluateOnPlan == nil { - var ret bool - return ret - } - return *o.EvaluateOnPlan -} - -// GetEvaluateOnPlanOk returns a tuple with the EvaluateOnPlan field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *FlowInspectorPlanCurrentStage) GetEvaluateOnPlanOk() (*bool, bool) { - if o == nil || o.EvaluateOnPlan == nil { - return nil, false - } - return o.EvaluateOnPlan, true -} - -// HasEvaluateOnPlan returns a boolean if a field has been set. -func (o *FlowInspectorPlanCurrentStage) HasEvaluateOnPlan() bool { - if o != nil && o.EvaluateOnPlan != nil { - return true - } - - return false -} - -// SetEvaluateOnPlan gets a reference to the given bool and assigns it to the EvaluateOnPlan field. -func (o *FlowInspectorPlanCurrentStage) SetEvaluateOnPlan(v bool) { - o.EvaluateOnPlan = &v -} - -// GetReEvaluatePolicies returns the ReEvaluatePolicies field value if set, zero value otherwise. -func (o *FlowInspectorPlanCurrentStage) GetReEvaluatePolicies() bool { - if o == nil || o.ReEvaluatePolicies == nil { - var ret bool - return ret - } - return *o.ReEvaluatePolicies -} - -// GetReEvaluatePoliciesOk returns a tuple with the ReEvaluatePolicies field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *FlowInspectorPlanCurrentStage) GetReEvaluatePoliciesOk() (*bool, bool) { - if o == nil || o.ReEvaluatePolicies == nil { - return nil, false - } - return o.ReEvaluatePolicies, true -} - -// HasReEvaluatePolicies returns a boolean if a field has been set. -func (o *FlowInspectorPlanCurrentStage) HasReEvaluatePolicies() bool { - if o != nil && o.ReEvaluatePolicies != nil { - return true - } - - return false -} - -// SetReEvaluatePolicies gets a reference to the given bool and assigns it to the ReEvaluatePolicies field. -func (o *FlowInspectorPlanCurrentStage) SetReEvaluatePolicies(v bool) { - o.ReEvaluatePolicies = &v -} - -// GetOrder returns the Order field value -func (o *FlowInspectorPlanCurrentStage) GetOrder() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.Order -} - -// GetOrderOk returns a tuple with the Order field value -// and a boolean to check if the value has been set. -func (o *FlowInspectorPlanCurrentStage) GetOrderOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.Order, true -} - -// SetOrder sets field value -func (o *FlowInspectorPlanCurrentStage) SetOrder(v int32) { - o.Order = v -} - -// GetPolicyEngineMode returns the PolicyEngineMode field value if set, zero value otherwise. -func (o *FlowInspectorPlanCurrentStage) GetPolicyEngineMode() PolicyEngineMode { - if o == nil || o.PolicyEngineMode == nil { - var ret PolicyEngineMode - return ret - } - return *o.PolicyEngineMode -} - -// GetPolicyEngineModeOk returns a tuple with the PolicyEngineMode field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *FlowInspectorPlanCurrentStage) GetPolicyEngineModeOk() (*PolicyEngineMode, bool) { - if o == nil || o.PolicyEngineMode == nil { - return nil, false - } - return o.PolicyEngineMode, true -} - -// HasPolicyEngineMode returns a boolean if a field has been set. -func (o *FlowInspectorPlanCurrentStage) HasPolicyEngineMode() bool { - if o != nil && o.PolicyEngineMode != nil { - return true - } - - return false -} - -// SetPolicyEngineMode gets a reference to the given PolicyEngineMode and assigns it to the PolicyEngineMode field. -func (o *FlowInspectorPlanCurrentStage) SetPolicyEngineMode(v PolicyEngineMode) { - o.PolicyEngineMode = &v -} - -// GetInvalidResponseAction returns the InvalidResponseAction field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *FlowInspectorPlanCurrentStage) GetInvalidResponseAction() InvalidResponseActionEnum { - if o == nil || o.InvalidResponseAction.Get() == nil { - var ret InvalidResponseActionEnum - return ret - } - return *o.InvalidResponseAction.Get() -} - -// GetInvalidResponseActionOk returns a tuple with the InvalidResponseAction field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FlowInspectorPlanCurrentStage) GetInvalidResponseActionOk() (*InvalidResponseActionEnum, bool) { - if o == nil { - return nil, false - } - return o.InvalidResponseAction.Get(), o.InvalidResponseAction.IsSet() -} - -// HasInvalidResponseAction returns a boolean if a field has been set. -func (o *FlowInspectorPlanCurrentStage) HasInvalidResponseAction() bool { - if o != nil && o.InvalidResponseAction.IsSet() { - return true - } - - return false -} - -// SetInvalidResponseAction gets a reference to the given NullableInvalidResponseActionEnum and assigns it to the InvalidResponseAction field. -func (o *FlowInspectorPlanCurrentStage) SetInvalidResponseAction(v InvalidResponseActionEnum) { - o.InvalidResponseAction.Set(&v) -} - -// SetInvalidResponseActionNil sets the value for InvalidResponseAction to be an explicit nil -func (o *FlowInspectorPlanCurrentStage) SetInvalidResponseActionNil() { - o.InvalidResponseAction.Set(nil) -} - -// UnsetInvalidResponseAction ensures that no value is present for InvalidResponseAction, not even an explicit nil -func (o *FlowInspectorPlanCurrentStage) UnsetInvalidResponseAction() { - o.InvalidResponseAction.Unset() -} - -func (o FlowInspectorPlanCurrentStage) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["policybindingmodel_ptr_id"] = o.PolicybindingmodelPtrId - } - if true { - toSerialize["target"] = o.Target - } - if true { - toSerialize["stage"] = o.Stage - } - if true { - toSerialize["stage_obj"] = o.StageObj - } - if o.EvaluateOnPlan != nil { - toSerialize["evaluate_on_plan"] = o.EvaluateOnPlan - } - if o.ReEvaluatePolicies != nil { - toSerialize["re_evaluate_policies"] = o.ReEvaluatePolicies - } - if true { - toSerialize["order"] = o.Order - } - if o.PolicyEngineMode != nil { - toSerialize["policy_engine_mode"] = o.PolicyEngineMode - } - if o.InvalidResponseAction.IsSet() { - toSerialize["invalid_response_action"] = o.InvalidResponseAction.Get() - } - return json.Marshal(toSerialize) -} - -type NullableFlowInspectorPlanCurrentStage struct { - value *FlowInspectorPlanCurrentStage - isSet bool -} - -func (v NullableFlowInspectorPlanCurrentStage) Get() *FlowInspectorPlanCurrentStage { - return v.value -} - -func (v *NullableFlowInspectorPlanCurrentStage) Set(val *FlowInspectorPlanCurrentStage) { - v.value = val - v.isSet = true -} - -func (v NullableFlowInspectorPlanCurrentStage) IsSet() bool { - return v.isSet -} - -func (v *NullableFlowInspectorPlanCurrentStage) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFlowInspectorPlanCurrentStage(val *FlowInspectorPlanCurrentStage) *NullableFlowInspectorPlanCurrentStage { - return &NullableFlowInspectorPlanCurrentStage{value: val, isSet: true} -} - -func (v NullableFlowInspectorPlanCurrentStage) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFlowInspectorPlanCurrentStage) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/model_flow_request.go b/model_flow_request.go index 41049aa50..abe6addaf 100644 --- a/model_flow_request.go +++ b/model_flow_request.go @@ -15,30 +15,30 @@ import ( "encoding/json" ) +// checks if the FlowRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FlowRequest{} + // FlowRequest Flow Serializer type FlowRequest struct { Name string `json:"name"` // Visible in the URL. Slug string `json:"slug"` // Shown as the Title in Flow pages. - Title string `json:"title"` - // Decides what this Flow is used for. For example, the Authentication flow is redirect to when an un-authenticated user visits authentik. * `authentication` - Authentication * `authorization` - Authorization * `invalidation` - Invalidation * `enrollment` - Enrollment * `unenrollment` - Unrenollment * `recovery` - Recovery * `stage_configuration` - Stage Configuration - Designation NullableFlowDesignationEnum `json:"designation"` - PolicyEngineMode *PolicyEngineMode `json:"policy_engine_mode,omitempty"` + Title string `json:"title"` + Designation FlowDesignationEnum `json:"designation"` + PolicyEngineMode *PolicyEngineMode `json:"policy_engine_mode,omitempty"` // Enable compatibility mode, increases compatibility with password managers on mobile devices. - CompatibilityMode *bool `json:"compatibility_mode,omitempty"` - Layout *LayoutEnum `json:"layout,omitempty"` - // Configure what should happen when a flow denies access to a user. * `message_continue` - Message Continue * `message` - Message * `continue` - Continue - DeniedAction NullableDeniedActionEnum `json:"denied_action,omitempty"` - // Required level of authentication and authorization to access a flow. * `none` - None * `require_authenticated` - Require Authenticated * `require_unauthenticated` - Require Unauthenticated * `require_superuser` - Require Superuser - Authentication NullableAuthenticationEnum `json:"authentication,omitempty"` + CompatibilityMode *bool `json:"compatibility_mode,omitempty"` + Layout *LayoutEnum `json:"layout,omitempty"` + DeniedAction *DeniedActionEnum `json:"denied_action,omitempty"` + Authentication *AuthenticationEnum `json:"authentication,omitempty"` } // NewFlowRequest instantiates a new FlowRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewFlowRequest(name string, slug string, title string, designation NullableFlowDesignationEnum) *FlowRequest { +func NewFlowRequest(name string, slug string, title string, designation FlowDesignationEnum) *FlowRequest { this := FlowRequest{} this.Name = name this.Slug = slug @@ -128,34 +128,32 @@ func (o *FlowRequest) SetTitle(v string) { } // GetDesignation returns the Designation field value -// If the value is explicit nil, the zero value for FlowDesignationEnum will be returned func (o *FlowRequest) GetDesignation() FlowDesignationEnum { - if o == nil || o.Designation.Get() == nil { + if o == nil { var ret FlowDesignationEnum return ret } - return *o.Designation.Get() + return o.Designation } // GetDesignationOk returns a tuple with the Designation field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *FlowRequest) GetDesignationOk() (*FlowDesignationEnum, bool) { if o == nil { return nil, false } - return o.Designation.Get(), o.Designation.IsSet() + return &o.Designation, true } // SetDesignation sets field value func (o *FlowRequest) SetDesignation(v FlowDesignationEnum) { - o.Designation.Set(&v) + o.Designation = v } // GetPolicyEngineMode returns the PolicyEngineMode field value if set, zero value otherwise. func (o *FlowRequest) GetPolicyEngineMode() PolicyEngineMode { - if o == nil || o.PolicyEngineMode == nil { + if o == nil || IsNil(o.PolicyEngineMode) { var ret PolicyEngineMode return ret } @@ -165,7 +163,7 @@ func (o *FlowRequest) GetPolicyEngineMode() PolicyEngineMode { // GetPolicyEngineModeOk returns a tuple with the PolicyEngineMode field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *FlowRequest) GetPolicyEngineModeOk() (*PolicyEngineMode, bool) { - if o == nil || o.PolicyEngineMode == nil { + if o == nil || IsNil(o.PolicyEngineMode) { return nil, false } return o.PolicyEngineMode, true @@ -173,7 +171,7 @@ func (o *FlowRequest) GetPolicyEngineModeOk() (*PolicyEngineMode, bool) { // HasPolicyEngineMode returns a boolean if a field has been set. func (o *FlowRequest) HasPolicyEngineMode() bool { - if o != nil && o.PolicyEngineMode != nil { + if o != nil && !IsNil(o.PolicyEngineMode) { return true } @@ -187,7 +185,7 @@ func (o *FlowRequest) SetPolicyEngineMode(v PolicyEngineMode) { // GetCompatibilityMode returns the CompatibilityMode field value if set, zero value otherwise. func (o *FlowRequest) GetCompatibilityMode() bool { - if o == nil || o.CompatibilityMode == nil { + if o == nil || IsNil(o.CompatibilityMode) { var ret bool return ret } @@ -197,7 +195,7 @@ func (o *FlowRequest) GetCompatibilityMode() bool { // GetCompatibilityModeOk returns a tuple with the CompatibilityMode field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *FlowRequest) GetCompatibilityModeOk() (*bool, bool) { - if o == nil || o.CompatibilityMode == nil { + if o == nil || IsNil(o.CompatibilityMode) { return nil, false } return o.CompatibilityMode, true @@ -205,7 +203,7 @@ func (o *FlowRequest) GetCompatibilityModeOk() (*bool, bool) { // HasCompatibilityMode returns a boolean if a field has been set. func (o *FlowRequest) HasCompatibilityMode() bool { - if o != nil && o.CompatibilityMode != nil { + if o != nil && !IsNil(o.CompatibilityMode) { return true } @@ -219,7 +217,7 @@ func (o *FlowRequest) SetCompatibilityMode(v bool) { // GetLayout returns the Layout field value if set, zero value otherwise. func (o *FlowRequest) GetLayout() LayoutEnum { - if o == nil || o.Layout == nil { + if o == nil || IsNil(o.Layout) { var ret LayoutEnum return ret } @@ -229,7 +227,7 @@ func (o *FlowRequest) GetLayout() LayoutEnum { // GetLayoutOk returns a tuple with the Layout field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *FlowRequest) GetLayoutOk() (*LayoutEnum, bool) { - if o == nil || o.Layout == nil { + if o == nil || IsNil(o.Layout) { return nil, false } return o.Layout, true @@ -237,7 +235,7 @@ func (o *FlowRequest) GetLayoutOk() (*LayoutEnum, bool) { // HasLayout returns a boolean if a field has been set. func (o *FlowRequest) HasLayout() bool { - if o != nil && o.Layout != nil { + if o != nil && !IsNil(o.Layout) { return true } @@ -249,122 +247,100 @@ func (o *FlowRequest) SetLayout(v LayoutEnum) { o.Layout = &v } -// GetDeniedAction returns the DeniedAction field value if set, zero value otherwise (both if not set or set to explicit null). +// GetDeniedAction returns the DeniedAction field value if set, zero value otherwise. func (o *FlowRequest) GetDeniedAction() DeniedActionEnum { - if o == nil || o.DeniedAction.Get() == nil { + if o == nil || IsNil(o.DeniedAction) { var ret DeniedActionEnum return ret } - return *o.DeniedAction.Get() + return *o.DeniedAction } // GetDeniedActionOk returns a tuple with the DeniedAction field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *FlowRequest) GetDeniedActionOk() (*DeniedActionEnum, bool) { - if o == nil { + if o == nil || IsNil(o.DeniedAction) { return nil, false } - return o.DeniedAction.Get(), o.DeniedAction.IsSet() + return o.DeniedAction, true } // HasDeniedAction returns a boolean if a field has been set. func (o *FlowRequest) HasDeniedAction() bool { - if o != nil && o.DeniedAction.IsSet() { + if o != nil && !IsNil(o.DeniedAction) { return true } return false } -// SetDeniedAction gets a reference to the given NullableDeniedActionEnum and assigns it to the DeniedAction field. +// SetDeniedAction gets a reference to the given DeniedActionEnum and assigns it to the DeniedAction field. func (o *FlowRequest) SetDeniedAction(v DeniedActionEnum) { - o.DeniedAction.Set(&v) -} - -// SetDeniedActionNil sets the value for DeniedAction to be an explicit nil -func (o *FlowRequest) SetDeniedActionNil() { - o.DeniedAction.Set(nil) + o.DeniedAction = &v } -// UnsetDeniedAction ensures that no value is present for DeniedAction, not even an explicit nil -func (o *FlowRequest) UnsetDeniedAction() { - o.DeniedAction.Unset() -} - -// GetAuthentication returns the Authentication field value if set, zero value otherwise (both if not set or set to explicit null). +// GetAuthentication returns the Authentication field value if set, zero value otherwise. func (o *FlowRequest) GetAuthentication() AuthenticationEnum { - if o == nil || o.Authentication.Get() == nil { + if o == nil || IsNil(o.Authentication) { var ret AuthenticationEnum return ret } - return *o.Authentication.Get() + return *o.Authentication } // GetAuthenticationOk returns a tuple with the Authentication field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *FlowRequest) GetAuthenticationOk() (*AuthenticationEnum, bool) { - if o == nil { + if o == nil || IsNil(o.Authentication) { return nil, false } - return o.Authentication.Get(), o.Authentication.IsSet() + return o.Authentication, true } // HasAuthentication returns a boolean if a field has been set. func (o *FlowRequest) HasAuthentication() bool { - if o != nil && o.Authentication.IsSet() { + if o != nil && !IsNil(o.Authentication) { return true } return false } -// SetAuthentication gets a reference to the given NullableAuthenticationEnum and assigns it to the Authentication field. +// SetAuthentication gets a reference to the given AuthenticationEnum and assigns it to the Authentication field. func (o *FlowRequest) SetAuthentication(v AuthenticationEnum) { - o.Authentication.Set(&v) -} - -// SetAuthenticationNil sets the value for Authentication to be an explicit nil -func (o *FlowRequest) SetAuthenticationNil() { - o.Authentication.Set(nil) + o.Authentication = &v } -// UnsetAuthentication ensures that no value is present for Authentication, not even an explicit nil -func (o *FlowRequest) UnsetAuthentication() { - o.Authentication.Unset() +func (o FlowRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) } -func (o FlowRequest) MarshalJSON() ([]byte, error) { +func (o FlowRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["slug"] = o.Slug - } - if true { - toSerialize["title"] = o.Title - } - if true { - toSerialize["designation"] = o.Designation.Get() - } - if o.PolicyEngineMode != nil { + toSerialize["name"] = o.Name + toSerialize["slug"] = o.Slug + toSerialize["title"] = o.Title + toSerialize["designation"] = o.Designation + if !IsNil(o.PolicyEngineMode) { toSerialize["policy_engine_mode"] = o.PolicyEngineMode } - if o.CompatibilityMode != nil { + if !IsNil(o.CompatibilityMode) { toSerialize["compatibility_mode"] = o.CompatibilityMode } - if o.Layout != nil { + if !IsNil(o.Layout) { toSerialize["layout"] = o.Layout } - if o.DeniedAction.IsSet() { - toSerialize["denied_action"] = o.DeniedAction.Get() + if !IsNil(o.DeniedAction) { + toSerialize["denied_action"] = o.DeniedAction } - if o.Authentication.IsSet() { - toSerialize["authentication"] = o.Authentication.Get() + if !IsNil(o.Authentication) { + toSerialize["authentication"] = o.Authentication } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableFlowRequest struct { diff --git a/model_flow_set.go b/model_flow_set.go index d9c0b5e52..9c0e8d080 100644 --- a/model_flow_set.go +++ b/model_flow_set.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the FlowSet type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FlowSet{} + // FlowSet Stripped down flow serializer type FlowSet struct { Pk string `json:"pk"` @@ -23,26 +26,24 @@ type FlowSet struct { // Visible in the URL. Slug string `json:"slug"` // Shown as the Title in Flow pages. - Title string `json:"title"` - // Decides what this Flow is used for. For example, the Authentication flow is redirect to when an un-authenticated user visits authentik. * `authentication` - Authentication * `authorization` - Authorization * `invalidation` - Invalidation * `enrollment` - Enrollment * `unenrollment` - Unrenollment * `recovery` - Recovery * `stage_configuration` - Stage Configuration - Designation NullableFlowDesignationEnum `json:"designation"` + Title string `json:"title"` + Designation FlowDesignationEnum `json:"designation"` // Get the URL to the background image. If the name is /static or starts with http it is returned as-is Background string `json:"background"` PolicyEngineMode *PolicyEngineMode `json:"policy_engine_mode,omitempty"` // Enable compatibility mode, increases compatibility with password managers on mobile devices. CompatibilityMode *bool `json:"compatibility_mode,omitempty"` // Get export URL for flow - ExportUrl string `json:"export_url"` - Layout *LayoutEnum `json:"layout,omitempty"` - // Configure what should happen when a flow denies access to a user. * `message_continue` - Message Continue * `message` - Message * `continue` - Continue - DeniedAction NullableDeniedActionEnum `json:"denied_action,omitempty"` + ExportUrl string `json:"export_url"` + Layout *LayoutEnum `json:"layout,omitempty"` + DeniedAction *DeniedActionEnum `json:"denied_action,omitempty"` } // NewFlowSet instantiates a new FlowSet object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewFlowSet(pk string, policybindingmodelPtrId string, name string, slug string, title string, designation NullableFlowDesignationEnum, background string, exportUrl string) *FlowSet { +func NewFlowSet(pk string, policybindingmodelPtrId string, name string, slug string, title string, designation FlowDesignationEnum, background string, exportUrl string) *FlowSet { this := FlowSet{} this.Pk = pk this.PolicybindingmodelPtrId = policybindingmodelPtrId @@ -184,29 +185,27 @@ func (o *FlowSet) SetTitle(v string) { } // GetDesignation returns the Designation field value -// If the value is explicit nil, the zero value for FlowDesignationEnum will be returned func (o *FlowSet) GetDesignation() FlowDesignationEnum { - if o == nil || o.Designation.Get() == nil { + if o == nil { var ret FlowDesignationEnum return ret } - return *o.Designation.Get() + return o.Designation } // GetDesignationOk returns a tuple with the Designation field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *FlowSet) GetDesignationOk() (*FlowDesignationEnum, bool) { if o == nil { return nil, false } - return o.Designation.Get(), o.Designation.IsSet() + return &o.Designation, true } // SetDesignation sets field value func (o *FlowSet) SetDesignation(v FlowDesignationEnum) { - o.Designation.Set(&v) + o.Designation = v } // GetBackground returns the Background field value @@ -235,7 +234,7 @@ func (o *FlowSet) SetBackground(v string) { // GetPolicyEngineMode returns the PolicyEngineMode field value if set, zero value otherwise. func (o *FlowSet) GetPolicyEngineMode() PolicyEngineMode { - if o == nil || o.PolicyEngineMode == nil { + if o == nil || IsNil(o.PolicyEngineMode) { var ret PolicyEngineMode return ret } @@ -245,7 +244,7 @@ func (o *FlowSet) GetPolicyEngineMode() PolicyEngineMode { // GetPolicyEngineModeOk returns a tuple with the PolicyEngineMode field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *FlowSet) GetPolicyEngineModeOk() (*PolicyEngineMode, bool) { - if o == nil || o.PolicyEngineMode == nil { + if o == nil || IsNil(o.PolicyEngineMode) { return nil, false } return o.PolicyEngineMode, true @@ -253,7 +252,7 @@ func (o *FlowSet) GetPolicyEngineModeOk() (*PolicyEngineMode, bool) { // HasPolicyEngineMode returns a boolean if a field has been set. func (o *FlowSet) HasPolicyEngineMode() bool { - if o != nil && o.PolicyEngineMode != nil { + if o != nil && !IsNil(o.PolicyEngineMode) { return true } @@ -267,7 +266,7 @@ func (o *FlowSet) SetPolicyEngineMode(v PolicyEngineMode) { // GetCompatibilityMode returns the CompatibilityMode field value if set, zero value otherwise. func (o *FlowSet) GetCompatibilityMode() bool { - if o == nil || o.CompatibilityMode == nil { + if o == nil || IsNil(o.CompatibilityMode) { var ret bool return ret } @@ -277,7 +276,7 @@ func (o *FlowSet) GetCompatibilityMode() bool { // GetCompatibilityModeOk returns a tuple with the CompatibilityMode field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *FlowSet) GetCompatibilityModeOk() (*bool, bool) { - if o == nil || o.CompatibilityMode == nil { + if o == nil || IsNil(o.CompatibilityMode) { return nil, false } return o.CompatibilityMode, true @@ -285,7 +284,7 @@ func (o *FlowSet) GetCompatibilityModeOk() (*bool, bool) { // HasCompatibilityMode returns a boolean if a field has been set. func (o *FlowSet) HasCompatibilityMode() bool { - if o != nil && o.CompatibilityMode != nil { + if o != nil && !IsNil(o.CompatibilityMode) { return true } @@ -323,7 +322,7 @@ func (o *FlowSet) SetExportUrl(v string) { // GetLayout returns the Layout field value if set, zero value otherwise. func (o *FlowSet) GetLayout() LayoutEnum { - if o == nil || o.Layout == nil { + if o == nil || IsNil(o.Layout) { var ret LayoutEnum return ret } @@ -333,7 +332,7 @@ func (o *FlowSet) GetLayout() LayoutEnum { // GetLayoutOk returns a tuple with the Layout field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *FlowSet) GetLayoutOk() (*LayoutEnum, bool) { - if o == nil || o.Layout == nil { + if o == nil || IsNil(o.Layout) { return nil, false } return o.Layout, true @@ -341,7 +340,7 @@ func (o *FlowSet) GetLayoutOk() (*LayoutEnum, bool) { // HasLayout returns a boolean if a field has been set. func (o *FlowSet) HasLayout() bool { - if o != nil && o.Layout != nil { + if o != nil && !IsNil(o.Layout) { return true } @@ -353,88 +352,69 @@ func (o *FlowSet) SetLayout(v LayoutEnum) { o.Layout = &v } -// GetDeniedAction returns the DeniedAction field value if set, zero value otherwise (both if not set or set to explicit null). +// GetDeniedAction returns the DeniedAction field value if set, zero value otherwise. func (o *FlowSet) GetDeniedAction() DeniedActionEnum { - if o == nil || o.DeniedAction.Get() == nil { + if o == nil || IsNil(o.DeniedAction) { var ret DeniedActionEnum return ret } - return *o.DeniedAction.Get() + return *o.DeniedAction } // GetDeniedActionOk returns a tuple with the DeniedAction field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *FlowSet) GetDeniedActionOk() (*DeniedActionEnum, bool) { - if o == nil { + if o == nil || IsNil(o.DeniedAction) { return nil, false } - return o.DeniedAction.Get(), o.DeniedAction.IsSet() + return o.DeniedAction, true } // HasDeniedAction returns a boolean if a field has been set. func (o *FlowSet) HasDeniedAction() bool { - if o != nil && o.DeniedAction.IsSet() { + if o != nil && !IsNil(o.DeniedAction) { return true } return false } -// SetDeniedAction gets a reference to the given NullableDeniedActionEnum and assigns it to the DeniedAction field. +// SetDeniedAction gets a reference to the given DeniedActionEnum and assigns it to the DeniedAction field. func (o *FlowSet) SetDeniedAction(v DeniedActionEnum) { - o.DeniedAction.Set(&v) -} - -// SetDeniedActionNil sets the value for DeniedAction to be an explicit nil -func (o *FlowSet) SetDeniedActionNil() { - o.DeniedAction.Set(nil) + o.DeniedAction = &v } -// UnsetDeniedAction ensures that no value is present for DeniedAction, not even an explicit nil -func (o *FlowSet) UnsetDeniedAction() { - o.DeniedAction.Unset() +func (o FlowSet) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) } -func (o FlowSet) MarshalJSON() ([]byte, error) { +func (o FlowSet) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["policybindingmodel_ptr_id"] = o.PolicybindingmodelPtrId - } - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["slug"] = o.Slug - } - if true { - toSerialize["title"] = o.Title - } - if true { - toSerialize["designation"] = o.Designation.Get() - } - if true { - toSerialize["background"] = o.Background - } - if o.PolicyEngineMode != nil { + // skip: pk is readOnly + // skip: policybindingmodel_ptr_id is readOnly + toSerialize["name"] = o.Name + toSerialize["slug"] = o.Slug + toSerialize["title"] = o.Title + toSerialize["designation"] = o.Designation + // skip: background is readOnly + if !IsNil(o.PolicyEngineMode) { toSerialize["policy_engine_mode"] = o.PolicyEngineMode } - if o.CompatibilityMode != nil { + if !IsNil(o.CompatibilityMode) { toSerialize["compatibility_mode"] = o.CompatibilityMode } - if true { - toSerialize["export_url"] = o.ExportUrl - } - if o.Layout != nil { + // skip: export_url is readOnly + if !IsNil(o.Layout) { toSerialize["layout"] = o.Layout } - if o.DeniedAction.IsSet() { - toSerialize["denied_action"] = o.DeniedAction.Get() + if !IsNil(o.DeniedAction) { + toSerialize["denied_action"] = o.DeniedAction } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableFlowSet struct { diff --git a/model_flow_set_request.go b/model_flow_set_request.go index 8b56550ed..10a76420d 100644 --- a/model_flow_set_request.go +++ b/model_flow_set_request.go @@ -15,28 +15,29 @@ import ( "encoding/json" ) +// checks if the FlowSetRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FlowSetRequest{} + // FlowSetRequest Stripped down flow serializer type FlowSetRequest struct { Name string `json:"name"` // Visible in the URL. Slug string `json:"slug"` // Shown as the Title in Flow pages. - Title string `json:"title"` - // Decides what this Flow is used for. For example, the Authentication flow is redirect to when an un-authenticated user visits authentik. * `authentication` - Authentication * `authorization` - Authorization * `invalidation` - Invalidation * `enrollment` - Enrollment * `unenrollment` - Unrenollment * `recovery` - Recovery * `stage_configuration` - Stage Configuration - Designation NullableFlowDesignationEnum `json:"designation"` - PolicyEngineMode *PolicyEngineMode `json:"policy_engine_mode,omitempty"` + Title string `json:"title"` + Designation FlowDesignationEnum `json:"designation"` + PolicyEngineMode *PolicyEngineMode `json:"policy_engine_mode,omitempty"` // Enable compatibility mode, increases compatibility with password managers on mobile devices. - CompatibilityMode *bool `json:"compatibility_mode,omitempty"` - Layout *LayoutEnum `json:"layout,omitempty"` - // Configure what should happen when a flow denies access to a user. * `message_continue` - Message Continue * `message` - Message * `continue` - Continue - DeniedAction NullableDeniedActionEnum `json:"denied_action,omitempty"` + CompatibilityMode *bool `json:"compatibility_mode,omitempty"` + Layout *LayoutEnum `json:"layout,omitempty"` + DeniedAction *DeniedActionEnum `json:"denied_action,omitempty"` } // NewFlowSetRequest instantiates a new FlowSetRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewFlowSetRequest(name string, slug string, title string, designation NullableFlowDesignationEnum) *FlowSetRequest { +func NewFlowSetRequest(name string, slug string, title string, designation FlowDesignationEnum) *FlowSetRequest { this := FlowSetRequest{} this.Name = name this.Slug = slug @@ -126,34 +127,32 @@ func (o *FlowSetRequest) SetTitle(v string) { } // GetDesignation returns the Designation field value -// If the value is explicit nil, the zero value for FlowDesignationEnum will be returned func (o *FlowSetRequest) GetDesignation() FlowDesignationEnum { - if o == nil || o.Designation.Get() == nil { + if o == nil { var ret FlowDesignationEnum return ret } - return *o.Designation.Get() + return o.Designation } // GetDesignationOk returns a tuple with the Designation field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *FlowSetRequest) GetDesignationOk() (*FlowDesignationEnum, bool) { if o == nil { return nil, false } - return o.Designation.Get(), o.Designation.IsSet() + return &o.Designation, true } // SetDesignation sets field value func (o *FlowSetRequest) SetDesignation(v FlowDesignationEnum) { - o.Designation.Set(&v) + o.Designation = v } // GetPolicyEngineMode returns the PolicyEngineMode field value if set, zero value otherwise. func (o *FlowSetRequest) GetPolicyEngineMode() PolicyEngineMode { - if o == nil || o.PolicyEngineMode == nil { + if o == nil || IsNil(o.PolicyEngineMode) { var ret PolicyEngineMode return ret } @@ -163,7 +162,7 @@ func (o *FlowSetRequest) GetPolicyEngineMode() PolicyEngineMode { // GetPolicyEngineModeOk returns a tuple with the PolicyEngineMode field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *FlowSetRequest) GetPolicyEngineModeOk() (*PolicyEngineMode, bool) { - if o == nil || o.PolicyEngineMode == nil { + if o == nil || IsNil(o.PolicyEngineMode) { return nil, false } return o.PolicyEngineMode, true @@ -171,7 +170,7 @@ func (o *FlowSetRequest) GetPolicyEngineModeOk() (*PolicyEngineMode, bool) { // HasPolicyEngineMode returns a boolean if a field has been set. func (o *FlowSetRequest) HasPolicyEngineMode() bool { - if o != nil && o.PolicyEngineMode != nil { + if o != nil && !IsNil(o.PolicyEngineMode) { return true } @@ -185,7 +184,7 @@ func (o *FlowSetRequest) SetPolicyEngineMode(v PolicyEngineMode) { // GetCompatibilityMode returns the CompatibilityMode field value if set, zero value otherwise. func (o *FlowSetRequest) GetCompatibilityMode() bool { - if o == nil || o.CompatibilityMode == nil { + if o == nil || IsNil(o.CompatibilityMode) { var ret bool return ret } @@ -195,7 +194,7 @@ func (o *FlowSetRequest) GetCompatibilityMode() bool { // GetCompatibilityModeOk returns a tuple with the CompatibilityMode field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *FlowSetRequest) GetCompatibilityModeOk() (*bool, bool) { - if o == nil || o.CompatibilityMode == nil { + if o == nil || IsNil(o.CompatibilityMode) { return nil, false } return o.CompatibilityMode, true @@ -203,7 +202,7 @@ func (o *FlowSetRequest) GetCompatibilityModeOk() (*bool, bool) { // HasCompatibilityMode returns a boolean if a field has been set. func (o *FlowSetRequest) HasCompatibilityMode() bool { - if o != nil && o.CompatibilityMode != nil { + if o != nil && !IsNil(o.CompatibilityMode) { return true } @@ -217,7 +216,7 @@ func (o *FlowSetRequest) SetCompatibilityMode(v bool) { // GetLayout returns the Layout field value if set, zero value otherwise. func (o *FlowSetRequest) GetLayout() LayoutEnum { - if o == nil || o.Layout == nil { + if o == nil || IsNil(o.Layout) { var ret LayoutEnum return ret } @@ -227,7 +226,7 @@ func (o *FlowSetRequest) GetLayout() LayoutEnum { // GetLayoutOk returns a tuple with the Layout field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *FlowSetRequest) GetLayoutOk() (*LayoutEnum, bool) { - if o == nil || o.Layout == nil { + if o == nil || IsNil(o.Layout) { return nil, false } return o.Layout, true @@ -235,7 +234,7 @@ func (o *FlowSetRequest) GetLayoutOk() (*LayoutEnum, bool) { // HasLayout returns a boolean if a field has been set. func (o *FlowSetRequest) HasLayout() bool { - if o != nil && o.Layout != nil { + if o != nil && !IsNil(o.Layout) { return true } @@ -247,76 +246,65 @@ func (o *FlowSetRequest) SetLayout(v LayoutEnum) { o.Layout = &v } -// GetDeniedAction returns the DeniedAction field value if set, zero value otherwise (both if not set or set to explicit null). +// GetDeniedAction returns the DeniedAction field value if set, zero value otherwise. func (o *FlowSetRequest) GetDeniedAction() DeniedActionEnum { - if o == nil || o.DeniedAction.Get() == nil { + if o == nil || IsNil(o.DeniedAction) { var ret DeniedActionEnum return ret } - return *o.DeniedAction.Get() + return *o.DeniedAction } // GetDeniedActionOk returns a tuple with the DeniedAction field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *FlowSetRequest) GetDeniedActionOk() (*DeniedActionEnum, bool) { - if o == nil { + if o == nil || IsNil(o.DeniedAction) { return nil, false } - return o.DeniedAction.Get(), o.DeniedAction.IsSet() + return o.DeniedAction, true } // HasDeniedAction returns a boolean if a field has been set. func (o *FlowSetRequest) HasDeniedAction() bool { - if o != nil && o.DeniedAction.IsSet() { + if o != nil && !IsNil(o.DeniedAction) { return true } return false } -// SetDeniedAction gets a reference to the given NullableDeniedActionEnum and assigns it to the DeniedAction field. +// SetDeniedAction gets a reference to the given DeniedActionEnum and assigns it to the DeniedAction field. func (o *FlowSetRequest) SetDeniedAction(v DeniedActionEnum) { - o.DeniedAction.Set(&v) + o.DeniedAction = &v } -// SetDeniedActionNil sets the value for DeniedAction to be an explicit nil -func (o *FlowSetRequest) SetDeniedActionNil() { - o.DeniedAction.Set(nil) -} - -// UnsetDeniedAction ensures that no value is present for DeniedAction, not even an explicit nil -func (o *FlowSetRequest) UnsetDeniedAction() { - o.DeniedAction.Unset() +func (o FlowSetRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) } -func (o FlowSetRequest) MarshalJSON() ([]byte, error) { +func (o FlowSetRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["slug"] = o.Slug - } - if true { - toSerialize["title"] = o.Title - } - if true { - toSerialize["designation"] = o.Designation.Get() - } - if o.PolicyEngineMode != nil { + toSerialize["name"] = o.Name + toSerialize["slug"] = o.Slug + toSerialize["title"] = o.Title + toSerialize["designation"] = o.Designation + if !IsNil(o.PolicyEngineMode) { toSerialize["policy_engine_mode"] = o.PolicyEngineMode } - if o.CompatibilityMode != nil { + if !IsNil(o.CompatibilityMode) { toSerialize["compatibility_mode"] = o.CompatibilityMode } - if o.Layout != nil { + if !IsNil(o.Layout) { toSerialize["layout"] = o.Layout } - if o.DeniedAction.IsSet() { - toSerialize["denied_action"] = o.DeniedAction.Get() + if !IsNil(o.DeniedAction) { + toSerialize["denied_action"] = o.DeniedAction } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableFlowSetRequest struct { diff --git a/model_flow_stage_binding.go b/model_flow_stage_binding.go index cc959d23a..5124bfd35 100644 --- a/model_flow_stage_binding.go +++ b/model_flow_stage_binding.go @@ -15,28 +15,30 @@ import ( "encoding/json" ) +// checks if the FlowStageBinding type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FlowStageBinding{} + // FlowStageBinding FlowStageBinding Serializer type FlowStageBinding struct { - Pk string `json:"pk"` - PolicybindingmodelPtrId string `json:"policybindingmodel_ptr_id"` - Target string `json:"target"` - Stage string `json:"stage"` - StageObj FlowStageBindingStageObj `json:"stage_obj"` + Pk string `json:"pk"` + PolicybindingmodelPtrId string `json:"policybindingmodel_ptr_id"` + Target string `json:"target"` + Stage string `json:"stage"` + StageObj Stage `json:"stage_obj"` // Evaluate policies during the Flow planning process. EvaluateOnPlan *bool `json:"evaluate_on_plan,omitempty"` // Evaluate policies when the Stage is present to the user. - ReEvaluatePolicies *bool `json:"re_evaluate_policies,omitempty"` - Order int32 `json:"order"` - PolicyEngineMode *PolicyEngineMode `json:"policy_engine_mode,omitempty"` - // Configure how the flow executor should handle an invalid response to a challenge. RETRY returns the error message and a similar challenge to the executor. RESTART restarts the flow from the beginning, and RESTART_WITH_CONTEXT restarts the flow while keeping the current context. * `retry` - Retry * `restart` - Restart * `restart_with_context` - Restart With Context - InvalidResponseAction NullableInvalidResponseActionEnum `json:"invalid_response_action,omitempty"` + ReEvaluatePolicies *bool `json:"re_evaluate_policies,omitempty"` + Order int32 `json:"order"` + PolicyEngineMode *PolicyEngineMode `json:"policy_engine_mode,omitempty"` + InvalidResponseAction *InvalidResponseActionEnum `json:"invalid_response_action,omitempty"` } // NewFlowStageBinding instantiates a new FlowStageBinding object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewFlowStageBinding(pk string, policybindingmodelPtrId string, target string, stage string, stageObj FlowStageBindingStageObj, order int32) *FlowStageBinding { +func NewFlowStageBinding(pk string, policybindingmodelPtrId string, target string, stage string, stageObj Stage, order int32) *FlowStageBinding { this := FlowStageBinding{} this.Pk = pk this.PolicybindingmodelPtrId = policybindingmodelPtrId @@ -152,9 +154,9 @@ func (o *FlowStageBinding) SetStage(v string) { } // GetStageObj returns the StageObj field value -func (o *FlowStageBinding) GetStageObj() FlowStageBindingStageObj { +func (o *FlowStageBinding) GetStageObj() Stage { if o == nil { - var ret FlowStageBindingStageObj + var ret Stage return ret } @@ -163,7 +165,7 @@ func (o *FlowStageBinding) GetStageObj() FlowStageBindingStageObj { // GetStageObjOk returns a tuple with the StageObj field value // and a boolean to check if the value has been set. -func (o *FlowStageBinding) GetStageObjOk() (*FlowStageBindingStageObj, bool) { +func (o *FlowStageBinding) GetStageObjOk() (*Stage, bool) { if o == nil { return nil, false } @@ -171,13 +173,13 @@ func (o *FlowStageBinding) GetStageObjOk() (*FlowStageBindingStageObj, bool) { } // SetStageObj sets field value -func (o *FlowStageBinding) SetStageObj(v FlowStageBindingStageObj) { +func (o *FlowStageBinding) SetStageObj(v Stage) { o.StageObj = v } // GetEvaluateOnPlan returns the EvaluateOnPlan field value if set, zero value otherwise. func (o *FlowStageBinding) GetEvaluateOnPlan() bool { - if o == nil || o.EvaluateOnPlan == nil { + if o == nil || IsNil(o.EvaluateOnPlan) { var ret bool return ret } @@ -187,7 +189,7 @@ func (o *FlowStageBinding) GetEvaluateOnPlan() bool { // GetEvaluateOnPlanOk returns a tuple with the EvaluateOnPlan field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *FlowStageBinding) GetEvaluateOnPlanOk() (*bool, bool) { - if o == nil || o.EvaluateOnPlan == nil { + if o == nil || IsNil(o.EvaluateOnPlan) { return nil, false } return o.EvaluateOnPlan, true @@ -195,7 +197,7 @@ func (o *FlowStageBinding) GetEvaluateOnPlanOk() (*bool, bool) { // HasEvaluateOnPlan returns a boolean if a field has been set. func (o *FlowStageBinding) HasEvaluateOnPlan() bool { - if o != nil && o.EvaluateOnPlan != nil { + if o != nil && !IsNil(o.EvaluateOnPlan) { return true } @@ -209,7 +211,7 @@ func (o *FlowStageBinding) SetEvaluateOnPlan(v bool) { // GetReEvaluatePolicies returns the ReEvaluatePolicies field value if set, zero value otherwise. func (o *FlowStageBinding) GetReEvaluatePolicies() bool { - if o == nil || o.ReEvaluatePolicies == nil { + if o == nil || IsNil(o.ReEvaluatePolicies) { var ret bool return ret } @@ -219,7 +221,7 @@ func (o *FlowStageBinding) GetReEvaluatePolicies() bool { // GetReEvaluatePoliciesOk returns a tuple with the ReEvaluatePolicies field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *FlowStageBinding) GetReEvaluatePoliciesOk() (*bool, bool) { - if o == nil || o.ReEvaluatePolicies == nil { + if o == nil || IsNil(o.ReEvaluatePolicies) { return nil, false } return o.ReEvaluatePolicies, true @@ -227,7 +229,7 @@ func (o *FlowStageBinding) GetReEvaluatePoliciesOk() (*bool, bool) { // HasReEvaluatePolicies returns a boolean if a field has been set. func (o *FlowStageBinding) HasReEvaluatePolicies() bool { - if o != nil && o.ReEvaluatePolicies != nil { + if o != nil && !IsNil(o.ReEvaluatePolicies) { return true } @@ -265,7 +267,7 @@ func (o *FlowStageBinding) SetOrder(v int32) { // GetPolicyEngineMode returns the PolicyEngineMode field value if set, zero value otherwise. func (o *FlowStageBinding) GetPolicyEngineMode() PolicyEngineMode { - if o == nil || o.PolicyEngineMode == nil { + if o == nil || IsNil(o.PolicyEngineMode) { var ret PolicyEngineMode return ret } @@ -275,7 +277,7 @@ func (o *FlowStageBinding) GetPolicyEngineMode() PolicyEngineMode { // GetPolicyEngineModeOk returns a tuple with the PolicyEngineMode field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *FlowStageBinding) GetPolicyEngineModeOk() (*PolicyEngineMode, bool) { - if o == nil || o.PolicyEngineMode == nil { + if o == nil || IsNil(o.PolicyEngineMode) { return nil, false } return o.PolicyEngineMode, true @@ -283,7 +285,7 @@ func (o *FlowStageBinding) GetPolicyEngineModeOk() (*PolicyEngineMode, bool) { // HasPolicyEngineMode returns a boolean if a field has been set. func (o *FlowStageBinding) HasPolicyEngineMode() bool { - if o != nil && o.PolicyEngineMode != nil { + if o != nil && !IsNil(o.PolicyEngineMode) { return true } @@ -295,82 +297,67 @@ func (o *FlowStageBinding) SetPolicyEngineMode(v PolicyEngineMode) { o.PolicyEngineMode = &v } -// GetInvalidResponseAction returns the InvalidResponseAction field value if set, zero value otherwise (both if not set or set to explicit null). +// GetInvalidResponseAction returns the InvalidResponseAction field value if set, zero value otherwise. func (o *FlowStageBinding) GetInvalidResponseAction() InvalidResponseActionEnum { - if o == nil || o.InvalidResponseAction.Get() == nil { + if o == nil || IsNil(o.InvalidResponseAction) { var ret InvalidResponseActionEnum return ret } - return *o.InvalidResponseAction.Get() + return *o.InvalidResponseAction } // GetInvalidResponseActionOk returns a tuple with the InvalidResponseAction field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *FlowStageBinding) GetInvalidResponseActionOk() (*InvalidResponseActionEnum, bool) { - if o == nil { + if o == nil || IsNil(o.InvalidResponseAction) { return nil, false } - return o.InvalidResponseAction.Get(), o.InvalidResponseAction.IsSet() + return o.InvalidResponseAction, true } // HasInvalidResponseAction returns a boolean if a field has been set. func (o *FlowStageBinding) HasInvalidResponseAction() bool { - if o != nil && o.InvalidResponseAction.IsSet() { + if o != nil && !IsNil(o.InvalidResponseAction) { return true } return false } -// SetInvalidResponseAction gets a reference to the given NullableInvalidResponseActionEnum and assigns it to the InvalidResponseAction field. +// SetInvalidResponseAction gets a reference to the given InvalidResponseActionEnum and assigns it to the InvalidResponseAction field. func (o *FlowStageBinding) SetInvalidResponseAction(v InvalidResponseActionEnum) { - o.InvalidResponseAction.Set(&v) -} - -// SetInvalidResponseActionNil sets the value for InvalidResponseAction to be an explicit nil -func (o *FlowStageBinding) SetInvalidResponseActionNil() { - o.InvalidResponseAction.Set(nil) + o.InvalidResponseAction = &v } -// UnsetInvalidResponseAction ensures that no value is present for InvalidResponseAction, not even an explicit nil -func (o *FlowStageBinding) UnsetInvalidResponseAction() { - o.InvalidResponseAction.Unset() +func (o FlowStageBinding) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) } -func (o FlowStageBinding) MarshalJSON() ([]byte, error) { +func (o FlowStageBinding) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["policybindingmodel_ptr_id"] = o.PolicybindingmodelPtrId - } - if true { - toSerialize["target"] = o.Target - } - if true { - toSerialize["stage"] = o.Stage - } - if true { - toSerialize["stage_obj"] = o.StageObj - } - if o.EvaluateOnPlan != nil { + // skip: pk is readOnly + // skip: policybindingmodel_ptr_id is readOnly + toSerialize["target"] = o.Target + toSerialize["stage"] = o.Stage + // skip: stage_obj is readOnly + if !IsNil(o.EvaluateOnPlan) { toSerialize["evaluate_on_plan"] = o.EvaluateOnPlan } - if o.ReEvaluatePolicies != nil { + if !IsNil(o.ReEvaluatePolicies) { toSerialize["re_evaluate_policies"] = o.ReEvaluatePolicies } - if true { - toSerialize["order"] = o.Order - } - if o.PolicyEngineMode != nil { + toSerialize["order"] = o.Order + if !IsNil(o.PolicyEngineMode) { toSerialize["policy_engine_mode"] = o.PolicyEngineMode } - if o.InvalidResponseAction.IsSet() { - toSerialize["invalid_response_action"] = o.InvalidResponseAction.Get() + if !IsNil(o.InvalidResponseAction) { + toSerialize["invalid_response_action"] = o.InvalidResponseAction } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableFlowStageBinding struct { diff --git a/model_flow_stage_binding_request.go b/model_flow_stage_binding_request.go index 9b165a927..fad77f070 100644 --- a/model_flow_stage_binding_request.go +++ b/model_flow_stage_binding_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the FlowStageBindingRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FlowStageBindingRequest{} + // FlowStageBindingRequest FlowStageBinding Serializer type FlowStageBindingRequest struct { Target string `json:"target"` @@ -22,11 +25,10 @@ type FlowStageBindingRequest struct { // Evaluate policies during the Flow planning process. EvaluateOnPlan *bool `json:"evaluate_on_plan,omitempty"` // Evaluate policies when the Stage is present to the user. - ReEvaluatePolicies *bool `json:"re_evaluate_policies,omitempty"` - Order int32 `json:"order"` - PolicyEngineMode *PolicyEngineMode `json:"policy_engine_mode,omitempty"` - // Configure how the flow executor should handle an invalid response to a challenge. RETRY returns the error message and a similar challenge to the executor. RESTART restarts the flow from the beginning, and RESTART_WITH_CONTEXT restarts the flow while keeping the current context. * `retry` - Retry * `restart` - Restart * `restart_with_context` - Restart With Context - InvalidResponseAction NullableInvalidResponseActionEnum `json:"invalid_response_action,omitempty"` + ReEvaluatePolicies *bool `json:"re_evaluate_policies,omitempty"` + Order int32 `json:"order"` + PolicyEngineMode *PolicyEngineMode `json:"policy_engine_mode,omitempty"` + InvalidResponseAction *InvalidResponseActionEnum `json:"invalid_response_action,omitempty"` } // NewFlowStageBindingRequest instantiates a new FlowStageBindingRequest object @@ -99,7 +101,7 @@ func (o *FlowStageBindingRequest) SetStage(v string) { // GetEvaluateOnPlan returns the EvaluateOnPlan field value if set, zero value otherwise. func (o *FlowStageBindingRequest) GetEvaluateOnPlan() bool { - if o == nil || o.EvaluateOnPlan == nil { + if o == nil || IsNil(o.EvaluateOnPlan) { var ret bool return ret } @@ -109,7 +111,7 @@ func (o *FlowStageBindingRequest) GetEvaluateOnPlan() bool { // GetEvaluateOnPlanOk returns a tuple with the EvaluateOnPlan field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *FlowStageBindingRequest) GetEvaluateOnPlanOk() (*bool, bool) { - if o == nil || o.EvaluateOnPlan == nil { + if o == nil || IsNil(o.EvaluateOnPlan) { return nil, false } return o.EvaluateOnPlan, true @@ -117,7 +119,7 @@ func (o *FlowStageBindingRequest) GetEvaluateOnPlanOk() (*bool, bool) { // HasEvaluateOnPlan returns a boolean if a field has been set. func (o *FlowStageBindingRequest) HasEvaluateOnPlan() bool { - if o != nil && o.EvaluateOnPlan != nil { + if o != nil && !IsNil(o.EvaluateOnPlan) { return true } @@ -131,7 +133,7 @@ func (o *FlowStageBindingRequest) SetEvaluateOnPlan(v bool) { // GetReEvaluatePolicies returns the ReEvaluatePolicies field value if set, zero value otherwise. func (o *FlowStageBindingRequest) GetReEvaluatePolicies() bool { - if o == nil || o.ReEvaluatePolicies == nil { + if o == nil || IsNil(o.ReEvaluatePolicies) { var ret bool return ret } @@ -141,7 +143,7 @@ func (o *FlowStageBindingRequest) GetReEvaluatePolicies() bool { // GetReEvaluatePoliciesOk returns a tuple with the ReEvaluatePolicies field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *FlowStageBindingRequest) GetReEvaluatePoliciesOk() (*bool, bool) { - if o == nil || o.ReEvaluatePolicies == nil { + if o == nil || IsNil(o.ReEvaluatePolicies) { return nil, false } return o.ReEvaluatePolicies, true @@ -149,7 +151,7 @@ func (o *FlowStageBindingRequest) GetReEvaluatePoliciesOk() (*bool, bool) { // HasReEvaluatePolicies returns a boolean if a field has been set. func (o *FlowStageBindingRequest) HasReEvaluatePolicies() bool { - if o != nil && o.ReEvaluatePolicies != nil { + if o != nil && !IsNil(o.ReEvaluatePolicies) { return true } @@ -187,7 +189,7 @@ func (o *FlowStageBindingRequest) SetOrder(v int32) { // GetPolicyEngineMode returns the PolicyEngineMode field value if set, zero value otherwise. func (o *FlowStageBindingRequest) GetPolicyEngineMode() PolicyEngineMode { - if o == nil || o.PolicyEngineMode == nil { + if o == nil || IsNil(o.PolicyEngineMode) { var ret PolicyEngineMode return ret } @@ -197,7 +199,7 @@ func (o *FlowStageBindingRequest) GetPolicyEngineMode() PolicyEngineMode { // GetPolicyEngineModeOk returns a tuple with the PolicyEngineMode field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *FlowStageBindingRequest) GetPolicyEngineModeOk() (*PolicyEngineMode, bool) { - if o == nil || o.PolicyEngineMode == nil { + if o == nil || IsNil(o.PolicyEngineMode) { return nil, false } return o.PolicyEngineMode, true @@ -205,7 +207,7 @@ func (o *FlowStageBindingRequest) GetPolicyEngineModeOk() (*PolicyEngineMode, bo // HasPolicyEngineMode returns a boolean if a field has been set. func (o *FlowStageBindingRequest) HasPolicyEngineMode() bool { - if o != nil && o.PolicyEngineMode != nil { + if o != nil && !IsNil(o.PolicyEngineMode) { return true } @@ -217,73 +219,64 @@ func (o *FlowStageBindingRequest) SetPolicyEngineMode(v PolicyEngineMode) { o.PolicyEngineMode = &v } -// GetInvalidResponseAction returns the InvalidResponseAction field value if set, zero value otherwise (both if not set or set to explicit null). +// GetInvalidResponseAction returns the InvalidResponseAction field value if set, zero value otherwise. func (o *FlowStageBindingRequest) GetInvalidResponseAction() InvalidResponseActionEnum { - if o == nil || o.InvalidResponseAction.Get() == nil { + if o == nil || IsNil(o.InvalidResponseAction) { var ret InvalidResponseActionEnum return ret } - return *o.InvalidResponseAction.Get() + return *o.InvalidResponseAction } // GetInvalidResponseActionOk returns a tuple with the InvalidResponseAction field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *FlowStageBindingRequest) GetInvalidResponseActionOk() (*InvalidResponseActionEnum, bool) { - if o == nil { + if o == nil || IsNil(o.InvalidResponseAction) { return nil, false } - return o.InvalidResponseAction.Get(), o.InvalidResponseAction.IsSet() + return o.InvalidResponseAction, true } // HasInvalidResponseAction returns a boolean if a field has been set. func (o *FlowStageBindingRequest) HasInvalidResponseAction() bool { - if o != nil && o.InvalidResponseAction.IsSet() { + if o != nil && !IsNil(o.InvalidResponseAction) { return true } return false } -// SetInvalidResponseAction gets a reference to the given NullableInvalidResponseActionEnum and assigns it to the InvalidResponseAction field. +// SetInvalidResponseAction gets a reference to the given InvalidResponseActionEnum and assigns it to the InvalidResponseAction field. func (o *FlowStageBindingRequest) SetInvalidResponseAction(v InvalidResponseActionEnum) { - o.InvalidResponseAction.Set(&v) -} - -// SetInvalidResponseActionNil sets the value for InvalidResponseAction to be an explicit nil -func (o *FlowStageBindingRequest) SetInvalidResponseActionNil() { - o.InvalidResponseAction.Set(nil) + o.InvalidResponseAction = &v } -// UnsetInvalidResponseAction ensures that no value is present for InvalidResponseAction, not even an explicit nil -func (o *FlowStageBindingRequest) UnsetInvalidResponseAction() { - o.InvalidResponseAction.Unset() +func (o FlowStageBindingRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) } -func (o FlowStageBindingRequest) MarshalJSON() ([]byte, error) { +func (o FlowStageBindingRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if true { - toSerialize["target"] = o.Target - } - if true { - toSerialize["stage"] = o.Stage - } - if o.EvaluateOnPlan != nil { + toSerialize["target"] = o.Target + toSerialize["stage"] = o.Stage + if !IsNil(o.EvaluateOnPlan) { toSerialize["evaluate_on_plan"] = o.EvaluateOnPlan } - if o.ReEvaluatePolicies != nil { + if !IsNil(o.ReEvaluatePolicies) { toSerialize["re_evaluate_policies"] = o.ReEvaluatePolicies } - if true { - toSerialize["order"] = o.Order - } - if o.PolicyEngineMode != nil { + toSerialize["order"] = o.Order + if !IsNil(o.PolicyEngineMode) { toSerialize["policy_engine_mode"] = o.PolicyEngineMode } - if o.InvalidResponseAction.IsSet() { - toSerialize["invalid_response_action"] = o.InvalidResponseAction.Get() + if !IsNil(o.InvalidResponseAction) { + toSerialize["invalid_response_action"] = o.InvalidResponseAction } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableFlowStageBindingRequest struct { diff --git a/model_flow_stage_binding_stage_obj.go b/model_flow_stage_binding_stage_obj.go deleted file mode 100644 index 6aab0b5c4..000000000 --- a/model_flow_stage_binding_stage_obj.go +++ /dev/null @@ -1,292 +0,0 @@ -/* -authentik - -Making authentication simple. - -API version: 2023.3.1 -Contact: hello@goauthentik.io -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package api - -import ( - "encoding/json" -) - -// FlowStageBindingStageObj struct for FlowStageBindingStageObj -type FlowStageBindingStageObj struct { - Pk string `json:"pk"` - Name string `json:"name"` - // Get object type so that we know how to edit the object - Component string `json:"component"` - // Return object's verbose_name - VerboseName string `json:"verbose_name"` - // Return object's plural verbose_name - VerboseNamePlural string `json:"verbose_name_plural"` - // Return internal model name - MetaModelName string `json:"meta_model_name"` - FlowSet []FlowSet `json:"flow_set,omitempty"` -} - -// NewFlowStageBindingStageObj instantiates a new FlowStageBindingStageObj object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewFlowStageBindingStageObj(pk string, name string, component string, verboseName string, verboseNamePlural string, metaModelName string) *FlowStageBindingStageObj { - this := FlowStageBindingStageObj{} - this.Pk = pk - this.Name = name - this.Component = component - this.VerboseName = verboseName - this.VerboseNamePlural = verboseNamePlural - this.MetaModelName = metaModelName - return &this -} - -// NewFlowStageBindingStageObjWithDefaults instantiates a new FlowStageBindingStageObj object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewFlowStageBindingStageObjWithDefaults() *FlowStageBindingStageObj { - this := FlowStageBindingStageObj{} - return &this -} - -// GetPk returns the Pk field value -func (o *FlowStageBindingStageObj) GetPk() string { - if o == nil { - var ret string - return ret - } - - return o.Pk -} - -// GetPkOk returns a tuple with the Pk field value -// and a boolean to check if the value has been set. -func (o *FlowStageBindingStageObj) GetPkOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Pk, true -} - -// SetPk sets field value -func (o *FlowStageBindingStageObj) SetPk(v string) { - o.Pk = v -} - -// GetName returns the Name field value -func (o *FlowStageBindingStageObj) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *FlowStageBindingStageObj) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *FlowStageBindingStageObj) SetName(v string) { - o.Name = v -} - -// GetComponent returns the Component field value -func (o *FlowStageBindingStageObj) GetComponent() string { - if o == nil { - var ret string - return ret - } - - return o.Component -} - -// GetComponentOk returns a tuple with the Component field value -// and a boolean to check if the value has been set. -func (o *FlowStageBindingStageObj) GetComponentOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Component, true -} - -// SetComponent sets field value -func (o *FlowStageBindingStageObj) SetComponent(v string) { - o.Component = v -} - -// GetVerboseName returns the VerboseName field value -func (o *FlowStageBindingStageObj) GetVerboseName() string { - if o == nil { - var ret string - return ret - } - - return o.VerboseName -} - -// GetVerboseNameOk returns a tuple with the VerboseName field value -// and a boolean to check if the value has been set. -func (o *FlowStageBindingStageObj) GetVerboseNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.VerboseName, true -} - -// SetVerboseName sets field value -func (o *FlowStageBindingStageObj) SetVerboseName(v string) { - o.VerboseName = v -} - -// GetVerboseNamePlural returns the VerboseNamePlural field value -func (o *FlowStageBindingStageObj) GetVerboseNamePlural() string { - if o == nil { - var ret string - return ret - } - - return o.VerboseNamePlural -} - -// GetVerboseNamePluralOk returns a tuple with the VerboseNamePlural field value -// and a boolean to check if the value has been set. -func (o *FlowStageBindingStageObj) GetVerboseNamePluralOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.VerboseNamePlural, true -} - -// SetVerboseNamePlural sets field value -func (o *FlowStageBindingStageObj) SetVerboseNamePlural(v string) { - o.VerboseNamePlural = v -} - -// GetMetaModelName returns the MetaModelName field value -func (o *FlowStageBindingStageObj) GetMetaModelName() string { - if o == nil { - var ret string - return ret - } - - return o.MetaModelName -} - -// GetMetaModelNameOk returns a tuple with the MetaModelName field value -// and a boolean to check if the value has been set. -func (o *FlowStageBindingStageObj) GetMetaModelNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.MetaModelName, true -} - -// SetMetaModelName sets field value -func (o *FlowStageBindingStageObj) SetMetaModelName(v string) { - o.MetaModelName = v -} - -// GetFlowSet returns the FlowSet field value if set, zero value otherwise. -func (o *FlowStageBindingStageObj) GetFlowSet() []FlowSet { - if o == nil || o.FlowSet == nil { - var ret []FlowSet - return ret - } - return o.FlowSet -} - -// GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *FlowStageBindingStageObj) GetFlowSetOk() ([]FlowSet, bool) { - if o == nil || o.FlowSet == nil { - return nil, false - } - return o.FlowSet, true -} - -// HasFlowSet returns a boolean if a field has been set. -func (o *FlowStageBindingStageObj) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { - return true - } - - return false -} - -// SetFlowSet gets a reference to the given []FlowSet and assigns it to the FlowSet field. -func (o *FlowStageBindingStageObj) SetFlowSet(v []FlowSet) { - o.FlowSet = v -} - -func (o FlowStageBindingStageObj) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["component"] = o.Component - } - if true { - toSerialize["verbose_name"] = o.VerboseName - } - if true { - toSerialize["verbose_name_plural"] = o.VerboseNamePlural - } - if true { - toSerialize["meta_model_name"] = o.MetaModelName - } - if o.FlowSet != nil { - toSerialize["flow_set"] = o.FlowSet - } - return json.Marshal(toSerialize) -} - -type NullableFlowStageBindingStageObj struct { - value *FlowStageBindingStageObj - isSet bool -} - -func (v NullableFlowStageBindingStageObj) Get() *FlowStageBindingStageObj { - return v.value -} - -func (v *NullableFlowStageBindingStageObj) Set(val *FlowStageBindingStageObj) { - v.value = val - v.isSet = true -} - -func (v NullableFlowStageBindingStageObj) IsSet() bool { - return v.isSet -} - -func (v *NullableFlowStageBindingStageObj) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFlowStageBindingStageObj(val *FlowStageBindingStageObj) *NullableFlowStageBindingStageObj { - return &NullableFlowStageBindingStageObj{value: val, isSet: true} -} - -func (v NullableFlowStageBindingStageObj) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFlowStageBindingStageObj) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/model_footer_link.go b/model_footer_link.go index 7c900fd7a..cdd21d5a6 100644 --- a/model_footer_link.go +++ b/model_footer_link.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the FooterLink type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FooterLink{} + // FooterLink Links returned in Config API type FooterLink struct { Href string `json:"href"` @@ -89,16 +92,20 @@ func (o *FooterLink) SetName(v string) { } func (o FooterLink) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["href"] = o.Href - } - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o FooterLink) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: href is readOnly + // skip: name is readOnly + return toSerialize, nil +} + type NullableFooterLink struct { value *FooterLink isSet bool diff --git a/model_generic_error.go b/model_generic_error.go index f86164266..85f33f780 100644 --- a/model_generic_error.go +++ b/model_generic_error.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the GenericError type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GenericError{} + // GenericError Generic API Error type GenericError struct { Detail string `json:"detail"` @@ -65,7 +68,7 @@ func (o *GenericError) SetDetail(v string) { // GetCode returns the Code field value if set, zero value otherwise. func (o *GenericError) GetCode() string { - if o == nil || o.Code == nil { + if o == nil || IsNil(o.Code) { var ret string return ret } @@ -75,7 +78,7 @@ func (o *GenericError) GetCode() string { // GetCodeOk returns a tuple with the Code field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *GenericError) GetCodeOk() (*string, bool) { - if o == nil || o.Code == nil { + if o == nil || IsNil(o.Code) { return nil, false } return o.Code, true @@ -83,7 +86,7 @@ func (o *GenericError) GetCodeOk() (*string, bool) { // HasCode returns a boolean if a field has been set. func (o *GenericError) HasCode() bool { - if o != nil && o.Code != nil { + if o != nil && !IsNil(o.Code) { return true } @@ -96,14 +99,20 @@ func (o *GenericError) SetCode(v string) { } func (o GenericError) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["detail"] = o.Detail + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.Code != nil { + return json.Marshal(toSerialize) +} + +func (o GenericError) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["detail"] = o.Detail + if !IsNil(o.Code) { toSerialize["code"] = o.Code } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableGenericError struct { diff --git a/model_group.go b/model_group.go index 2a5f3ebdd..c4ef34dc5 100644 --- a/model_group.go +++ b/model_group.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the Group type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Group{} + // Group Group Serializer type Group struct { Pk string `json:"pk"` @@ -125,7 +128,7 @@ func (o *Group) SetName(v string) { // GetIsSuperuser returns the IsSuperuser field value if set, zero value otherwise. func (o *Group) GetIsSuperuser() bool { - if o == nil || o.IsSuperuser == nil { + if o == nil || IsNil(o.IsSuperuser) { var ret bool return ret } @@ -135,7 +138,7 @@ func (o *Group) GetIsSuperuser() bool { // GetIsSuperuserOk returns a tuple with the IsSuperuser field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Group) GetIsSuperuserOk() (*bool, bool) { - if o == nil || o.IsSuperuser == nil { + if o == nil || IsNil(o.IsSuperuser) { return nil, false } return o.IsSuperuser, true @@ -143,7 +146,7 @@ func (o *Group) GetIsSuperuserOk() (*bool, bool) { // HasIsSuperuser returns a boolean if a field has been set. func (o *Group) HasIsSuperuser() bool { - if o != nil && o.IsSuperuser != nil { + if o != nil && !IsNil(o.IsSuperuser) { return true } @@ -157,7 +160,7 @@ func (o *Group) SetIsSuperuser(v bool) { // GetParent returns the Parent field value if set, zero value otherwise (both if not set or set to explicit null). func (o *Group) GetParent() string { - if o == nil || o.Parent.Get() == nil { + if o == nil || IsNil(o.Parent.Get()) { var ret string return ret } @@ -224,7 +227,7 @@ func (o *Group) SetParentName(v string) { // GetUsers returns the Users field value if set, zero value otherwise. func (o *Group) GetUsers() []int32 { - if o == nil || o.Users == nil { + if o == nil || IsNil(o.Users) { var ret []int32 return ret } @@ -234,7 +237,7 @@ func (o *Group) GetUsers() []int32 { // GetUsersOk returns a tuple with the Users field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Group) GetUsersOk() ([]int32, bool) { - if o == nil || o.Users == nil { + if o == nil || IsNil(o.Users) { return nil, false } return o.Users, true @@ -242,7 +245,7 @@ func (o *Group) GetUsersOk() ([]int32, bool) { // HasUsers returns a boolean if a field has been set. func (o *Group) HasUsers() bool { - if o != nil && o.Users != nil { + if o != nil && !IsNil(o.Users) { return true } @@ -256,7 +259,7 @@ func (o *Group) SetUsers(v []int32) { // GetAttributes returns the Attributes field value if set, zero value otherwise. func (o *Group) GetAttributes() map[string]interface{} { - if o == nil || o.Attributes == nil { + if o == nil || IsNil(o.Attributes) { var ret map[string]interface{} return ret } @@ -266,15 +269,15 @@ func (o *Group) GetAttributes() map[string]interface{} { // GetAttributesOk returns a tuple with the Attributes field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Group) GetAttributesOk() (map[string]interface{}, bool) { - if o == nil || o.Attributes == nil { - return nil, false + if o == nil || IsNil(o.Attributes) { + return map[string]interface{}{}, false } return o.Attributes, true } // HasAttributes returns a boolean if a field has been set. func (o *Group) HasAttributes() bool { - if o != nil && o.Attributes != nil { + if o != nil && !IsNil(o.Attributes) { return true } @@ -311,35 +314,33 @@ func (o *Group) SetUsersObj(v []GroupMember) { } func (o Group) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if true { - toSerialize["num_pk"] = o.NumPk - } - if true { - toSerialize["name"] = o.Name - } - if o.IsSuperuser != nil { + return json.Marshal(toSerialize) +} + +func (o Group) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + // skip: num_pk is readOnly + toSerialize["name"] = o.Name + if !IsNil(o.IsSuperuser) { toSerialize["is_superuser"] = o.IsSuperuser } if o.Parent.IsSet() { toSerialize["parent"] = o.Parent.Get() } - if true { - toSerialize["parent_name"] = o.ParentName - } - if o.Users != nil { + // skip: parent_name is readOnly + if !IsNil(o.Users) { toSerialize["users"] = o.Users } - if o.Attributes != nil { + if !IsNil(o.Attributes) { toSerialize["attributes"] = o.Attributes } - if true { - toSerialize["users_obj"] = o.UsersObj - } - return json.Marshal(toSerialize) + // skip: users_obj is readOnly + return toSerialize, nil } type NullableGroup struct { diff --git a/model_group_member.go b/model_group_member.go index 0772eb826..a40b44360 100644 --- a/model_group_member.go +++ b/model_group_member.go @@ -16,6 +16,9 @@ import ( "time" ) +// checks if the GroupMember type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GroupMember{} + // GroupMember Stripped down user serializer to show relevant users for groups type GroupMember struct { Pk int32 `json:"pk"` @@ -126,7 +129,7 @@ func (o *GroupMember) SetName(v string) { // GetIsActive returns the IsActive field value if set, zero value otherwise. func (o *GroupMember) GetIsActive() bool { - if o == nil || o.IsActive == nil { + if o == nil || IsNil(o.IsActive) { var ret bool return ret } @@ -136,7 +139,7 @@ func (o *GroupMember) GetIsActive() bool { // GetIsActiveOk returns a tuple with the IsActive field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *GroupMember) GetIsActiveOk() (*bool, bool) { - if o == nil || o.IsActive == nil { + if o == nil || IsNil(o.IsActive) { return nil, false } return o.IsActive, true @@ -144,7 +147,7 @@ func (o *GroupMember) GetIsActiveOk() (*bool, bool) { // HasIsActive returns a boolean if a field has been set. func (o *GroupMember) HasIsActive() bool { - if o != nil && o.IsActive != nil { + if o != nil && !IsNil(o.IsActive) { return true } @@ -158,7 +161,7 @@ func (o *GroupMember) SetIsActive(v bool) { // GetLastLogin returns the LastLogin field value if set, zero value otherwise (both if not set or set to explicit null). func (o *GroupMember) GetLastLogin() time.Time { - if o == nil || o.LastLogin.Get() == nil { + if o == nil || IsNil(o.LastLogin.Get()) { var ret time.Time return ret } @@ -201,7 +204,7 @@ func (o *GroupMember) UnsetLastLogin() { // GetEmail returns the Email field value if set, zero value otherwise. func (o *GroupMember) GetEmail() string { - if o == nil || o.Email == nil { + if o == nil || IsNil(o.Email) { var ret string return ret } @@ -211,7 +214,7 @@ func (o *GroupMember) GetEmail() string { // GetEmailOk returns a tuple with the Email field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *GroupMember) GetEmailOk() (*string, bool) { - if o == nil || o.Email == nil { + if o == nil || IsNil(o.Email) { return nil, false } return o.Email, true @@ -219,7 +222,7 @@ func (o *GroupMember) GetEmailOk() (*string, bool) { // HasEmail returns a boolean if a field has been set. func (o *GroupMember) HasEmail() bool { - if o != nil && o.Email != nil { + if o != nil && !IsNil(o.Email) { return true } @@ -233,7 +236,7 @@ func (o *GroupMember) SetEmail(v string) { // GetAttributes returns the Attributes field value if set, zero value otherwise. func (o *GroupMember) GetAttributes() map[string]interface{} { - if o == nil || o.Attributes == nil { + if o == nil || IsNil(o.Attributes) { var ret map[string]interface{} return ret } @@ -243,15 +246,15 @@ func (o *GroupMember) GetAttributes() map[string]interface{} { // GetAttributesOk returns a tuple with the Attributes field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *GroupMember) GetAttributesOk() (map[string]interface{}, bool) { - if o == nil || o.Attributes == nil { - return nil, false + if o == nil || IsNil(o.Attributes) { + return map[string]interface{}{}, false } return o.Attributes, true } // HasAttributes returns a boolean if a field has been set. func (o *GroupMember) HasAttributes() bool { - if o != nil && o.Attributes != nil { + if o != nil && !IsNil(o.Attributes) { return true } @@ -288,32 +291,32 @@ func (o *GroupMember) SetUid(v string) { } func (o GroupMember) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if true { - toSerialize["username"] = o.Username - } - if true { - toSerialize["name"] = o.Name - } - if o.IsActive != nil { + return json.Marshal(toSerialize) +} + +func (o GroupMember) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["username"] = o.Username + toSerialize["name"] = o.Name + if !IsNil(o.IsActive) { toSerialize["is_active"] = o.IsActive } if o.LastLogin.IsSet() { toSerialize["last_login"] = o.LastLogin.Get() } - if o.Email != nil { + if !IsNil(o.Email) { toSerialize["email"] = o.Email } - if o.Attributes != nil { + if !IsNil(o.Attributes) { toSerialize["attributes"] = o.Attributes } - if true { - toSerialize["uid"] = o.Uid - } - return json.Marshal(toSerialize) + // skip: uid is readOnly + return toSerialize, nil } type NullableGroupMember struct { diff --git a/model_group_member_request.go b/model_group_member_request.go index 5b8c25614..f44f9f3f1 100644 --- a/model_group_member_request.go +++ b/model_group_member_request.go @@ -16,6 +16,9 @@ import ( "time" ) +// checks if the GroupMemberRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GroupMemberRequest{} + // GroupMemberRequest Stripped down user serializer to show relevant users for groups type GroupMemberRequest struct { // Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. @@ -98,7 +101,7 @@ func (o *GroupMemberRequest) SetName(v string) { // GetIsActive returns the IsActive field value if set, zero value otherwise. func (o *GroupMemberRequest) GetIsActive() bool { - if o == nil || o.IsActive == nil { + if o == nil || IsNil(o.IsActive) { var ret bool return ret } @@ -108,7 +111,7 @@ func (o *GroupMemberRequest) GetIsActive() bool { // GetIsActiveOk returns a tuple with the IsActive field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *GroupMemberRequest) GetIsActiveOk() (*bool, bool) { - if o == nil || o.IsActive == nil { + if o == nil || IsNil(o.IsActive) { return nil, false } return o.IsActive, true @@ -116,7 +119,7 @@ func (o *GroupMemberRequest) GetIsActiveOk() (*bool, bool) { // HasIsActive returns a boolean if a field has been set. func (o *GroupMemberRequest) HasIsActive() bool { - if o != nil && o.IsActive != nil { + if o != nil && !IsNil(o.IsActive) { return true } @@ -130,7 +133,7 @@ func (o *GroupMemberRequest) SetIsActive(v bool) { // GetLastLogin returns the LastLogin field value if set, zero value otherwise (both if not set or set to explicit null). func (o *GroupMemberRequest) GetLastLogin() time.Time { - if o == nil || o.LastLogin.Get() == nil { + if o == nil || IsNil(o.LastLogin.Get()) { var ret time.Time return ret } @@ -173,7 +176,7 @@ func (o *GroupMemberRequest) UnsetLastLogin() { // GetEmail returns the Email field value if set, zero value otherwise. func (o *GroupMemberRequest) GetEmail() string { - if o == nil || o.Email == nil { + if o == nil || IsNil(o.Email) { var ret string return ret } @@ -183,7 +186,7 @@ func (o *GroupMemberRequest) GetEmail() string { // GetEmailOk returns a tuple with the Email field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *GroupMemberRequest) GetEmailOk() (*string, bool) { - if o == nil || o.Email == nil { + if o == nil || IsNil(o.Email) { return nil, false } return o.Email, true @@ -191,7 +194,7 @@ func (o *GroupMemberRequest) GetEmailOk() (*string, bool) { // HasEmail returns a boolean if a field has been set. func (o *GroupMemberRequest) HasEmail() bool { - if o != nil && o.Email != nil { + if o != nil && !IsNil(o.Email) { return true } @@ -205,7 +208,7 @@ func (o *GroupMemberRequest) SetEmail(v string) { // GetAttributes returns the Attributes field value if set, zero value otherwise. func (o *GroupMemberRequest) GetAttributes() map[string]interface{} { - if o == nil || o.Attributes == nil { + if o == nil || IsNil(o.Attributes) { var ret map[string]interface{} return ret } @@ -215,15 +218,15 @@ func (o *GroupMemberRequest) GetAttributes() map[string]interface{} { // GetAttributesOk returns a tuple with the Attributes field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *GroupMemberRequest) GetAttributesOk() (map[string]interface{}, bool) { - if o == nil || o.Attributes == nil { - return nil, false + if o == nil || IsNil(o.Attributes) { + return map[string]interface{}{}, false } return o.Attributes, true } // HasAttributes returns a boolean if a field has been set. func (o *GroupMemberRequest) HasAttributes() bool { - if o != nil && o.Attributes != nil { + if o != nil && !IsNil(o.Attributes) { return true } @@ -236,26 +239,30 @@ func (o *GroupMemberRequest) SetAttributes(v map[string]interface{}) { } func (o GroupMemberRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["username"] = o.Username + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if true { - toSerialize["name"] = o.Name - } - if o.IsActive != nil { + return json.Marshal(toSerialize) +} + +func (o GroupMemberRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["username"] = o.Username + toSerialize["name"] = o.Name + if !IsNil(o.IsActive) { toSerialize["is_active"] = o.IsActive } if o.LastLogin.IsSet() { toSerialize["last_login"] = o.LastLogin.Get() } - if o.Email != nil { + if !IsNil(o.Email) { toSerialize["email"] = o.Email } - if o.Attributes != nil { + if !IsNil(o.Attributes) { toSerialize["attributes"] = o.Attributes } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableGroupMemberRequest struct { diff --git a/model_group_request.go b/model_group_request.go index d28e753f2..124eeb81c 100644 --- a/model_group_request.go +++ b/model_group_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the GroupRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GroupRequest{} + // GroupRequest Group Serializer type GroupRequest struct { Name string `json:"name"` @@ -69,7 +72,7 @@ func (o *GroupRequest) SetName(v string) { // GetIsSuperuser returns the IsSuperuser field value if set, zero value otherwise. func (o *GroupRequest) GetIsSuperuser() bool { - if o == nil || o.IsSuperuser == nil { + if o == nil || IsNil(o.IsSuperuser) { var ret bool return ret } @@ -79,7 +82,7 @@ func (o *GroupRequest) GetIsSuperuser() bool { // GetIsSuperuserOk returns a tuple with the IsSuperuser field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *GroupRequest) GetIsSuperuserOk() (*bool, bool) { - if o == nil || o.IsSuperuser == nil { + if o == nil || IsNil(o.IsSuperuser) { return nil, false } return o.IsSuperuser, true @@ -87,7 +90,7 @@ func (o *GroupRequest) GetIsSuperuserOk() (*bool, bool) { // HasIsSuperuser returns a boolean if a field has been set. func (o *GroupRequest) HasIsSuperuser() bool { - if o != nil && o.IsSuperuser != nil { + if o != nil && !IsNil(o.IsSuperuser) { return true } @@ -101,7 +104,7 @@ func (o *GroupRequest) SetIsSuperuser(v bool) { // GetParent returns the Parent field value if set, zero value otherwise (both if not set or set to explicit null). func (o *GroupRequest) GetParent() string { - if o == nil || o.Parent.Get() == nil { + if o == nil || IsNil(o.Parent.Get()) { var ret string return ret } @@ -144,7 +147,7 @@ func (o *GroupRequest) UnsetParent() { // GetUsers returns the Users field value if set, zero value otherwise. func (o *GroupRequest) GetUsers() []int32 { - if o == nil || o.Users == nil { + if o == nil || IsNil(o.Users) { var ret []int32 return ret } @@ -154,7 +157,7 @@ func (o *GroupRequest) GetUsers() []int32 { // GetUsersOk returns a tuple with the Users field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *GroupRequest) GetUsersOk() ([]int32, bool) { - if o == nil || o.Users == nil { + if o == nil || IsNil(o.Users) { return nil, false } return o.Users, true @@ -162,7 +165,7 @@ func (o *GroupRequest) GetUsersOk() ([]int32, bool) { // HasUsers returns a boolean if a field has been set. func (o *GroupRequest) HasUsers() bool { - if o != nil && o.Users != nil { + if o != nil && !IsNil(o.Users) { return true } @@ -176,7 +179,7 @@ func (o *GroupRequest) SetUsers(v []int32) { // GetAttributes returns the Attributes field value if set, zero value otherwise. func (o *GroupRequest) GetAttributes() map[string]interface{} { - if o == nil || o.Attributes == nil { + if o == nil || IsNil(o.Attributes) { var ret map[string]interface{} return ret } @@ -186,15 +189,15 @@ func (o *GroupRequest) GetAttributes() map[string]interface{} { // GetAttributesOk returns a tuple with the Attributes field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *GroupRequest) GetAttributesOk() (map[string]interface{}, bool) { - if o == nil || o.Attributes == nil { - return nil, false + if o == nil || IsNil(o.Attributes) { + return map[string]interface{}{}, false } return o.Attributes, true } // HasAttributes returns a boolean if a field has been set. func (o *GroupRequest) HasAttributes() bool { - if o != nil && o.Attributes != nil { + if o != nil && !IsNil(o.Attributes) { return true } @@ -207,23 +210,29 @@ func (o *GroupRequest) SetAttributes(v map[string]interface{}) { } func (o GroupRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.IsSuperuser != nil { + return json.Marshal(toSerialize) +} + +func (o GroupRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.IsSuperuser) { toSerialize["is_superuser"] = o.IsSuperuser } if o.Parent.IsSet() { toSerialize["parent"] = o.Parent.Get() } - if o.Users != nil { + if !IsNil(o.Users) { toSerialize["users"] = o.Users } - if o.Attributes != nil { + if !IsNil(o.Attributes) { toSerialize["attributes"] = o.Attributes } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableGroupRequest struct { diff --git a/model_identification_challenge.go b/model_identification_challenge.go index d1db3ca32..e3b223529 100644 --- a/model_identification_challenge.go +++ b/model_identification_challenge.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the IdentificationChallenge type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &IdentificationChallenge{} + // IdentificationChallenge Identification challenges with all UI elements type IdentificationChallenge struct { Type ChallengeChoices `json:"type"` @@ -84,7 +87,7 @@ func (o *IdentificationChallenge) SetType(v ChallengeChoices) { // GetFlowInfo returns the FlowInfo field value if set, zero value otherwise. func (o *IdentificationChallenge) GetFlowInfo() ContextualFlowInfo { - if o == nil || o.FlowInfo == nil { + if o == nil || IsNil(o.FlowInfo) { var ret ContextualFlowInfo return ret } @@ -94,7 +97,7 @@ func (o *IdentificationChallenge) GetFlowInfo() ContextualFlowInfo { // GetFlowInfoOk returns a tuple with the FlowInfo field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *IdentificationChallenge) GetFlowInfoOk() (*ContextualFlowInfo, bool) { - if o == nil || o.FlowInfo == nil { + if o == nil || IsNil(o.FlowInfo) { return nil, false } return o.FlowInfo, true @@ -102,7 +105,7 @@ func (o *IdentificationChallenge) GetFlowInfoOk() (*ContextualFlowInfo, bool) { // HasFlowInfo returns a boolean if a field has been set. func (o *IdentificationChallenge) HasFlowInfo() bool { - if o != nil && o.FlowInfo != nil { + if o != nil && !IsNil(o.FlowInfo) { return true } @@ -116,7 +119,7 @@ func (o *IdentificationChallenge) SetFlowInfo(v ContextualFlowInfo) { // GetComponent returns the Component field value if set, zero value otherwise. func (o *IdentificationChallenge) GetComponent() string { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { var ret string return ret } @@ -126,7 +129,7 @@ func (o *IdentificationChallenge) GetComponent() string { // GetComponentOk returns a tuple with the Component field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *IdentificationChallenge) GetComponentOk() (*string, bool) { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { return nil, false } return o.Component, true @@ -134,7 +137,7 @@ func (o *IdentificationChallenge) GetComponentOk() (*string, bool) { // HasComponent returns a boolean if a field has been set. func (o *IdentificationChallenge) HasComponent() bool { - if o != nil && o.Component != nil { + if o != nil && !IsNil(o.Component) { return true } @@ -148,7 +151,7 @@ func (o *IdentificationChallenge) SetComponent(v string) { // GetResponseErrors returns the ResponseErrors field value if set, zero value otherwise. func (o *IdentificationChallenge) GetResponseErrors() map[string][]ErrorDetail { - if o == nil || o.ResponseErrors == nil { + if o == nil || IsNil(o.ResponseErrors) { var ret map[string][]ErrorDetail return ret } @@ -158,7 +161,7 @@ func (o *IdentificationChallenge) GetResponseErrors() map[string][]ErrorDetail { // GetResponseErrorsOk returns a tuple with the ResponseErrors field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *IdentificationChallenge) GetResponseErrorsOk() (*map[string][]ErrorDetail, bool) { - if o == nil || o.ResponseErrors == nil { + if o == nil || IsNil(o.ResponseErrors) { return nil, false } return o.ResponseErrors, true @@ -166,7 +169,7 @@ func (o *IdentificationChallenge) GetResponseErrorsOk() (*map[string][]ErrorDeta // HasResponseErrors returns a boolean if a field has been set. func (o *IdentificationChallenge) HasResponseErrors() bool { - if o != nil && o.ResponseErrors != nil { + if o != nil && !IsNil(o.ResponseErrors) { return true } @@ -193,7 +196,7 @@ func (o *IdentificationChallenge) GetUserFields() []string { // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *IdentificationChallenge) GetUserFieldsOk() ([]string, bool) { - if o == nil || o.UserFields == nil { + if o == nil || IsNil(o.UserFields) { return nil, false } return o.UserFields, true @@ -230,7 +233,7 @@ func (o *IdentificationChallenge) SetPasswordFields(v bool) { // GetApplicationPre returns the ApplicationPre field value if set, zero value otherwise. func (o *IdentificationChallenge) GetApplicationPre() string { - if o == nil || o.ApplicationPre == nil { + if o == nil || IsNil(o.ApplicationPre) { var ret string return ret } @@ -240,7 +243,7 @@ func (o *IdentificationChallenge) GetApplicationPre() string { // GetApplicationPreOk returns a tuple with the ApplicationPre field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *IdentificationChallenge) GetApplicationPreOk() (*string, bool) { - if o == nil || o.ApplicationPre == nil { + if o == nil || IsNil(o.ApplicationPre) { return nil, false } return o.ApplicationPre, true @@ -248,7 +251,7 @@ func (o *IdentificationChallenge) GetApplicationPreOk() (*string, bool) { // HasApplicationPre returns a boolean if a field has been set. func (o *IdentificationChallenge) HasApplicationPre() bool { - if o != nil && o.ApplicationPre != nil { + if o != nil && !IsNil(o.ApplicationPre) { return true } @@ -262,7 +265,7 @@ func (o *IdentificationChallenge) SetApplicationPre(v string) { // GetEnrollUrl returns the EnrollUrl field value if set, zero value otherwise. func (o *IdentificationChallenge) GetEnrollUrl() string { - if o == nil || o.EnrollUrl == nil { + if o == nil || IsNil(o.EnrollUrl) { var ret string return ret } @@ -272,7 +275,7 @@ func (o *IdentificationChallenge) GetEnrollUrl() string { // GetEnrollUrlOk returns a tuple with the EnrollUrl field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *IdentificationChallenge) GetEnrollUrlOk() (*string, bool) { - if o == nil || o.EnrollUrl == nil { + if o == nil || IsNil(o.EnrollUrl) { return nil, false } return o.EnrollUrl, true @@ -280,7 +283,7 @@ func (o *IdentificationChallenge) GetEnrollUrlOk() (*string, bool) { // HasEnrollUrl returns a boolean if a field has been set. func (o *IdentificationChallenge) HasEnrollUrl() bool { - if o != nil && o.EnrollUrl != nil { + if o != nil && !IsNil(o.EnrollUrl) { return true } @@ -294,7 +297,7 @@ func (o *IdentificationChallenge) SetEnrollUrl(v string) { // GetRecoveryUrl returns the RecoveryUrl field value if set, zero value otherwise. func (o *IdentificationChallenge) GetRecoveryUrl() string { - if o == nil || o.RecoveryUrl == nil { + if o == nil || IsNil(o.RecoveryUrl) { var ret string return ret } @@ -304,7 +307,7 @@ func (o *IdentificationChallenge) GetRecoveryUrl() string { // GetRecoveryUrlOk returns a tuple with the RecoveryUrl field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *IdentificationChallenge) GetRecoveryUrlOk() (*string, bool) { - if o == nil || o.RecoveryUrl == nil { + if o == nil || IsNil(o.RecoveryUrl) { return nil, false } return o.RecoveryUrl, true @@ -312,7 +315,7 @@ func (o *IdentificationChallenge) GetRecoveryUrlOk() (*string, bool) { // HasRecoveryUrl returns a boolean if a field has been set. func (o *IdentificationChallenge) HasRecoveryUrl() bool { - if o != nil && o.RecoveryUrl != nil { + if o != nil && !IsNil(o.RecoveryUrl) { return true } @@ -326,7 +329,7 @@ func (o *IdentificationChallenge) SetRecoveryUrl(v string) { // GetPasswordlessUrl returns the PasswordlessUrl field value if set, zero value otherwise. func (o *IdentificationChallenge) GetPasswordlessUrl() string { - if o == nil || o.PasswordlessUrl == nil { + if o == nil || IsNil(o.PasswordlessUrl) { var ret string return ret } @@ -336,7 +339,7 @@ func (o *IdentificationChallenge) GetPasswordlessUrl() string { // GetPasswordlessUrlOk returns a tuple with the PasswordlessUrl field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *IdentificationChallenge) GetPasswordlessUrlOk() (*string, bool) { - if o == nil || o.PasswordlessUrl == nil { + if o == nil || IsNil(o.PasswordlessUrl) { return nil, false } return o.PasswordlessUrl, true @@ -344,7 +347,7 @@ func (o *IdentificationChallenge) GetPasswordlessUrlOk() (*string, bool) { // HasPasswordlessUrl returns a boolean if a field has been set. func (o *IdentificationChallenge) HasPasswordlessUrl() bool { - if o != nil && o.PasswordlessUrl != nil { + if o != nil && !IsNil(o.PasswordlessUrl) { return true } @@ -382,7 +385,7 @@ func (o *IdentificationChallenge) SetPrimaryAction(v string) { // GetSources returns the Sources field value if set, zero value otherwise. func (o *IdentificationChallenge) GetSources() []LoginSource { - if o == nil || o.Sources == nil { + if o == nil || IsNil(o.Sources) { var ret []LoginSource return ret } @@ -392,7 +395,7 @@ func (o *IdentificationChallenge) GetSources() []LoginSource { // GetSourcesOk returns a tuple with the Sources field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *IdentificationChallenge) GetSourcesOk() ([]LoginSource, bool) { - if o == nil || o.Sources == nil { + if o == nil || IsNil(o.Sources) { return nil, false } return o.Sources, true @@ -400,7 +403,7 @@ func (o *IdentificationChallenge) GetSourcesOk() ([]LoginSource, bool) { // HasSources returns a boolean if a field has been set. func (o *IdentificationChallenge) HasSources() bool { - if o != nil && o.Sources != nil { + if o != nil && !IsNil(o.Sources) { return true } @@ -437,47 +440,47 @@ func (o *IdentificationChallenge) SetShowSourceLabels(v bool) { } func (o IdentificationChallenge) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["type"] = o.Type + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.FlowInfo != nil { + return json.Marshal(toSerialize) +} + +func (o IdentificationChallenge) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + if !IsNil(o.FlowInfo) { toSerialize["flow_info"] = o.FlowInfo } - if o.Component != nil { + if !IsNil(o.Component) { toSerialize["component"] = o.Component } - if o.ResponseErrors != nil { + if !IsNil(o.ResponseErrors) { toSerialize["response_errors"] = o.ResponseErrors } if o.UserFields != nil { toSerialize["user_fields"] = o.UserFields } - if true { - toSerialize["password_fields"] = o.PasswordFields - } - if o.ApplicationPre != nil { + toSerialize["password_fields"] = o.PasswordFields + if !IsNil(o.ApplicationPre) { toSerialize["application_pre"] = o.ApplicationPre } - if o.EnrollUrl != nil { + if !IsNil(o.EnrollUrl) { toSerialize["enroll_url"] = o.EnrollUrl } - if o.RecoveryUrl != nil { + if !IsNil(o.RecoveryUrl) { toSerialize["recovery_url"] = o.RecoveryUrl } - if o.PasswordlessUrl != nil { + if !IsNil(o.PasswordlessUrl) { toSerialize["passwordless_url"] = o.PasswordlessUrl } - if true { - toSerialize["primary_action"] = o.PrimaryAction - } - if o.Sources != nil { + toSerialize["primary_action"] = o.PrimaryAction + if !IsNil(o.Sources) { toSerialize["sources"] = o.Sources } - if true { - toSerialize["show_source_labels"] = o.ShowSourceLabels - } - return json.Marshal(toSerialize) + toSerialize["show_source_labels"] = o.ShowSourceLabels + return toSerialize, nil } type NullableIdentificationChallenge struct { diff --git a/model_identification_challenge_response_request.go b/model_identification_challenge_response_request.go index f3f08e2b7..978f61f4a 100644 --- a/model_identification_challenge_response_request.go +++ b/model_identification_challenge_response_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the IdentificationChallengeResponseRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &IdentificationChallengeResponseRequest{} + // IdentificationChallengeResponseRequest Identification challenge type IdentificationChallengeResponseRequest struct { Component *string `json:"component,omitempty"` @@ -46,7 +49,7 @@ func NewIdentificationChallengeResponseRequestWithDefaults() *IdentificationChal // GetComponent returns the Component field value if set, zero value otherwise. func (o *IdentificationChallengeResponseRequest) GetComponent() string { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { var ret string return ret } @@ -56,7 +59,7 @@ func (o *IdentificationChallengeResponseRequest) GetComponent() string { // GetComponentOk returns a tuple with the Component field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *IdentificationChallengeResponseRequest) GetComponentOk() (*string, bool) { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { return nil, false } return o.Component, true @@ -64,7 +67,7 @@ func (o *IdentificationChallengeResponseRequest) GetComponentOk() (*string, bool // HasComponent returns a boolean if a field has been set. func (o *IdentificationChallengeResponseRequest) HasComponent() bool { - if o != nil && o.Component != nil { + if o != nil && !IsNil(o.Component) { return true } @@ -102,7 +105,7 @@ func (o *IdentificationChallengeResponseRequest) SetUidField(v string) { // GetPassword returns the Password field value if set, zero value otherwise (both if not set or set to explicit null). func (o *IdentificationChallengeResponseRequest) GetPassword() string { - if o == nil || o.Password.Get() == nil { + if o == nil || IsNil(o.Password.Get()) { var ret string return ret } @@ -144,17 +147,23 @@ func (o *IdentificationChallengeResponseRequest) UnsetPassword() { } func (o IdentificationChallengeResponseRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o IdentificationChallengeResponseRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Component != nil { + if !IsNil(o.Component) { toSerialize["component"] = o.Component } - if true { - toSerialize["uid_field"] = o.UidField - } + toSerialize["uid_field"] = o.UidField if o.Password.IsSet() { toSerialize["password"] = o.Password.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableIdentificationChallengeResponseRequest struct { diff --git a/model_identification_stage.go b/model_identification_stage.go index 9c261167b..7c55bbd11 100644 --- a/model_identification_stage.go +++ b/model_identification_stage.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the IdentificationStage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &IdentificationStage{} + // IdentificationStage IdentificationStage Serializer type IdentificationStage struct { Pk string `json:"pk"` @@ -216,7 +219,7 @@ func (o *IdentificationStage) SetMetaModelName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *IdentificationStage) GetFlowSet() []FlowSet { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSet return ret } @@ -226,7 +229,7 @@ func (o *IdentificationStage) GetFlowSet() []FlowSet { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *IdentificationStage) GetFlowSetOk() ([]FlowSet, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -234,7 +237,7 @@ func (o *IdentificationStage) GetFlowSetOk() ([]FlowSet, bool) { // HasFlowSet returns a boolean if a field has been set. func (o *IdentificationStage) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -248,7 +251,7 @@ func (o *IdentificationStage) SetFlowSet(v []FlowSet) { // GetUserFields returns the UserFields field value if set, zero value otherwise. func (o *IdentificationStage) GetUserFields() []UserFieldsEnum { - if o == nil || o.UserFields == nil { + if o == nil || IsNil(o.UserFields) { var ret []UserFieldsEnum return ret } @@ -258,7 +261,7 @@ func (o *IdentificationStage) GetUserFields() []UserFieldsEnum { // GetUserFieldsOk returns a tuple with the UserFields field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *IdentificationStage) GetUserFieldsOk() ([]UserFieldsEnum, bool) { - if o == nil || o.UserFields == nil { + if o == nil || IsNil(o.UserFields) { return nil, false } return o.UserFields, true @@ -266,7 +269,7 @@ func (o *IdentificationStage) GetUserFieldsOk() ([]UserFieldsEnum, bool) { // HasUserFields returns a boolean if a field has been set. func (o *IdentificationStage) HasUserFields() bool { - if o != nil && o.UserFields != nil { + if o != nil && !IsNil(o.UserFields) { return true } @@ -280,7 +283,7 @@ func (o *IdentificationStage) SetUserFields(v []UserFieldsEnum) { // GetPasswordStage returns the PasswordStage field value if set, zero value otherwise (both if not set or set to explicit null). func (o *IdentificationStage) GetPasswordStage() string { - if o == nil || o.PasswordStage.Get() == nil { + if o == nil || IsNil(o.PasswordStage.Get()) { var ret string return ret } @@ -323,7 +326,7 @@ func (o *IdentificationStage) UnsetPasswordStage() { // GetCaseInsensitiveMatching returns the CaseInsensitiveMatching field value if set, zero value otherwise. func (o *IdentificationStage) GetCaseInsensitiveMatching() bool { - if o == nil || o.CaseInsensitiveMatching == nil { + if o == nil || IsNil(o.CaseInsensitiveMatching) { var ret bool return ret } @@ -333,7 +336,7 @@ func (o *IdentificationStage) GetCaseInsensitiveMatching() bool { // GetCaseInsensitiveMatchingOk returns a tuple with the CaseInsensitiveMatching field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *IdentificationStage) GetCaseInsensitiveMatchingOk() (*bool, bool) { - if o == nil || o.CaseInsensitiveMatching == nil { + if o == nil || IsNil(o.CaseInsensitiveMatching) { return nil, false } return o.CaseInsensitiveMatching, true @@ -341,7 +344,7 @@ func (o *IdentificationStage) GetCaseInsensitiveMatchingOk() (*bool, bool) { // HasCaseInsensitiveMatching returns a boolean if a field has been set. func (o *IdentificationStage) HasCaseInsensitiveMatching() bool { - if o != nil && o.CaseInsensitiveMatching != nil { + if o != nil && !IsNil(o.CaseInsensitiveMatching) { return true } @@ -355,7 +358,7 @@ func (o *IdentificationStage) SetCaseInsensitiveMatching(v bool) { // GetShowMatchedUser returns the ShowMatchedUser field value if set, zero value otherwise. func (o *IdentificationStage) GetShowMatchedUser() bool { - if o == nil || o.ShowMatchedUser == nil { + if o == nil || IsNil(o.ShowMatchedUser) { var ret bool return ret } @@ -365,7 +368,7 @@ func (o *IdentificationStage) GetShowMatchedUser() bool { // GetShowMatchedUserOk returns a tuple with the ShowMatchedUser field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *IdentificationStage) GetShowMatchedUserOk() (*bool, bool) { - if o == nil || o.ShowMatchedUser == nil { + if o == nil || IsNil(o.ShowMatchedUser) { return nil, false } return o.ShowMatchedUser, true @@ -373,7 +376,7 @@ func (o *IdentificationStage) GetShowMatchedUserOk() (*bool, bool) { // HasShowMatchedUser returns a boolean if a field has been set. func (o *IdentificationStage) HasShowMatchedUser() bool { - if o != nil && o.ShowMatchedUser != nil { + if o != nil && !IsNil(o.ShowMatchedUser) { return true } @@ -387,7 +390,7 @@ func (o *IdentificationStage) SetShowMatchedUser(v bool) { // GetEnrollmentFlow returns the EnrollmentFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *IdentificationStage) GetEnrollmentFlow() string { - if o == nil || o.EnrollmentFlow.Get() == nil { + if o == nil || IsNil(o.EnrollmentFlow.Get()) { var ret string return ret } @@ -430,7 +433,7 @@ func (o *IdentificationStage) UnsetEnrollmentFlow() { // GetRecoveryFlow returns the RecoveryFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *IdentificationStage) GetRecoveryFlow() string { - if o == nil || o.RecoveryFlow.Get() == nil { + if o == nil || IsNil(o.RecoveryFlow.Get()) { var ret string return ret } @@ -473,7 +476,7 @@ func (o *IdentificationStage) UnsetRecoveryFlow() { // GetPasswordlessFlow returns the PasswordlessFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *IdentificationStage) GetPasswordlessFlow() string { - if o == nil || o.PasswordlessFlow.Get() == nil { + if o == nil || IsNil(o.PasswordlessFlow.Get()) { var ret string return ret } @@ -516,7 +519,7 @@ func (o *IdentificationStage) UnsetPasswordlessFlow() { // GetSources returns the Sources field value if set, zero value otherwise. func (o *IdentificationStage) GetSources() []string { - if o == nil || o.Sources == nil { + if o == nil || IsNil(o.Sources) { var ret []string return ret } @@ -526,7 +529,7 @@ func (o *IdentificationStage) GetSources() []string { // GetSourcesOk returns a tuple with the Sources field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *IdentificationStage) GetSourcesOk() ([]string, bool) { - if o == nil || o.Sources == nil { + if o == nil || IsNil(o.Sources) { return nil, false } return o.Sources, true @@ -534,7 +537,7 @@ func (o *IdentificationStage) GetSourcesOk() ([]string, bool) { // HasSources returns a boolean if a field has been set. func (o *IdentificationStage) HasSources() bool { - if o != nil && o.Sources != nil { + if o != nil && !IsNil(o.Sources) { return true } @@ -548,7 +551,7 @@ func (o *IdentificationStage) SetSources(v []string) { // GetShowSourceLabels returns the ShowSourceLabels field value if set, zero value otherwise. func (o *IdentificationStage) GetShowSourceLabels() bool { - if o == nil || o.ShowSourceLabels == nil { + if o == nil || IsNil(o.ShowSourceLabels) { var ret bool return ret } @@ -558,7 +561,7 @@ func (o *IdentificationStage) GetShowSourceLabels() bool { // GetShowSourceLabelsOk returns a tuple with the ShowSourceLabels field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *IdentificationStage) GetShowSourceLabelsOk() (*bool, bool) { - if o == nil || o.ShowSourceLabels == nil { + if o == nil || IsNil(o.ShowSourceLabels) { return nil, false } return o.ShowSourceLabels, true @@ -566,7 +569,7 @@ func (o *IdentificationStage) GetShowSourceLabelsOk() (*bool, bool) { // HasShowSourceLabels returns a boolean if a field has been set. func (o *IdentificationStage) HasShowSourceLabels() bool { - if o != nil && o.ShowSourceLabels != nil { + if o != nil && !IsNil(o.ShowSourceLabels) { return true } @@ -579,38 +582,34 @@ func (o *IdentificationStage) SetShowSourceLabels(v bool) { } func (o IdentificationStage) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["component"] = o.Component - } - if true { - toSerialize["verbose_name"] = o.VerboseName - } - if true { - toSerialize["verbose_name_plural"] = o.VerboseNamePlural + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if true { - toSerialize["meta_model_name"] = o.MetaModelName - } - if o.FlowSet != nil { + return json.Marshal(toSerialize) +} + +func (o IdentificationStage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name + // skip: component is readOnly + // skip: verbose_name is readOnly + // skip: verbose_name_plural is readOnly + // skip: meta_model_name is readOnly + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } - if o.UserFields != nil { + if !IsNil(o.UserFields) { toSerialize["user_fields"] = o.UserFields } if o.PasswordStage.IsSet() { toSerialize["password_stage"] = o.PasswordStage.Get() } - if o.CaseInsensitiveMatching != nil { + if !IsNil(o.CaseInsensitiveMatching) { toSerialize["case_insensitive_matching"] = o.CaseInsensitiveMatching } - if o.ShowMatchedUser != nil { + if !IsNil(o.ShowMatchedUser) { toSerialize["show_matched_user"] = o.ShowMatchedUser } if o.EnrollmentFlow.IsSet() { @@ -622,13 +621,13 @@ func (o IdentificationStage) MarshalJSON() ([]byte, error) { if o.PasswordlessFlow.IsSet() { toSerialize["passwordless_flow"] = o.PasswordlessFlow.Get() } - if o.Sources != nil { + if !IsNil(o.Sources) { toSerialize["sources"] = o.Sources } - if o.ShowSourceLabels != nil { + if !IsNil(o.ShowSourceLabels) { toSerialize["show_source_labels"] = o.ShowSourceLabels } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableIdentificationStage struct { diff --git a/model_identification_stage_request.go b/model_identification_stage_request.go index 3ec14d94d..93c250835 100644 --- a/model_identification_stage_request.go +++ b/model_identification_stage_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the IdentificationStageRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &IdentificationStageRequest{} + // IdentificationStageRequest IdentificationStage Serializer type IdentificationStageRequest struct { Name string `json:"name"` @@ -82,7 +85,7 @@ func (o *IdentificationStageRequest) SetName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *IdentificationStageRequest) GetFlowSet() []FlowSetRequest { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSetRequest return ret } @@ -92,7 +95,7 @@ func (o *IdentificationStageRequest) GetFlowSet() []FlowSetRequest { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *IdentificationStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -100,7 +103,7 @@ func (o *IdentificationStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { // HasFlowSet returns a boolean if a field has been set. func (o *IdentificationStageRequest) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -114,7 +117,7 @@ func (o *IdentificationStageRequest) SetFlowSet(v []FlowSetRequest) { // GetUserFields returns the UserFields field value if set, zero value otherwise. func (o *IdentificationStageRequest) GetUserFields() []UserFieldsEnum { - if o == nil || o.UserFields == nil { + if o == nil || IsNil(o.UserFields) { var ret []UserFieldsEnum return ret } @@ -124,7 +127,7 @@ func (o *IdentificationStageRequest) GetUserFields() []UserFieldsEnum { // GetUserFieldsOk returns a tuple with the UserFields field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *IdentificationStageRequest) GetUserFieldsOk() ([]UserFieldsEnum, bool) { - if o == nil || o.UserFields == nil { + if o == nil || IsNil(o.UserFields) { return nil, false } return o.UserFields, true @@ -132,7 +135,7 @@ func (o *IdentificationStageRequest) GetUserFieldsOk() ([]UserFieldsEnum, bool) // HasUserFields returns a boolean if a field has been set. func (o *IdentificationStageRequest) HasUserFields() bool { - if o != nil && o.UserFields != nil { + if o != nil && !IsNil(o.UserFields) { return true } @@ -146,7 +149,7 @@ func (o *IdentificationStageRequest) SetUserFields(v []UserFieldsEnum) { // GetPasswordStage returns the PasswordStage field value if set, zero value otherwise (both if not set or set to explicit null). func (o *IdentificationStageRequest) GetPasswordStage() string { - if o == nil || o.PasswordStage.Get() == nil { + if o == nil || IsNil(o.PasswordStage.Get()) { var ret string return ret } @@ -189,7 +192,7 @@ func (o *IdentificationStageRequest) UnsetPasswordStage() { // GetCaseInsensitiveMatching returns the CaseInsensitiveMatching field value if set, zero value otherwise. func (o *IdentificationStageRequest) GetCaseInsensitiveMatching() bool { - if o == nil || o.CaseInsensitiveMatching == nil { + if o == nil || IsNil(o.CaseInsensitiveMatching) { var ret bool return ret } @@ -199,7 +202,7 @@ func (o *IdentificationStageRequest) GetCaseInsensitiveMatching() bool { // GetCaseInsensitiveMatchingOk returns a tuple with the CaseInsensitiveMatching field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *IdentificationStageRequest) GetCaseInsensitiveMatchingOk() (*bool, bool) { - if o == nil || o.CaseInsensitiveMatching == nil { + if o == nil || IsNil(o.CaseInsensitiveMatching) { return nil, false } return o.CaseInsensitiveMatching, true @@ -207,7 +210,7 @@ func (o *IdentificationStageRequest) GetCaseInsensitiveMatchingOk() (*bool, bool // HasCaseInsensitiveMatching returns a boolean if a field has been set. func (o *IdentificationStageRequest) HasCaseInsensitiveMatching() bool { - if o != nil && o.CaseInsensitiveMatching != nil { + if o != nil && !IsNil(o.CaseInsensitiveMatching) { return true } @@ -221,7 +224,7 @@ func (o *IdentificationStageRequest) SetCaseInsensitiveMatching(v bool) { // GetShowMatchedUser returns the ShowMatchedUser field value if set, zero value otherwise. func (o *IdentificationStageRequest) GetShowMatchedUser() bool { - if o == nil || o.ShowMatchedUser == nil { + if o == nil || IsNil(o.ShowMatchedUser) { var ret bool return ret } @@ -231,7 +234,7 @@ func (o *IdentificationStageRequest) GetShowMatchedUser() bool { // GetShowMatchedUserOk returns a tuple with the ShowMatchedUser field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *IdentificationStageRequest) GetShowMatchedUserOk() (*bool, bool) { - if o == nil || o.ShowMatchedUser == nil { + if o == nil || IsNil(o.ShowMatchedUser) { return nil, false } return o.ShowMatchedUser, true @@ -239,7 +242,7 @@ func (o *IdentificationStageRequest) GetShowMatchedUserOk() (*bool, bool) { // HasShowMatchedUser returns a boolean if a field has been set. func (o *IdentificationStageRequest) HasShowMatchedUser() bool { - if o != nil && o.ShowMatchedUser != nil { + if o != nil && !IsNil(o.ShowMatchedUser) { return true } @@ -253,7 +256,7 @@ func (o *IdentificationStageRequest) SetShowMatchedUser(v bool) { // GetEnrollmentFlow returns the EnrollmentFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *IdentificationStageRequest) GetEnrollmentFlow() string { - if o == nil || o.EnrollmentFlow.Get() == nil { + if o == nil || IsNil(o.EnrollmentFlow.Get()) { var ret string return ret } @@ -296,7 +299,7 @@ func (o *IdentificationStageRequest) UnsetEnrollmentFlow() { // GetRecoveryFlow returns the RecoveryFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *IdentificationStageRequest) GetRecoveryFlow() string { - if o == nil || o.RecoveryFlow.Get() == nil { + if o == nil || IsNil(o.RecoveryFlow.Get()) { var ret string return ret } @@ -339,7 +342,7 @@ func (o *IdentificationStageRequest) UnsetRecoveryFlow() { // GetPasswordlessFlow returns the PasswordlessFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *IdentificationStageRequest) GetPasswordlessFlow() string { - if o == nil || o.PasswordlessFlow.Get() == nil { + if o == nil || IsNil(o.PasswordlessFlow.Get()) { var ret string return ret } @@ -382,7 +385,7 @@ func (o *IdentificationStageRequest) UnsetPasswordlessFlow() { // GetSources returns the Sources field value if set, zero value otherwise. func (o *IdentificationStageRequest) GetSources() []string { - if o == nil || o.Sources == nil { + if o == nil || IsNil(o.Sources) { var ret []string return ret } @@ -392,7 +395,7 @@ func (o *IdentificationStageRequest) GetSources() []string { // GetSourcesOk returns a tuple with the Sources field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *IdentificationStageRequest) GetSourcesOk() ([]string, bool) { - if o == nil || o.Sources == nil { + if o == nil || IsNil(o.Sources) { return nil, false } return o.Sources, true @@ -400,7 +403,7 @@ func (o *IdentificationStageRequest) GetSourcesOk() ([]string, bool) { // HasSources returns a boolean if a field has been set. func (o *IdentificationStageRequest) HasSources() bool { - if o != nil && o.Sources != nil { + if o != nil && !IsNil(o.Sources) { return true } @@ -414,7 +417,7 @@ func (o *IdentificationStageRequest) SetSources(v []string) { // GetShowSourceLabels returns the ShowSourceLabels field value if set, zero value otherwise. func (o *IdentificationStageRequest) GetShowSourceLabels() bool { - if o == nil || o.ShowSourceLabels == nil { + if o == nil || IsNil(o.ShowSourceLabels) { var ret bool return ret } @@ -424,7 +427,7 @@ func (o *IdentificationStageRequest) GetShowSourceLabels() bool { // GetShowSourceLabelsOk returns a tuple with the ShowSourceLabels field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *IdentificationStageRequest) GetShowSourceLabelsOk() (*bool, bool) { - if o == nil || o.ShowSourceLabels == nil { + if o == nil || IsNil(o.ShowSourceLabels) { return nil, false } return o.ShowSourceLabels, true @@ -432,7 +435,7 @@ func (o *IdentificationStageRequest) GetShowSourceLabelsOk() (*bool, bool) { // HasShowSourceLabels returns a boolean if a field has been set. func (o *IdentificationStageRequest) HasShowSourceLabels() bool { - if o != nil && o.ShowSourceLabels != nil { + if o != nil && !IsNil(o.ShowSourceLabels) { return true } @@ -445,23 +448,29 @@ func (o *IdentificationStageRequest) SetShowSourceLabels(v bool) { } func (o IdentificationStageRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.FlowSet != nil { + return json.Marshal(toSerialize) +} + +func (o IdentificationStageRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } - if o.UserFields != nil { + if !IsNil(o.UserFields) { toSerialize["user_fields"] = o.UserFields } if o.PasswordStage.IsSet() { toSerialize["password_stage"] = o.PasswordStage.Get() } - if o.CaseInsensitiveMatching != nil { + if !IsNil(o.CaseInsensitiveMatching) { toSerialize["case_insensitive_matching"] = o.CaseInsensitiveMatching } - if o.ShowMatchedUser != nil { + if !IsNil(o.ShowMatchedUser) { toSerialize["show_matched_user"] = o.ShowMatchedUser } if o.EnrollmentFlow.IsSet() { @@ -473,13 +482,13 @@ func (o IdentificationStageRequest) MarshalJSON() ([]byte, error) { if o.PasswordlessFlow.IsSet() { toSerialize["passwordless_flow"] = o.PasswordlessFlow.Get() } - if o.Sources != nil { + if !IsNil(o.Sources) { toSerialize["sources"] = o.Sources } - if o.ShowSourceLabels != nil { + if !IsNil(o.ShowSourceLabels) { toSerialize["show_source_labels"] = o.ShowSourceLabels } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableIdentificationStageRequest struct { diff --git a/model_invitation.go b/model_invitation.go index 4eca0716b..8280156dc 100644 --- a/model_invitation.go +++ b/model_invitation.go @@ -16,25 +16,28 @@ import ( "time" ) +// checks if the Invitation type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Invitation{} + // Invitation Invitation Serializer type Invitation struct { Pk string `json:"pk"` Name string `json:"name"` Expires *time.Time `json:"expires,omitempty"` FixedData map[string]interface{} `json:"fixed_data,omitempty"` - CreatedBy InvitationCreatedBy `json:"created_by"` + CreatedBy GroupMember `json:"created_by"` // When enabled, the invitation will be deleted after usage. SingleUse *bool `json:"single_use,omitempty"` // When set, only the configured flow can use this invitation. - Flow NullableString `json:"flow,omitempty"` - FlowObj InvitationFlowObj `json:"flow_obj"` + Flow NullableString `json:"flow,omitempty"` + FlowObj Flow `json:"flow_obj"` } // NewInvitation instantiates a new Invitation object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewInvitation(pk string, name string, createdBy InvitationCreatedBy, flowObj InvitationFlowObj) *Invitation { +func NewInvitation(pk string, name string, createdBy GroupMember, flowObj Flow) *Invitation { this := Invitation{} this.Pk = pk this.Name = name @@ -101,7 +104,7 @@ func (o *Invitation) SetName(v string) { // GetExpires returns the Expires field value if set, zero value otherwise. func (o *Invitation) GetExpires() time.Time { - if o == nil || o.Expires == nil { + if o == nil || IsNil(o.Expires) { var ret time.Time return ret } @@ -111,7 +114,7 @@ func (o *Invitation) GetExpires() time.Time { // GetExpiresOk returns a tuple with the Expires field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Invitation) GetExpiresOk() (*time.Time, bool) { - if o == nil || o.Expires == nil { + if o == nil || IsNil(o.Expires) { return nil, false } return o.Expires, true @@ -119,7 +122,7 @@ func (o *Invitation) GetExpiresOk() (*time.Time, bool) { // HasExpires returns a boolean if a field has been set. func (o *Invitation) HasExpires() bool { - if o != nil && o.Expires != nil { + if o != nil && !IsNil(o.Expires) { return true } @@ -133,7 +136,7 @@ func (o *Invitation) SetExpires(v time.Time) { // GetFixedData returns the FixedData field value if set, zero value otherwise. func (o *Invitation) GetFixedData() map[string]interface{} { - if o == nil || o.FixedData == nil { + if o == nil || IsNil(o.FixedData) { var ret map[string]interface{} return ret } @@ -143,15 +146,15 @@ func (o *Invitation) GetFixedData() map[string]interface{} { // GetFixedDataOk returns a tuple with the FixedData field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Invitation) GetFixedDataOk() (map[string]interface{}, bool) { - if o == nil || o.FixedData == nil { - return nil, false + if o == nil || IsNil(o.FixedData) { + return map[string]interface{}{}, false } return o.FixedData, true } // HasFixedData returns a boolean if a field has been set. func (o *Invitation) HasFixedData() bool { - if o != nil && o.FixedData != nil { + if o != nil && !IsNil(o.FixedData) { return true } @@ -164,9 +167,9 @@ func (o *Invitation) SetFixedData(v map[string]interface{}) { } // GetCreatedBy returns the CreatedBy field value -func (o *Invitation) GetCreatedBy() InvitationCreatedBy { +func (o *Invitation) GetCreatedBy() GroupMember { if o == nil { - var ret InvitationCreatedBy + var ret GroupMember return ret } @@ -175,7 +178,7 @@ func (o *Invitation) GetCreatedBy() InvitationCreatedBy { // GetCreatedByOk returns a tuple with the CreatedBy field value // and a boolean to check if the value has been set. -func (o *Invitation) GetCreatedByOk() (*InvitationCreatedBy, bool) { +func (o *Invitation) GetCreatedByOk() (*GroupMember, bool) { if o == nil { return nil, false } @@ -183,13 +186,13 @@ func (o *Invitation) GetCreatedByOk() (*InvitationCreatedBy, bool) { } // SetCreatedBy sets field value -func (o *Invitation) SetCreatedBy(v InvitationCreatedBy) { +func (o *Invitation) SetCreatedBy(v GroupMember) { o.CreatedBy = v } // GetSingleUse returns the SingleUse field value if set, zero value otherwise. func (o *Invitation) GetSingleUse() bool { - if o == nil || o.SingleUse == nil { + if o == nil || IsNil(o.SingleUse) { var ret bool return ret } @@ -199,7 +202,7 @@ func (o *Invitation) GetSingleUse() bool { // GetSingleUseOk returns a tuple with the SingleUse field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Invitation) GetSingleUseOk() (*bool, bool) { - if o == nil || o.SingleUse == nil { + if o == nil || IsNil(o.SingleUse) { return nil, false } return o.SingleUse, true @@ -207,7 +210,7 @@ func (o *Invitation) GetSingleUseOk() (*bool, bool) { // HasSingleUse returns a boolean if a field has been set. func (o *Invitation) HasSingleUse() bool { - if o != nil && o.SingleUse != nil { + if o != nil && !IsNil(o.SingleUse) { return true } @@ -221,7 +224,7 @@ func (o *Invitation) SetSingleUse(v bool) { // GetFlow returns the Flow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *Invitation) GetFlow() string { - if o == nil || o.Flow.Get() == nil { + if o == nil || IsNil(o.Flow.Get()) { var ret string return ret } @@ -263,9 +266,9 @@ func (o *Invitation) UnsetFlow() { } // GetFlowObj returns the FlowObj field value -func (o *Invitation) GetFlowObj() InvitationFlowObj { +func (o *Invitation) GetFlowObj() Flow { if o == nil { - var ret InvitationFlowObj + var ret Flow return ret } @@ -274,7 +277,7 @@ func (o *Invitation) GetFlowObj() InvitationFlowObj { // GetFlowObjOk returns a tuple with the FlowObj field value // and a boolean to check if the value has been set. -func (o *Invitation) GetFlowObjOk() (*InvitationFlowObj, bool) { +func (o *Invitation) GetFlowObjOk() (*Flow, bool) { if o == nil { return nil, false } @@ -282,37 +285,37 @@ func (o *Invitation) GetFlowObjOk() (*InvitationFlowObj, bool) { } // SetFlowObj sets field value -func (o *Invitation) SetFlowObj(v InvitationFlowObj) { +func (o *Invitation) SetFlowObj(v Flow) { o.FlowObj = v } func (o Invitation) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if true { - toSerialize["name"] = o.Name - } - if o.Expires != nil { + return json.Marshal(toSerialize) +} + +func (o Invitation) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name + if !IsNil(o.Expires) { toSerialize["expires"] = o.Expires } - if o.FixedData != nil { + if !IsNil(o.FixedData) { toSerialize["fixed_data"] = o.FixedData } - if true { - toSerialize["created_by"] = o.CreatedBy - } - if o.SingleUse != nil { + // skip: created_by is readOnly + if !IsNil(o.SingleUse) { toSerialize["single_use"] = o.SingleUse } if o.Flow.IsSet() { toSerialize["flow"] = o.Flow.Get() } - if true { - toSerialize["flow_obj"] = o.FlowObj - } - return json.Marshal(toSerialize) + // skip: flow_obj is readOnly + return toSerialize, nil } type NullableInvitation struct { diff --git a/model_invitation_created_by.go b/model_invitation_created_by.go deleted file mode 100644 index 607dd48e6..000000000 --- a/model_invitation_created_by.go +++ /dev/null @@ -1,353 +0,0 @@ -/* -authentik - -Making authentication simple. - -API version: 2023.3.1 -Contact: hello@goauthentik.io -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package api - -import ( - "encoding/json" - "time" -) - -// InvitationCreatedBy struct for InvitationCreatedBy -type InvitationCreatedBy struct { - Pk int32 `json:"pk"` - // Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. - Username string `json:"username"` - // User's display name. - Name string `json:"name"` - // Designates whether this user should be treated as active. Unselect this instead of deleting accounts. - IsActive *bool `json:"is_active,omitempty"` - LastLogin NullableTime `json:"last_login,omitempty"` - Email *string `json:"email,omitempty"` - Attributes map[string]interface{} `json:"attributes,omitempty"` - Uid string `json:"uid"` -} - -// NewInvitationCreatedBy instantiates a new InvitationCreatedBy object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewInvitationCreatedBy(pk int32, username string, name string, uid string) *InvitationCreatedBy { - this := InvitationCreatedBy{} - this.Pk = pk - this.Username = username - this.Name = name - this.Uid = uid - return &this -} - -// NewInvitationCreatedByWithDefaults instantiates a new InvitationCreatedBy object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewInvitationCreatedByWithDefaults() *InvitationCreatedBy { - this := InvitationCreatedBy{} - return &this -} - -// GetPk returns the Pk field value -func (o *InvitationCreatedBy) GetPk() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.Pk -} - -// GetPkOk returns a tuple with the Pk field value -// and a boolean to check if the value has been set. -func (o *InvitationCreatedBy) GetPkOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.Pk, true -} - -// SetPk sets field value -func (o *InvitationCreatedBy) SetPk(v int32) { - o.Pk = v -} - -// GetUsername returns the Username field value -func (o *InvitationCreatedBy) GetUsername() string { - if o == nil { - var ret string - return ret - } - - return o.Username -} - -// GetUsernameOk returns a tuple with the Username field value -// and a boolean to check if the value has been set. -func (o *InvitationCreatedBy) GetUsernameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Username, true -} - -// SetUsername sets field value -func (o *InvitationCreatedBy) SetUsername(v string) { - o.Username = v -} - -// GetName returns the Name field value -func (o *InvitationCreatedBy) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *InvitationCreatedBy) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *InvitationCreatedBy) SetName(v string) { - o.Name = v -} - -// GetIsActive returns the IsActive field value if set, zero value otherwise. -func (o *InvitationCreatedBy) GetIsActive() bool { - if o == nil || o.IsActive == nil { - var ret bool - return ret - } - return *o.IsActive -} - -// GetIsActiveOk returns a tuple with the IsActive field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvitationCreatedBy) GetIsActiveOk() (*bool, bool) { - if o == nil || o.IsActive == nil { - return nil, false - } - return o.IsActive, true -} - -// HasIsActive returns a boolean if a field has been set. -func (o *InvitationCreatedBy) HasIsActive() bool { - if o != nil && o.IsActive != nil { - return true - } - - return false -} - -// SetIsActive gets a reference to the given bool and assigns it to the IsActive field. -func (o *InvitationCreatedBy) SetIsActive(v bool) { - o.IsActive = &v -} - -// GetLastLogin returns the LastLogin field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *InvitationCreatedBy) GetLastLogin() time.Time { - if o == nil || o.LastLogin.Get() == nil { - var ret time.Time - return ret - } - return *o.LastLogin.Get() -} - -// GetLastLoginOk returns a tuple with the LastLogin field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *InvitationCreatedBy) GetLastLoginOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return o.LastLogin.Get(), o.LastLogin.IsSet() -} - -// HasLastLogin returns a boolean if a field has been set. -func (o *InvitationCreatedBy) HasLastLogin() bool { - if o != nil && o.LastLogin.IsSet() { - return true - } - - return false -} - -// SetLastLogin gets a reference to the given NullableTime and assigns it to the LastLogin field. -func (o *InvitationCreatedBy) SetLastLogin(v time.Time) { - o.LastLogin.Set(&v) -} - -// SetLastLoginNil sets the value for LastLogin to be an explicit nil -func (o *InvitationCreatedBy) SetLastLoginNil() { - o.LastLogin.Set(nil) -} - -// UnsetLastLogin ensures that no value is present for LastLogin, not even an explicit nil -func (o *InvitationCreatedBy) UnsetLastLogin() { - o.LastLogin.Unset() -} - -// GetEmail returns the Email field value if set, zero value otherwise. -func (o *InvitationCreatedBy) GetEmail() string { - if o == nil || o.Email == nil { - var ret string - return ret - } - return *o.Email -} - -// GetEmailOk returns a tuple with the Email field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvitationCreatedBy) GetEmailOk() (*string, bool) { - if o == nil || o.Email == nil { - return nil, false - } - return o.Email, true -} - -// HasEmail returns a boolean if a field has been set. -func (o *InvitationCreatedBy) HasEmail() bool { - if o != nil && o.Email != nil { - return true - } - - return false -} - -// SetEmail gets a reference to the given string and assigns it to the Email field. -func (o *InvitationCreatedBy) SetEmail(v string) { - o.Email = &v -} - -// GetAttributes returns the Attributes field value if set, zero value otherwise. -func (o *InvitationCreatedBy) GetAttributes() map[string]interface{} { - if o == nil || o.Attributes == nil { - var ret map[string]interface{} - return ret - } - return o.Attributes -} - -// GetAttributesOk returns a tuple with the Attributes field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvitationCreatedBy) GetAttributesOk() (map[string]interface{}, bool) { - if o == nil || o.Attributes == nil { - return nil, false - } - return o.Attributes, true -} - -// HasAttributes returns a boolean if a field has been set. -func (o *InvitationCreatedBy) HasAttributes() bool { - if o != nil && o.Attributes != nil { - return true - } - - return false -} - -// SetAttributes gets a reference to the given map[string]interface{} and assigns it to the Attributes field. -func (o *InvitationCreatedBy) SetAttributes(v map[string]interface{}) { - o.Attributes = v -} - -// GetUid returns the Uid field value -func (o *InvitationCreatedBy) GetUid() string { - if o == nil { - var ret string - return ret - } - - return o.Uid -} - -// GetUidOk returns a tuple with the Uid field value -// and a boolean to check if the value has been set. -func (o *InvitationCreatedBy) GetUidOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Uid, true -} - -// SetUid sets field value -func (o *InvitationCreatedBy) SetUid(v string) { - o.Uid = v -} - -func (o InvitationCreatedBy) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["username"] = o.Username - } - if true { - toSerialize["name"] = o.Name - } - if o.IsActive != nil { - toSerialize["is_active"] = o.IsActive - } - if o.LastLogin.IsSet() { - toSerialize["last_login"] = o.LastLogin.Get() - } - if o.Email != nil { - toSerialize["email"] = o.Email - } - if o.Attributes != nil { - toSerialize["attributes"] = o.Attributes - } - if true { - toSerialize["uid"] = o.Uid - } - return json.Marshal(toSerialize) -} - -type NullableInvitationCreatedBy struct { - value *InvitationCreatedBy - isSet bool -} - -func (v NullableInvitationCreatedBy) Get() *InvitationCreatedBy { - return v.value -} - -func (v *NullableInvitationCreatedBy) Set(val *InvitationCreatedBy) { - v.value = val - v.isSet = true -} - -func (v NullableInvitationCreatedBy) IsSet() bool { - return v.isSet -} - -func (v *NullableInvitationCreatedBy) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInvitationCreatedBy(val *InvitationCreatedBy) *NullableInvitationCreatedBy { - return &NullableInvitationCreatedBy{value: val, isSet: true} -} - -func (v NullableInvitationCreatedBy) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInvitationCreatedBy) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/model_invitation_flow_obj.go b/model_invitation_flow_obj.go deleted file mode 100644 index 8f4df0468..000000000 --- a/model_invitation_flow_obj.go +++ /dev/null @@ -1,610 +0,0 @@ -/* -authentik - -Making authentication simple. - -API version: 2023.3.1 -Contact: hello@goauthentik.io -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package api - -import ( - "encoding/json" -) - -// InvitationFlowObj struct for InvitationFlowObj -type InvitationFlowObj struct { - Pk string `json:"pk"` - PolicybindingmodelPtrId string `json:"policybindingmodel_ptr_id"` - Name string `json:"name"` - // Visible in the URL. - Slug string `json:"slug"` - // Shown as the Title in Flow pages. - Title string `json:"title"` - // Decides what this Flow is used for. For example, the Authentication flow is redirect to when an un-authenticated user visits authentik. * `authentication` - Authentication * `authorization` - Authorization * `invalidation` - Invalidation * `enrollment` - Enrollment * `unenrollment` - Unrenollment * `recovery` - Recovery * `stage_configuration` - Stage Configuration - Designation NullableFlowDesignationEnum `json:"designation"` - // Get the URL to the background image. If the name is /static or starts with http it is returned as-is - Background string `json:"background"` - Stages []string `json:"stages"` - Policies []string `json:"policies"` - // Get count of cached flows - CacheCount int32 `json:"cache_count"` - PolicyEngineMode *PolicyEngineMode `json:"policy_engine_mode,omitempty"` - // Enable compatibility mode, increases compatibility with password managers on mobile devices. - CompatibilityMode *bool `json:"compatibility_mode,omitempty"` - // Get export URL for flow - ExportUrl string `json:"export_url"` - Layout *LayoutEnum `json:"layout,omitempty"` - // Configure what should happen when a flow denies access to a user. * `message_continue` - Message Continue * `message` - Message * `continue` - Continue - DeniedAction NullableDeniedActionEnum `json:"denied_action,omitempty"` - // Required level of authentication and authorization to access a flow. * `none` - None * `require_authenticated` - Require Authenticated * `require_unauthenticated` - Require Unauthenticated * `require_superuser` - Require Superuser - Authentication NullableAuthenticationEnum `json:"authentication,omitempty"` -} - -// NewInvitationFlowObj instantiates a new InvitationFlowObj object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewInvitationFlowObj(pk string, policybindingmodelPtrId string, name string, slug string, title string, designation NullableFlowDesignationEnum, background string, stages []string, policies []string, cacheCount int32, exportUrl string) *InvitationFlowObj { - this := InvitationFlowObj{} - this.Pk = pk - this.PolicybindingmodelPtrId = policybindingmodelPtrId - this.Name = name - this.Slug = slug - this.Title = title - this.Designation = designation - this.Background = background - this.Stages = stages - this.Policies = policies - this.CacheCount = cacheCount - this.ExportUrl = exportUrl - return &this -} - -// NewInvitationFlowObjWithDefaults instantiates a new InvitationFlowObj object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewInvitationFlowObjWithDefaults() *InvitationFlowObj { - this := InvitationFlowObj{} - return &this -} - -// GetPk returns the Pk field value -func (o *InvitationFlowObj) GetPk() string { - if o == nil { - var ret string - return ret - } - - return o.Pk -} - -// GetPkOk returns a tuple with the Pk field value -// and a boolean to check if the value has been set. -func (o *InvitationFlowObj) GetPkOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Pk, true -} - -// SetPk sets field value -func (o *InvitationFlowObj) SetPk(v string) { - o.Pk = v -} - -// GetPolicybindingmodelPtrId returns the PolicybindingmodelPtrId field value -func (o *InvitationFlowObj) GetPolicybindingmodelPtrId() string { - if o == nil { - var ret string - return ret - } - - return o.PolicybindingmodelPtrId -} - -// GetPolicybindingmodelPtrIdOk returns a tuple with the PolicybindingmodelPtrId field value -// and a boolean to check if the value has been set. -func (o *InvitationFlowObj) GetPolicybindingmodelPtrIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.PolicybindingmodelPtrId, true -} - -// SetPolicybindingmodelPtrId sets field value -func (o *InvitationFlowObj) SetPolicybindingmodelPtrId(v string) { - o.PolicybindingmodelPtrId = v -} - -// GetName returns the Name field value -func (o *InvitationFlowObj) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *InvitationFlowObj) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *InvitationFlowObj) SetName(v string) { - o.Name = v -} - -// GetSlug returns the Slug field value -func (o *InvitationFlowObj) GetSlug() string { - if o == nil { - var ret string - return ret - } - - return o.Slug -} - -// GetSlugOk returns a tuple with the Slug field value -// and a boolean to check if the value has been set. -func (o *InvitationFlowObj) GetSlugOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Slug, true -} - -// SetSlug sets field value -func (o *InvitationFlowObj) SetSlug(v string) { - o.Slug = v -} - -// GetTitle returns the Title field value -func (o *InvitationFlowObj) GetTitle() string { - if o == nil { - var ret string - return ret - } - - return o.Title -} - -// GetTitleOk returns a tuple with the Title field value -// and a boolean to check if the value has been set. -func (o *InvitationFlowObj) GetTitleOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Title, true -} - -// SetTitle sets field value -func (o *InvitationFlowObj) SetTitle(v string) { - o.Title = v -} - -// GetDesignation returns the Designation field value -// If the value is explicit nil, the zero value for FlowDesignationEnum will be returned -func (o *InvitationFlowObj) GetDesignation() FlowDesignationEnum { - if o == nil || o.Designation.Get() == nil { - var ret FlowDesignationEnum - return ret - } - - return *o.Designation.Get() -} - -// GetDesignationOk returns a tuple with the Designation field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *InvitationFlowObj) GetDesignationOk() (*FlowDesignationEnum, bool) { - if o == nil { - return nil, false - } - return o.Designation.Get(), o.Designation.IsSet() -} - -// SetDesignation sets field value -func (o *InvitationFlowObj) SetDesignation(v FlowDesignationEnum) { - o.Designation.Set(&v) -} - -// GetBackground returns the Background field value -func (o *InvitationFlowObj) GetBackground() string { - if o == nil { - var ret string - return ret - } - - return o.Background -} - -// GetBackgroundOk returns a tuple with the Background field value -// and a boolean to check if the value has been set. -func (o *InvitationFlowObj) GetBackgroundOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Background, true -} - -// SetBackground sets field value -func (o *InvitationFlowObj) SetBackground(v string) { - o.Background = v -} - -// GetStages returns the Stages field value -func (o *InvitationFlowObj) GetStages() []string { - if o == nil { - var ret []string - return ret - } - - return o.Stages -} - -// GetStagesOk returns a tuple with the Stages field value -// and a boolean to check if the value has been set. -func (o *InvitationFlowObj) GetStagesOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.Stages, true -} - -// SetStages sets field value -func (o *InvitationFlowObj) SetStages(v []string) { - o.Stages = v -} - -// GetPolicies returns the Policies field value -func (o *InvitationFlowObj) GetPolicies() []string { - if o == nil { - var ret []string - return ret - } - - return o.Policies -} - -// GetPoliciesOk returns a tuple with the Policies field value -// and a boolean to check if the value has been set. -func (o *InvitationFlowObj) GetPoliciesOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.Policies, true -} - -// SetPolicies sets field value -func (o *InvitationFlowObj) SetPolicies(v []string) { - o.Policies = v -} - -// GetCacheCount returns the CacheCount field value -func (o *InvitationFlowObj) GetCacheCount() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.CacheCount -} - -// GetCacheCountOk returns a tuple with the CacheCount field value -// and a boolean to check if the value has been set. -func (o *InvitationFlowObj) GetCacheCountOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.CacheCount, true -} - -// SetCacheCount sets field value -func (o *InvitationFlowObj) SetCacheCount(v int32) { - o.CacheCount = v -} - -// GetPolicyEngineMode returns the PolicyEngineMode field value if set, zero value otherwise. -func (o *InvitationFlowObj) GetPolicyEngineMode() PolicyEngineMode { - if o == nil || o.PolicyEngineMode == nil { - var ret PolicyEngineMode - return ret - } - return *o.PolicyEngineMode -} - -// GetPolicyEngineModeOk returns a tuple with the PolicyEngineMode field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvitationFlowObj) GetPolicyEngineModeOk() (*PolicyEngineMode, bool) { - if o == nil || o.PolicyEngineMode == nil { - return nil, false - } - return o.PolicyEngineMode, true -} - -// HasPolicyEngineMode returns a boolean if a field has been set. -func (o *InvitationFlowObj) HasPolicyEngineMode() bool { - if o != nil && o.PolicyEngineMode != nil { - return true - } - - return false -} - -// SetPolicyEngineMode gets a reference to the given PolicyEngineMode and assigns it to the PolicyEngineMode field. -func (o *InvitationFlowObj) SetPolicyEngineMode(v PolicyEngineMode) { - o.PolicyEngineMode = &v -} - -// GetCompatibilityMode returns the CompatibilityMode field value if set, zero value otherwise. -func (o *InvitationFlowObj) GetCompatibilityMode() bool { - if o == nil || o.CompatibilityMode == nil { - var ret bool - return ret - } - return *o.CompatibilityMode -} - -// GetCompatibilityModeOk returns a tuple with the CompatibilityMode field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvitationFlowObj) GetCompatibilityModeOk() (*bool, bool) { - if o == nil || o.CompatibilityMode == nil { - return nil, false - } - return o.CompatibilityMode, true -} - -// HasCompatibilityMode returns a boolean if a field has been set. -func (o *InvitationFlowObj) HasCompatibilityMode() bool { - if o != nil && o.CompatibilityMode != nil { - return true - } - - return false -} - -// SetCompatibilityMode gets a reference to the given bool and assigns it to the CompatibilityMode field. -func (o *InvitationFlowObj) SetCompatibilityMode(v bool) { - o.CompatibilityMode = &v -} - -// GetExportUrl returns the ExportUrl field value -func (o *InvitationFlowObj) GetExportUrl() string { - if o == nil { - var ret string - return ret - } - - return o.ExportUrl -} - -// GetExportUrlOk returns a tuple with the ExportUrl field value -// and a boolean to check if the value has been set. -func (o *InvitationFlowObj) GetExportUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ExportUrl, true -} - -// SetExportUrl sets field value -func (o *InvitationFlowObj) SetExportUrl(v string) { - o.ExportUrl = v -} - -// GetLayout returns the Layout field value if set, zero value otherwise. -func (o *InvitationFlowObj) GetLayout() LayoutEnum { - if o == nil || o.Layout == nil { - var ret LayoutEnum - return ret - } - return *o.Layout -} - -// GetLayoutOk returns a tuple with the Layout field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvitationFlowObj) GetLayoutOk() (*LayoutEnum, bool) { - if o == nil || o.Layout == nil { - return nil, false - } - return o.Layout, true -} - -// HasLayout returns a boolean if a field has been set. -func (o *InvitationFlowObj) HasLayout() bool { - if o != nil && o.Layout != nil { - return true - } - - return false -} - -// SetLayout gets a reference to the given LayoutEnum and assigns it to the Layout field. -func (o *InvitationFlowObj) SetLayout(v LayoutEnum) { - o.Layout = &v -} - -// GetDeniedAction returns the DeniedAction field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *InvitationFlowObj) GetDeniedAction() DeniedActionEnum { - if o == nil || o.DeniedAction.Get() == nil { - var ret DeniedActionEnum - return ret - } - return *o.DeniedAction.Get() -} - -// GetDeniedActionOk returns a tuple with the DeniedAction field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *InvitationFlowObj) GetDeniedActionOk() (*DeniedActionEnum, bool) { - if o == nil { - return nil, false - } - return o.DeniedAction.Get(), o.DeniedAction.IsSet() -} - -// HasDeniedAction returns a boolean if a field has been set. -func (o *InvitationFlowObj) HasDeniedAction() bool { - if o != nil && o.DeniedAction.IsSet() { - return true - } - - return false -} - -// SetDeniedAction gets a reference to the given NullableDeniedActionEnum and assigns it to the DeniedAction field. -func (o *InvitationFlowObj) SetDeniedAction(v DeniedActionEnum) { - o.DeniedAction.Set(&v) -} - -// SetDeniedActionNil sets the value for DeniedAction to be an explicit nil -func (o *InvitationFlowObj) SetDeniedActionNil() { - o.DeniedAction.Set(nil) -} - -// UnsetDeniedAction ensures that no value is present for DeniedAction, not even an explicit nil -func (o *InvitationFlowObj) UnsetDeniedAction() { - o.DeniedAction.Unset() -} - -// GetAuthentication returns the Authentication field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *InvitationFlowObj) GetAuthentication() AuthenticationEnum { - if o == nil || o.Authentication.Get() == nil { - var ret AuthenticationEnum - return ret - } - return *o.Authentication.Get() -} - -// GetAuthenticationOk returns a tuple with the Authentication field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *InvitationFlowObj) GetAuthenticationOk() (*AuthenticationEnum, bool) { - if o == nil { - return nil, false - } - return o.Authentication.Get(), o.Authentication.IsSet() -} - -// HasAuthentication returns a boolean if a field has been set. -func (o *InvitationFlowObj) HasAuthentication() bool { - if o != nil && o.Authentication.IsSet() { - return true - } - - return false -} - -// SetAuthentication gets a reference to the given NullableAuthenticationEnum and assigns it to the Authentication field. -func (o *InvitationFlowObj) SetAuthentication(v AuthenticationEnum) { - o.Authentication.Set(&v) -} - -// SetAuthenticationNil sets the value for Authentication to be an explicit nil -func (o *InvitationFlowObj) SetAuthenticationNil() { - o.Authentication.Set(nil) -} - -// UnsetAuthentication ensures that no value is present for Authentication, not even an explicit nil -func (o *InvitationFlowObj) UnsetAuthentication() { - o.Authentication.Unset() -} - -func (o InvitationFlowObj) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["policybindingmodel_ptr_id"] = o.PolicybindingmodelPtrId - } - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["slug"] = o.Slug - } - if true { - toSerialize["title"] = o.Title - } - if true { - toSerialize["designation"] = o.Designation.Get() - } - if true { - toSerialize["background"] = o.Background - } - if true { - toSerialize["stages"] = o.Stages - } - if true { - toSerialize["policies"] = o.Policies - } - if true { - toSerialize["cache_count"] = o.CacheCount - } - if o.PolicyEngineMode != nil { - toSerialize["policy_engine_mode"] = o.PolicyEngineMode - } - if o.CompatibilityMode != nil { - toSerialize["compatibility_mode"] = o.CompatibilityMode - } - if true { - toSerialize["export_url"] = o.ExportUrl - } - if o.Layout != nil { - toSerialize["layout"] = o.Layout - } - if o.DeniedAction.IsSet() { - toSerialize["denied_action"] = o.DeniedAction.Get() - } - if o.Authentication.IsSet() { - toSerialize["authentication"] = o.Authentication.Get() - } - return json.Marshal(toSerialize) -} - -type NullableInvitationFlowObj struct { - value *InvitationFlowObj - isSet bool -} - -func (v NullableInvitationFlowObj) Get() *InvitationFlowObj { - return v.value -} - -func (v *NullableInvitationFlowObj) Set(val *InvitationFlowObj) { - v.value = val - v.isSet = true -} - -func (v NullableInvitationFlowObj) IsSet() bool { - return v.isSet -} - -func (v *NullableInvitationFlowObj) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInvitationFlowObj(val *InvitationFlowObj) *NullableInvitationFlowObj { - return &NullableInvitationFlowObj{value: val, isSet: true} -} - -func (v NullableInvitationFlowObj) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInvitationFlowObj) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/model_invitation_request.go b/model_invitation_request.go index 72673dde7..6c953bfbb 100644 --- a/model_invitation_request.go +++ b/model_invitation_request.go @@ -16,6 +16,9 @@ import ( "time" ) +// checks if the InvitationRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InvitationRequest{} + // InvitationRequest Invitation Serializer type InvitationRequest struct { Name string `json:"name"` @@ -71,7 +74,7 @@ func (o *InvitationRequest) SetName(v string) { // GetExpires returns the Expires field value if set, zero value otherwise. func (o *InvitationRequest) GetExpires() time.Time { - if o == nil || o.Expires == nil { + if o == nil || IsNil(o.Expires) { var ret time.Time return ret } @@ -81,7 +84,7 @@ func (o *InvitationRequest) GetExpires() time.Time { // GetExpiresOk returns a tuple with the Expires field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *InvitationRequest) GetExpiresOk() (*time.Time, bool) { - if o == nil || o.Expires == nil { + if o == nil || IsNil(o.Expires) { return nil, false } return o.Expires, true @@ -89,7 +92,7 @@ func (o *InvitationRequest) GetExpiresOk() (*time.Time, bool) { // HasExpires returns a boolean if a field has been set. func (o *InvitationRequest) HasExpires() bool { - if o != nil && o.Expires != nil { + if o != nil && !IsNil(o.Expires) { return true } @@ -103,7 +106,7 @@ func (o *InvitationRequest) SetExpires(v time.Time) { // GetFixedData returns the FixedData field value if set, zero value otherwise. func (o *InvitationRequest) GetFixedData() map[string]interface{} { - if o == nil || o.FixedData == nil { + if o == nil || IsNil(o.FixedData) { var ret map[string]interface{} return ret } @@ -113,15 +116,15 @@ func (o *InvitationRequest) GetFixedData() map[string]interface{} { // GetFixedDataOk returns a tuple with the FixedData field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *InvitationRequest) GetFixedDataOk() (map[string]interface{}, bool) { - if o == nil || o.FixedData == nil { - return nil, false + if o == nil || IsNil(o.FixedData) { + return map[string]interface{}{}, false } return o.FixedData, true } // HasFixedData returns a boolean if a field has been set. func (o *InvitationRequest) HasFixedData() bool { - if o != nil && o.FixedData != nil { + if o != nil && !IsNil(o.FixedData) { return true } @@ -135,7 +138,7 @@ func (o *InvitationRequest) SetFixedData(v map[string]interface{}) { // GetSingleUse returns the SingleUse field value if set, zero value otherwise. func (o *InvitationRequest) GetSingleUse() bool { - if o == nil || o.SingleUse == nil { + if o == nil || IsNil(o.SingleUse) { var ret bool return ret } @@ -145,7 +148,7 @@ func (o *InvitationRequest) GetSingleUse() bool { // GetSingleUseOk returns a tuple with the SingleUse field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *InvitationRequest) GetSingleUseOk() (*bool, bool) { - if o == nil || o.SingleUse == nil { + if o == nil || IsNil(o.SingleUse) { return nil, false } return o.SingleUse, true @@ -153,7 +156,7 @@ func (o *InvitationRequest) GetSingleUseOk() (*bool, bool) { // HasSingleUse returns a boolean if a field has been set. func (o *InvitationRequest) HasSingleUse() bool { - if o != nil && o.SingleUse != nil { + if o != nil && !IsNil(o.SingleUse) { return true } @@ -167,7 +170,7 @@ func (o *InvitationRequest) SetSingleUse(v bool) { // GetFlow returns the Flow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *InvitationRequest) GetFlow() string { - if o == nil || o.Flow.Get() == nil { + if o == nil || IsNil(o.Flow.Get()) { var ret string return ret } @@ -209,23 +212,29 @@ func (o *InvitationRequest) UnsetFlow() { } func (o InvitationRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.Expires != nil { + return json.Marshal(toSerialize) +} + +func (o InvitationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Expires) { toSerialize["expires"] = o.Expires } - if o.FixedData != nil { + if !IsNil(o.FixedData) { toSerialize["fixed_data"] = o.FixedData } - if o.SingleUse != nil { + if !IsNil(o.SingleUse) { toSerialize["single_use"] = o.SingleUse } if o.Flow.IsSet() { toSerialize["flow"] = o.Flow.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableInvitationRequest struct { diff --git a/model_invitation_stage.go b/model_invitation_stage.go index 6a06740d0..d5db3d406 100644 --- a/model_invitation_stage.go +++ b/model_invitation_stage.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the InvitationStage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InvitationStage{} + // InvitationStage InvitationStage Serializer type InvitationStage struct { Pk string `json:"pk"` @@ -201,7 +204,7 @@ func (o *InvitationStage) SetMetaModelName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *InvitationStage) GetFlowSet() []FlowSet { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSet return ret } @@ -211,7 +214,7 @@ func (o *InvitationStage) GetFlowSet() []FlowSet { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *InvitationStage) GetFlowSetOk() ([]FlowSet, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -219,7 +222,7 @@ func (o *InvitationStage) GetFlowSetOk() ([]FlowSet, bool) { // HasFlowSet returns a boolean if a field has been set. func (o *InvitationStage) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -233,7 +236,7 @@ func (o *InvitationStage) SetFlowSet(v []FlowSet) { // GetContinueFlowWithoutInvitation returns the ContinueFlowWithoutInvitation field value if set, zero value otherwise. func (o *InvitationStage) GetContinueFlowWithoutInvitation() bool { - if o == nil || o.ContinueFlowWithoutInvitation == nil { + if o == nil || IsNil(o.ContinueFlowWithoutInvitation) { var ret bool return ret } @@ -243,7 +246,7 @@ func (o *InvitationStage) GetContinueFlowWithoutInvitation() bool { // GetContinueFlowWithoutInvitationOk returns a tuple with the ContinueFlowWithoutInvitation field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *InvitationStage) GetContinueFlowWithoutInvitationOk() (*bool, bool) { - if o == nil || o.ContinueFlowWithoutInvitation == nil { + if o == nil || IsNil(o.ContinueFlowWithoutInvitation) { return nil, false } return o.ContinueFlowWithoutInvitation, true @@ -251,7 +254,7 @@ func (o *InvitationStage) GetContinueFlowWithoutInvitationOk() (*bool, bool) { // HasContinueFlowWithoutInvitation returns a boolean if a field has been set. func (o *InvitationStage) HasContinueFlowWithoutInvitation() bool { - if o != nil && o.ContinueFlowWithoutInvitation != nil { + if o != nil && !IsNil(o.ContinueFlowWithoutInvitation) { return true } @@ -264,32 +267,28 @@ func (o *InvitationStage) SetContinueFlowWithoutInvitation(v bool) { } func (o InvitationStage) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["component"] = o.Component - } - if true { - toSerialize["verbose_name"] = o.VerboseName - } - if true { - toSerialize["verbose_name_plural"] = o.VerboseNamePlural + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if true { - toSerialize["meta_model_name"] = o.MetaModelName - } - if o.FlowSet != nil { + return json.Marshal(toSerialize) +} + +func (o InvitationStage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name + // skip: component is readOnly + // skip: verbose_name is readOnly + // skip: verbose_name_plural is readOnly + // skip: meta_model_name is readOnly + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } - if o.ContinueFlowWithoutInvitation != nil { + if !IsNil(o.ContinueFlowWithoutInvitation) { toSerialize["continue_flow_without_invitation"] = o.ContinueFlowWithoutInvitation } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableInvitationStage struct { diff --git a/model_invitation_stage_request.go b/model_invitation_stage_request.go index 567dcfc36..c47541a31 100644 --- a/model_invitation_stage_request.go +++ b/model_invitation_stage_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the InvitationStageRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InvitationStageRequest{} + // InvitationStageRequest InvitationStage Serializer type InvitationStageRequest struct { Name string `json:"name"` @@ -67,7 +70,7 @@ func (o *InvitationStageRequest) SetName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *InvitationStageRequest) GetFlowSet() []FlowSetRequest { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSetRequest return ret } @@ -77,7 +80,7 @@ func (o *InvitationStageRequest) GetFlowSet() []FlowSetRequest { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *InvitationStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -85,7 +88,7 @@ func (o *InvitationStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { // HasFlowSet returns a boolean if a field has been set. func (o *InvitationStageRequest) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -99,7 +102,7 @@ func (o *InvitationStageRequest) SetFlowSet(v []FlowSetRequest) { // GetContinueFlowWithoutInvitation returns the ContinueFlowWithoutInvitation field value if set, zero value otherwise. func (o *InvitationStageRequest) GetContinueFlowWithoutInvitation() bool { - if o == nil || o.ContinueFlowWithoutInvitation == nil { + if o == nil || IsNil(o.ContinueFlowWithoutInvitation) { var ret bool return ret } @@ -109,7 +112,7 @@ func (o *InvitationStageRequest) GetContinueFlowWithoutInvitation() bool { // GetContinueFlowWithoutInvitationOk returns a tuple with the ContinueFlowWithoutInvitation field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *InvitationStageRequest) GetContinueFlowWithoutInvitationOk() (*bool, bool) { - if o == nil || o.ContinueFlowWithoutInvitation == nil { + if o == nil || IsNil(o.ContinueFlowWithoutInvitation) { return nil, false } return o.ContinueFlowWithoutInvitation, true @@ -117,7 +120,7 @@ func (o *InvitationStageRequest) GetContinueFlowWithoutInvitationOk() (*bool, bo // HasContinueFlowWithoutInvitation returns a boolean if a field has been set. func (o *InvitationStageRequest) HasContinueFlowWithoutInvitation() bool { - if o != nil && o.ContinueFlowWithoutInvitation != nil { + if o != nil && !IsNil(o.ContinueFlowWithoutInvitation) { return true } @@ -130,17 +133,23 @@ func (o *InvitationStageRequest) SetContinueFlowWithoutInvitation(v bool) { } func (o InvitationStageRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.FlowSet != nil { + return json.Marshal(toSerialize) +} + +func (o InvitationStageRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } - if o.ContinueFlowWithoutInvitation != nil { + if !IsNil(o.ContinueFlowWithoutInvitation) { toSerialize["continue_flow_without_invitation"] = o.ContinueFlowWithoutInvitation } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableInvitationStageRequest struct { diff --git a/model_kubernetes_service_connection.go b/model_kubernetes_service_connection.go index e05b9a315..616e2e6d5 100644 --- a/model_kubernetes_service_connection.go +++ b/model_kubernetes_service_connection.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the KubernetesServiceConnection type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &KubernetesServiceConnection{} + // KubernetesServiceConnection KubernetesServiceConnection Serializer type KubernetesServiceConnection struct { Pk string `json:"pk"` @@ -107,7 +110,7 @@ func (o *KubernetesServiceConnection) SetName(v string) { // GetLocal returns the Local field value if set, zero value otherwise. func (o *KubernetesServiceConnection) GetLocal() bool { - if o == nil || o.Local == nil { + if o == nil || IsNil(o.Local) { var ret bool return ret } @@ -117,7 +120,7 @@ func (o *KubernetesServiceConnection) GetLocal() bool { // GetLocalOk returns a tuple with the Local field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *KubernetesServiceConnection) GetLocalOk() (*bool, bool) { - if o == nil || o.Local == nil { + if o == nil || IsNil(o.Local) { return nil, false } return o.Local, true @@ -125,7 +128,7 @@ func (o *KubernetesServiceConnection) GetLocalOk() (*bool, bool) { // HasLocal returns a boolean if a field has been set. func (o *KubernetesServiceConnection) HasLocal() bool { - if o != nil && o.Local != nil { + if o != nil && !IsNil(o.Local) { return true } @@ -235,7 +238,7 @@ func (o *KubernetesServiceConnection) SetMetaModelName(v string) { // GetKubeconfig returns the Kubeconfig field value if set, zero value otherwise. func (o *KubernetesServiceConnection) GetKubeconfig() map[string]interface{} { - if o == nil || o.Kubeconfig == nil { + if o == nil || IsNil(o.Kubeconfig) { var ret map[string]interface{} return ret } @@ -245,15 +248,15 @@ func (o *KubernetesServiceConnection) GetKubeconfig() map[string]interface{} { // GetKubeconfigOk returns a tuple with the Kubeconfig field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *KubernetesServiceConnection) GetKubeconfigOk() (map[string]interface{}, bool) { - if o == nil || o.Kubeconfig == nil { - return nil, false + if o == nil || IsNil(o.Kubeconfig) { + return map[string]interface{}{}, false } return o.Kubeconfig, true } // HasKubeconfig returns a boolean if a field has been set. func (o *KubernetesServiceConnection) HasKubeconfig() bool { - if o != nil && o.Kubeconfig != nil { + if o != nil && !IsNil(o.Kubeconfig) { return true } @@ -267,7 +270,7 @@ func (o *KubernetesServiceConnection) SetKubeconfig(v map[string]interface{}) { // GetVerifySsl returns the VerifySsl field value if set, zero value otherwise. func (o *KubernetesServiceConnection) GetVerifySsl() bool { - if o == nil || o.VerifySsl == nil { + if o == nil || IsNil(o.VerifySsl) { var ret bool return ret } @@ -277,7 +280,7 @@ func (o *KubernetesServiceConnection) GetVerifySsl() bool { // GetVerifySslOk returns a tuple with the VerifySsl field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *KubernetesServiceConnection) GetVerifySslOk() (*bool, bool) { - if o == nil || o.VerifySsl == nil { + if o == nil || IsNil(o.VerifySsl) { return nil, false } return o.VerifySsl, true @@ -285,7 +288,7 @@ func (o *KubernetesServiceConnection) GetVerifySslOk() (*bool, bool) { // HasVerifySsl returns a boolean if a field has been set. func (o *KubernetesServiceConnection) HasVerifySsl() bool { - if o != nil && o.VerifySsl != nil { + if o != nil && !IsNil(o.VerifySsl) { return true } @@ -298,35 +301,31 @@ func (o *KubernetesServiceConnection) SetVerifySsl(v bool) { } func (o KubernetesServiceConnection) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.Local != nil { + return json.Marshal(toSerialize) +} + +func (o KubernetesServiceConnection) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name + if !IsNil(o.Local) { toSerialize["local"] = o.Local } - if true { - toSerialize["component"] = o.Component - } - if true { - toSerialize["verbose_name"] = o.VerboseName - } - if true { - toSerialize["verbose_name_plural"] = o.VerboseNamePlural - } - if true { - toSerialize["meta_model_name"] = o.MetaModelName - } - if o.Kubeconfig != nil { + // skip: component is readOnly + // skip: verbose_name is readOnly + // skip: verbose_name_plural is readOnly + // skip: meta_model_name is readOnly + if !IsNil(o.Kubeconfig) { toSerialize["kubeconfig"] = o.Kubeconfig } - if o.VerifySsl != nil { + if !IsNil(o.VerifySsl) { toSerialize["verify_ssl"] = o.VerifySsl } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableKubernetesServiceConnection struct { diff --git a/model_kubernetes_service_connection_request.go b/model_kubernetes_service_connection_request.go index 2ecdac767..8b78e08c1 100644 --- a/model_kubernetes_service_connection_request.go +++ b/model_kubernetes_service_connection_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the KubernetesServiceConnectionRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &KubernetesServiceConnectionRequest{} + // KubernetesServiceConnectionRequest KubernetesServiceConnection Serializer type KubernetesServiceConnectionRequest struct { Name string `json:"name"` @@ -70,7 +73,7 @@ func (o *KubernetesServiceConnectionRequest) SetName(v string) { // GetLocal returns the Local field value if set, zero value otherwise. func (o *KubernetesServiceConnectionRequest) GetLocal() bool { - if o == nil || o.Local == nil { + if o == nil || IsNil(o.Local) { var ret bool return ret } @@ -80,7 +83,7 @@ func (o *KubernetesServiceConnectionRequest) GetLocal() bool { // GetLocalOk returns a tuple with the Local field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *KubernetesServiceConnectionRequest) GetLocalOk() (*bool, bool) { - if o == nil || o.Local == nil { + if o == nil || IsNil(o.Local) { return nil, false } return o.Local, true @@ -88,7 +91,7 @@ func (o *KubernetesServiceConnectionRequest) GetLocalOk() (*bool, bool) { // HasLocal returns a boolean if a field has been set. func (o *KubernetesServiceConnectionRequest) HasLocal() bool { - if o != nil && o.Local != nil { + if o != nil && !IsNil(o.Local) { return true } @@ -102,7 +105,7 @@ func (o *KubernetesServiceConnectionRequest) SetLocal(v bool) { // GetKubeconfig returns the Kubeconfig field value if set, zero value otherwise. func (o *KubernetesServiceConnectionRequest) GetKubeconfig() map[string]interface{} { - if o == nil || o.Kubeconfig == nil { + if o == nil || IsNil(o.Kubeconfig) { var ret map[string]interface{} return ret } @@ -112,15 +115,15 @@ func (o *KubernetesServiceConnectionRequest) GetKubeconfig() map[string]interfac // GetKubeconfigOk returns a tuple with the Kubeconfig field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *KubernetesServiceConnectionRequest) GetKubeconfigOk() (map[string]interface{}, bool) { - if o == nil || o.Kubeconfig == nil { - return nil, false + if o == nil || IsNil(o.Kubeconfig) { + return map[string]interface{}{}, false } return o.Kubeconfig, true } // HasKubeconfig returns a boolean if a field has been set. func (o *KubernetesServiceConnectionRequest) HasKubeconfig() bool { - if o != nil && o.Kubeconfig != nil { + if o != nil && !IsNil(o.Kubeconfig) { return true } @@ -134,7 +137,7 @@ func (o *KubernetesServiceConnectionRequest) SetKubeconfig(v map[string]interfac // GetVerifySsl returns the VerifySsl field value if set, zero value otherwise. func (o *KubernetesServiceConnectionRequest) GetVerifySsl() bool { - if o == nil || o.VerifySsl == nil { + if o == nil || IsNil(o.VerifySsl) { var ret bool return ret } @@ -144,7 +147,7 @@ func (o *KubernetesServiceConnectionRequest) GetVerifySsl() bool { // GetVerifySslOk returns a tuple with the VerifySsl field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *KubernetesServiceConnectionRequest) GetVerifySslOk() (*bool, bool) { - if o == nil || o.VerifySsl == nil { + if o == nil || IsNil(o.VerifySsl) { return nil, false } return o.VerifySsl, true @@ -152,7 +155,7 @@ func (o *KubernetesServiceConnectionRequest) GetVerifySslOk() (*bool, bool) { // HasVerifySsl returns a boolean if a field has been set. func (o *KubernetesServiceConnectionRequest) HasVerifySsl() bool { - if o != nil && o.VerifySsl != nil { + if o != nil && !IsNil(o.VerifySsl) { return true } @@ -165,20 +168,26 @@ func (o *KubernetesServiceConnectionRequest) SetVerifySsl(v bool) { } func (o KubernetesServiceConnectionRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.Local != nil { + return json.Marshal(toSerialize) +} + +func (o KubernetesServiceConnectionRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Local) { toSerialize["local"] = o.Local } - if o.Kubeconfig != nil { + if !IsNil(o.Kubeconfig) { toSerialize["kubeconfig"] = o.Kubeconfig } - if o.VerifySsl != nil { + if !IsNil(o.VerifySsl) { toSerialize["verify_ssl"] = o.VerifySsl } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableKubernetesServiceConnectionRequest struct { diff --git a/model_ldap_debug.go b/model_ldap_debug.go index df34a821c..d7a14e0c6 100644 --- a/model_ldap_debug.go +++ b/model_ldap_debug.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the LDAPDebug type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LDAPDebug{} + // LDAPDebug struct for LDAPDebug type LDAPDebug struct { User []map[string]interface{} `json:"user"` @@ -115,19 +118,21 @@ func (o *LDAPDebug) SetMembership(v []map[string]interface{}) { } func (o LDAPDebug) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["user"] = o.User - } - if true { - toSerialize["group"] = o.Group - } - if true { - toSerialize["membership"] = o.Membership + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o LDAPDebug) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: user is readOnly + // skip: group is readOnly + // skip: membership is readOnly + return toSerialize, nil +} + type NullableLDAPDebug struct { value *LDAPDebug isSet bool diff --git a/model_ldap_outpost_config.go b/model_ldap_outpost_config.go index 24dfe03f5..0d7dd22c8 100644 --- a/model_ldap_outpost_config.go +++ b/model_ldap_outpost_config.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the LDAPOutpostConfig type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LDAPOutpostConfig{} + // LDAPOutpostConfig LDAPProvider Serializer type LDAPOutpostConfig struct { Pk int32 `json:"pk"` @@ -106,7 +109,7 @@ func (o *LDAPOutpostConfig) SetName(v string) { // GetBaseDn returns the BaseDn field value if set, zero value otherwise. func (o *LDAPOutpostConfig) GetBaseDn() string { - if o == nil || o.BaseDn == nil { + if o == nil || IsNil(o.BaseDn) { var ret string return ret } @@ -116,7 +119,7 @@ func (o *LDAPOutpostConfig) GetBaseDn() string { // GetBaseDnOk returns a tuple with the BaseDn field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *LDAPOutpostConfig) GetBaseDnOk() (*string, bool) { - if o == nil || o.BaseDn == nil { + if o == nil || IsNil(o.BaseDn) { return nil, false } return o.BaseDn, true @@ -124,7 +127,7 @@ func (o *LDAPOutpostConfig) GetBaseDnOk() (*string, bool) { // HasBaseDn returns a boolean if a field has been set. func (o *LDAPOutpostConfig) HasBaseDn() bool { - if o != nil && o.BaseDn != nil { + if o != nil && !IsNil(o.BaseDn) { return true } @@ -186,7 +189,7 @@ func (o *LDAPOutpostConfig) SetApplicationSlug(v string) { // GetSearchGroup returns the SearchGroup field value if set, zero value otherwise (both if not set or set to explicit null). func (o *LDAPOutpostConfig) GetSearchGroup() string { - if o == nil || o.SearchGroup.Get() == nil { + if o == nil || IsNil(o.SearchGroup.Get()) { var ret string return ret } @@ -229,7 +232,7 @@ func (o *LDAPOutpostConfig) UnsetSearchGroup() { // GetCertificate returns the Certificate field value if set, zero value otherwise (both if not set or set to explicit null). func (o *LDAPOutpostConfig) GetCertificate() string { - if o == nil || o.Certificate.Get() == nil { + if o == nil || IsNil(o.Certificate.Get()) { var ret string return ret } @@ -272,7 +275,7 @@ func (o *LDAPOutpostConfig) UnsetCertificate() { // GetTlsServerName returns the TlsServerName field value if set, zero value otherwise. func (o *LDAPOutpostConfig) GetTlsServerName() string { - if o == nil || o.TlsServerName == nil { + if o == nil || IsNil(o.TlsServerName) { var ret string return ret } @@ -282,7 +285,7 @@ func (o *LDAPOutpostConfig) GetTlsServerName() string { // GetTlsServerNameOk returns a tuple with the TlsServerName field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *LDAPOutpostConfig) GetTlsServerNameOk() (*string, bool) { - if o == nil || o.TlsServerName == nil { + if o == nil || IsNil(o.TlsServerName) { return nil, false } return o.TlsServerName, true @@ -290,7 +293,7 @@ func (o *LDAPOutpostConfig) GetTlsServerNameOk() (*string, bool) { // HasTlsServerName returns a boolean if a field has been set. func (o *LDAPOutpostConfig) HasTlsServerName() bool { - if o != nil && o.TlsServerName != nil { + if o != nil && !IsNil(o.TlsServerName) { return true } @@ -304,7 +307,7 @@ func (o *LDAPOutpostConfig) SetTlsServerName(v string) { // GetUidStartNumber returns the UidStartNumber field value if set, zero value otherwise. func (o *LDAPOutpostConfig) GetUidStartNumber() int32 { - if o == nil || o.UidStartNumber == nil { + if o == nil || IsNil(o.UidStartNumber) { var ret int32 return ret } @@ -314,7 +317,7 @@ func (o *LDAPOutpostConfig) GetUidStartNumber() int32 { // GetUidStartNumberOk returns a tuple with the UidStartNumber field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *LDAPOutpostConfig) GetUidStartNumberOk() (*int32, bool) { - if o == nil || o.UidStartNumber == nil { + if o == nil || IsNil(o.UidStartNumber) { return nil, false } return o.UidStartNumber, true @@ -322,7 +325,7 @@ func (o *LDAPOutpostConfig) GetUidStartNumberOk() (*int32, bool) { // HasUidStartNumber returns a boolean if a field has been set. func (o *LDAPOutpostConfig) HasUidStartNumber() bool { - if o != nil && o.UidStartNumber != nil { + if o != nil && !IsNil(o.UidStartNumber) { return true } @@ -336,7 +339,7 @@ func (o *LDAPOutpostConfig) SetUidStartNumber(v int32) { // GetGidStartNumber returns the GidStartNumber field value if set, zero value otherwise. func (o *LDAPOutpostConfig) GetGidStartNumber() int32 { - if o == nil || o.GidStartNumber == nil { + if o == nil || IsNil(o.GidStartNumber) { var ret int32 return ret } @@ -346,7 +349,7 @@ func (o *LDAPOutpostConfig) GetGidStartNumber() int32 { // GetGidStartNumberOk returns a tuple with the GidStartNumber field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *LDAPOutpostConfig) GetGidStartNumberOk() (*int32, bool) { - if o == nil || o.GidStartNumber == nil { + if o == nil || IsNil(o.GidStartNumber) { return nil, false } return o.GidStartNumber, true @@ -354,7 +357,7 @@ func (o *LDAPOutpostConfig) GetGidStartNumberOk() (*int32, bool) { // HasGidStartNumber returns a boolean if a field has been set. func (o *LDAPOutpostConfig) HasGidStartNumber() bool { - if o != nil && o.GidStartNumber != nil { + if o != nil && !IsNil(o.GidStartNumber) { return true } @@ -368,7 +371,7 @@ func (o *LDAPOutpostConfig) SetGidStartNumber(v int32) { // GetSearchMode returns the SearchMode field value if set, zero value otherwise. func (o *LDAPOutpostConfig) GetSearchMode() LDAPAPIAccessMode { - if o == nil || o.SearchMode == nil { + if o == nil || IsNil(o.SearchMode) { var ret LDAPAPIAccessMode return ret } @@ -378,7 +381,7 @@ func (o *LDAPOutpostConfig) GetSearchMode() LDAPAPIAccessMode { // GetSearchModeOk returns a tuple with the SearchMode field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *LDAPOutpostConfig) GetSearchModeOk() (*LDAPAPIAccessMode, bool) { - if o == nil || o.SearchMode == nil { + if o == nil || IsNil(o.SearchMode) { return nil, false } return o.SearchMode, true @@ -386,7 +389,7 @@ func (o *LDAPOutpostConfig) GetSearchModeOk() (*LDAPAPIAccessMode, bool) { // HasSearchMode returns a boolean if a field has been set. func (o *LDAPOutpostConfig) HasSearchMode() bool { - if o != nil && o.SearchMode != nil { + if o != nil && !IsNil(o.SearchMode) { return true } @@ -400,7 +403,7 @@ func (o *LDAPOutpostConfig) SetSearchMode(v LDAPAPIAccessMode) { // GetBindMode returns the BindMode field value if set, zero value otherwise. func (o *LDAPOutpostConfig) GetBindMode() LDAPAPIAccessMode { - if o == nil || o.BindMode == nil { + if o == nil || IsNil(o.BindMode) { var ret LDAPAPIAccessMode return ret } @@ -410,7 +413,7 @@ func (o *LDAPOutpostConfig) GetBindMode() LDAPAPIAccessMode { // GetBindModeOk returns a tuple with the BindMode field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *LDAPOutpostConfig) GetBindModeOk() (*LDAPAPIAccessMode, bool) { - if o == nil || o.BindMode == nil { + if o == nil || IsNil(o.BindMode) { return nil, false } return o.BindMode, true @@ -418,7 +421,7 @@ func (o *LDAPOutpostConfig) GetBindModeOk() (*LDAPAPIAccessMode, bool) { // HasBindMode returns a boolean if a field has been set. func (o *LDAPOutpostConfig) HasBindMode() bool { - if o != nil && o.BindMode != nil { + if o != nil && !IsNil(o.BindMode) { return true } @@ -431,44 +434,44 @@ func (o *LDAPOutpostConfig) SetBindMode(v LDAPAPIAccessMode) { } func (o LDAPOutpostConfig) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.BaseDn != nil { + return json.Marshal(toSerialize) +} + +func (o LDAPOutpostConfig) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name + if !IsNil(o.BaseDn) { toSerialize["base_dn"] = o.BaseDn } - if true { - toSerialize["bind_flow_slug"] = o.BindFlowSlug - } - if true { - toSerialize["application_slug"] = o.ApplicationSlug - } + toSerialize["bind_flow_slug"] = o.BindFlowSlug + toSerialize["application_slug"] = o.ApplicationSlug if o.SearchGroup.IsSet() { toSerialize["search_group"] = o.SearchGroup.Get() } if o.Certificate.IsSet() { toSerialize["certificate"] = o.Certificate.Get() } - if o.TlsServerName != nil { + if !IsNil(o.TlsServerName) { toSerialize["tls_server_name"] = o.TlsServerName } - if o.UidStartNumber != nil { + if !IsNil(o.UidStartNumber) { toSerialize["uid_start_number"] = o.UidStartNumber } - if o.GidStartNumber != nil { + if !IsNil(o.GidStartNumber) { toSerialize["gid_start_number"] = o.GidStartNumber } - if o.SearchMode != nil { + if !IsNil(o.SearchMode) { toSerialize["search_mode"] = o.SearchMode } - if o.BindMode != nil { + if !IsNil(o.BindMode) { toSerialize["bind_mode"] = o.BindMode } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableLDAPOutpostConfig struct { diff --git a/model_ldap_property_mapping.go b/model_ldap_property_mapping.go index 991b86a01..39d886ed2 100644 --- a/model_ldap_property_mapping.go +++ b/model_ldap_property_mapping.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the LDAPPropertyMapping type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LDAPPropertyMapping{} + // LDAPPropertyMapping LDAP PropertyMapping Serializer type LDAPPropertyMapping struct { Pk string `json:"pk"` @@ -84,7 +87,7 @@ func (o *LDAPPropertyMapping) SetPk(v string) { // GetManaged returns the Managed field value if set, zero value otherwise (both if not set or set to explicit null). func (o *LDAPPropertyMapping) GetManaged() string { - if o == nil || o.Managed.Get() == nil { + if o == nil || IsNil(o.Managed.Get()) { var ret string return ret } @@ -294,35 +297,27 @@ func (o *LDAPPropertyMapping) SetObjectField(v string) { } func (o LDAPPropertyMapping) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } + return json.Marshal(toSerialize) +} + +func (o LDAPPropertyMapping) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly if o.Managed.IsSet() { toSerialize["managed"] = o.Managed.Get() } - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["expression"] = o.Expression - } - if true { - toSerialize["component"] = o.Component - } - if true { - toSerialize["verbose_name"] = o.VerboseName - } - if true { - toSerialize["verbose_name_plural"] = o.VerboseNamePlural - } - if true { - toSerialize["meta_model_name"] = o.MetaModelName - } - if true { - toSerialize["object_field"] = o.ObjectField - } - return json.Marshal(toSerialize) + toSerialize["name"] = o.Name + toSerialize["expression"] = o.Expression + // skip: component is readOnly + // skip: verbose_name is readOnly + // skip: verbose_name_plural is readOnly + // skip: meta_model_name is readOnly + toSerialize["object_field"] = o.ObjectField + return toSerialize, nil } type NullableLDAPPropertyMapping struct { diff --git a/model_ldap_property_mapping_request.go b/model_ldap_property_mapping_request.go index 32e6b0653..48f15501f 100644 --- a/model_ldap_property_mapping_request.go +++ b/model_ldap_property_mapping_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the LDAPPropertyMappingRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LDAPPropertyMappingRequest{} + // LDAPPropertyMappingRequest LDAP PropertyMapping Serializer type LDAPPropertyMappingRequest struct { // Objects which are managed by authentik. These objects are created and updated automatically. This is flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. @@ -46,7 +49,7 @@ func NewLDAPPropertyMappingRequestWithDefaults() *LDAPPropertyMappingRequest { // GetManaged returns the Managed field value if set, zero value otherwise (both if not set or set to explicit null). func (o *LDAPPropertyMappingRequest) GetManaged() string { - if o == nil || o.Managed.Get() == nil { + if o == nil || IsNil(o.Managed.Get()) { var ret string return ret } @@ -160,20 +163,22 @@ func (o *LDAPPropertyMappingRequest) SetObjectField(v string) { } func (o LDAPPropertyMappingRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LDAPPropertyMappingRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Managed.IsSet() { toSerialize["managed"] = o.Managed.Get() } - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["expression"] = o.Expression - } - if true { - toSerialize["object_field"] = o.ObjectField - } - return json.Marshal(toSerialize) + toSerialize["name"] = o.Name + toSerialize["expression"] = o.Expression + toSerialize["object_field"] = o.ObjectField + return toSerialize, nil } type NullableLDAPPropertyMappingRequest struct { diff --git a/model_ldap_provider.go b/model_ldap_provider.go index b9ebd7951..dfcf1535e 100644 --- a/model_ldap_provider.go +++ b/model_ldap_provider.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the LDAPProvider type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LDAPProvider{} + // LDAPProvider LDAPProvider Serializer type LDAPProvider struct { Pk int32 `json:"pk"` @@ -128,7 +131,7 @@ func (o *LDAPProvider) SetName(v string) { // GetAuthenticationFlow returns the AuthenticationFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *LDAPProvider) GetAuthenticationFlow() string { - if o == nil || o.AuthenticationFlow.Get() == nil { + if o == nil || IsNil(o.AuthenticationFlow.Get()) { var ret string return ret } @@ -195,7 +198,7 @@ func (o *LDAPProvider) SetAuthorizationFlow(v string) { // GetPropertyMappings returns the PropertyMappings field value if set, zero value otherwise. func (o *LDAPProvider) GetPropertyMappings() []string { - if o == nil || o.PropertyMappings == nil { + if o == nil || IsNil(o.PropertyMappings) { var ret []string return ret } @@ -205,7 +208,7 @@ func (o *LDAPProvider) GetPropertyMappings() []string { // GetPropertyMappingsOk returns a tuple with the PropertyMappings field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *LDAPProvider) GetPropertyMappingsOk() ([]string, bool) { - if o == nil || o.PropertyMappings == nil { + if o == nil || IsNil(o.PropertyMappings) { return nil, false } return o.PropertyMappings, true @@ -213,7 +216,7 @@ func (o *LDAPProvider) GetPropertyMappingsOk() ([]string, bool) { // HasPropertyMappings returns a boolean if a field has been set. func (o *LDAPProvider) HasPropertyMappings() bool { - if o != nil && o.PropertyMappings != nil { + if o != nil && !IsNil(o.PropertyMappings) { return true } @@ -371,7 +374,7 @@ func (o *LDAPProvider) SetMetaModelName(v string) { // GetBaseDn returns the BaseDn field value if set, zero value otherwise. func (o *LDAPProvider) GetBaseDn() string { - if o == nil || o.BaseDn == nil { + if o == nil || IsNil(o.BaseDn) { var ret string return ret } @@ -381,7 +384,7 @@ func (o *LDAPProvider) GetBaseDn() string { // GetBaseDnOk returns a tuple with the BaseDn field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *LDAPProvider) GetBaseDnOk() (*string, bool) { - if o == nil || o.BaseDn == nil { + if o == nil || IsNil(o.BaseDn) { return nil, false } return o.BaseDn, true @@ -389,7 +392,7 @@ func (o *LDAPProvider) GetBaseDnOk() (*string, bool) { // HasBaseDn returns a boolean if a field has been set. func (o *LDAPProvider) HasBaseDn() bool { - if o != nil && o.BaseDn != nil { + if o != nil && !IsNil(o.BaseDn) { return true } @@ -403,7 +406,7 @@ func (o *LDAPProvider) SetBaseDn(v string) { // GetSearchGroup returns the SearchGroup field value if set, zero value otherwise (both if not set or set to explicit null). func (o *LDAPProvider) GetSearchGroup() string { - if o == nil || o.SearchGroup.Get() == nil { + if o == nil || IsNil(o.SearchGroup.Get()) { var ret string return ret } @@ -446,7 +449,7 @@ func (o *LDAPProvider) UnsetSearchGroup() { // GetCertificate returns the Certificate field value if set, zero value otherwise (both if not set or set to explicit null). func (o *LDAPProvider) GetCertificate() string { - if o == nil || o.Certificate.Get() == nil { + if o == nil || IsNil(o.Certificate.Get()) { var ret string return ret } @@ -489,7 +492,7 @@ func (o *LDAPProvider) UnsetCertificate() { // GetTlsServerName returns the TlsServerName field value if set, zero value otherwise. func (o *LDAPProvider) GetTlsServerName() string { - if o == nil || o.TlsServerName == nil { + if o == nil || IsNil(o.TlsServerName) { var ret string return ret } @@ -499,7 +502,7 @@ func (o *LDAPProvider) GetTlsServerName() string { // GetTlsServerNameOk returns a tuple with the TlsServerName field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *LDAPProvider) GetTlsServerNameOk() (*string, bool) { - if o == nil || o.TlsServerName == nil { + if o == nil || IsNil(o.TlsServerName) { return nil, false } return o.TlsServerName, true @@ -507,7 +510,7 @@ func (o *LDAPProvider) GetTlsServerNameOk() (*string, bool) { // HasTlsServerName returns a boolean if a field has been set. func (o *LDAPProvider) HasTlsServerName() bool { - if o != nil && o.TlsServerName != nil { + if o != nil && !IsNil(o.TlsServerName) { return true } @@ -521,7 +524,7 @@ func (o *LDAPProvider) SetTlsServerName(v string) { // GetUidStartNumber returns the UidStartNumber field value if set, zero value otherwise. func (o *LDAPProvider) GetUidStartNumber() int32 { - if o == nil || o.UidStartNumber == nil { + if o == nil || IsNil(o.UidStartNumber) { var ret int32 return ret } @@ -531,7 +534,7 @@ func (o *LDAPProvider) GetUidStartNumber() int32 { // GetUidStartNumberOk returns a tuple with the UidStartNumber field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *LDAPProvider) GetUidStartNumberOk() (*int32, bool) { - if o == nil || o.UidStartNumber == nil { + if o == nil || IsNil(o.UidStartNumber) { return nil, false } return o.UidStartNumber, true @@ -539,7 +542,7 @@ func (o *LDAPProvider) GetUidStartNumberOk() (*int32, bool) { // HasUidStartNumber returns a boolean if a field has been set. func (o *LDAPProvider) HasUidStartNumber() bool { - if o != nil && o.UidStartNumber != nil { + if o != nil && !IsNil(o.UidStartNumber) { return true } @@ -553,7 +556,7 @@ func (o *LDAPProvider) SetUidStartNumber(v int32) { // GetGidStartNumber returns the GidStartNumber field value if set, zero value otherwise. func (o *LDAPProvider) GetGidStartNumber() int32 { - if o == nil || o.GidStartNumber == nil { + if o == nil || IsNil(o.GidStartNumber) { var ret int32 return ret } @@ -563,7 +566,7 @@ func (o *LDAPProvider) GetGidStartNumber() int32 { // GetGidStartNumberOk returns a tuple with the GidStartNumber field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *LDAPProvider) GetGidStartNumberOk() (*int32, bool) { - if o == nil || o.GidStartNumber == nil { + if o == nil || IsNil(o.GidStartNumber) { return nil, false } return o.GidStartNumber, true @@ -571,7 +574,7 @@ func (o *LDAPProvider) GetGidStartNumberOk() (*int32, bool) { // HasGidStartNumber returns a boolean if a field has been set. func (o *LDAPProvider) HasGidStartNumber() bool { - if o != nil && o.GidStartNumber != nil { + if o != nil && !IsNil(o.GidStartNumber) { return true } @@ -609,7 +612,7 @@ func (o *LDAPProvider) SetOutpostSet(v []string) { // GetSearchMode returns the SearchMode field value if set, zero value otherwise. func (o *LDAPProvider) GetSearchMode() LDAPAPIAccessMode { - if o == nil || o.SearchMode == nil { + if o == nil || IsNil(o.SearchMode) { var ret LDAPAPIAccessMode return ret } @@ -619,7 +622,7 @@ func (o *LDAPProvider) GetSearchMode() LDAPAPIAccessMode { // GetSearchModeOk returns a tuple with the SearchMode field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *LDAPProvider) GetSearchModeOk() (*LDAPAPIAccessMode, bool) { - if o == nil || o.SearchMode == nil { + if o == nil || IsNil(o.SearchMode) { return nil, false } return o.SearchMode, true @@ -627,7 +630,7 @@ func (o *LDAPProvider) GetSearchModeOk() (*LDAPAPIAccessMode, bool) { // HasSearchMode returns a boolean if a field has been set. func (o *LDAPProvider) HasSearchMode() bool { - if o != nil && o.SearchMode != nil { + if o != nil && !IsNil(o.SearchMode) { return true } @@ -641,7 +644,7 @@ func (o *LDAPProvider) SetSearchMode(v LDAPAPIAccessMode) { // GetBindMode returns the BindMode field value if set, zero value otherwise. func (o *LDAPProvider) GetBindMode() LDAPAPIAccessMode { - if o == nil || o.BindMode == nil { + if o == nil || IsNil(o.BindMode) { var ret LDAPAPIAccessMode return ret } @@ -651,7 +654,7 @@ func (o *LDAPProvider) GetBindMode() LDAPAPIAccessMode { // GetBindModeOk returns a tuple with the BindMode field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *LDAPProvider) GetBindModeOk() (*LDAPAPIAccessMode, bool) { - if o == nil || o.BindMode == nil { + if o == nil || IsNil(o.BindMode) { return nil, false } return o.BindMode, true @@ -659,7 +662,7 @@ func (o *LDAPProvider) GetBindModeOk() (*LDAPAPIAccessMode, bool) { // HasBindMode returns a boolean if a field has been set. func (o *LDAPProvider) HasBindMode() bool { - if o != nil && o.BindMode != nil { + if o != nil && !IsNil(o.BindMode) { return true } @@ -672,41 +675,31 @@ func (o *LDAPProvider) SetBindMode(v LDAPAPIAccessMode) { } func (o LDAPProvider) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } + return json.Marshal(toSerialize) +} + +func (o LDAPProvider) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name if o.AuthenticationFlow.IsSet() { toSerialize["authentication_flow"] = o.AuthenticationFlow.Get() } - if true { - toSerialize["authorization_flow"] = o.AuthorizationFlow - } - if o.PropertyMappings != nil { + toSerialize["authorization_flow"] = o.AuthorizationFlow + if !IsNil(o.PropertyMappings) { toSerialize["property_mappings"] = o.PropertyMappings } - if true { - toSerialize["component"] = o.Component - } - if true { - toSerialize["assigned_application_slug"] = o.AssignedApplicationSlug - } - if true { - toSerialize["assigned_application_name"] = o.AssignedApplicationName - } - if true { - toSerialize["verbose_name"] = o.VerboseName - } - if true { - toSerialize["verbose_name_plural"] = o.VerboseNamePlural - } - if true { - toSerialize["meta_model_name"] = o.MetaModelName - } - if o.BaseDn != nil { + // skip: component is readOnly + // skip: assigned_application_slug is readOnly + // skip: assigned_application_name is readOnly + // skip: verbose_name is readOnly + // skip: verbose_name_plural is readOnly + // skip: meta_model_name is readOnly + if !IsNil(o.BaseDn) { toSerialize["base_dn"] = o.BaseDn } if o.SearchGroup.IsSet() { @@ -715,25 +708,23 @@ func (o LDAPProvider) MarshalJSON() ([]byte, error) { if o.Certificate.IsSet() { toSerialize["certificate"] = o.Certificate.Get() } - if o.TlsServerName != nil { + if !IsNil(o.TlsServerName) { toSerialize["tls_server_name"] = o.TlsServerName } - if o.UidStartNumber != nil { + if !IsNil(o.UidStartNumber) { toSerialize["uid_start_number"] = o.UidStartNumber } - if o.GidStartNumber != nil { + if !IsNil(o.GidStartNumber) { toSerialize["gid_start_number"] = o.GidStartNumber } - if true { - toSerialize["outpost_set"] = o.OutpostSet - } - if o.SearchMode != nil { + // skip: outpost_set is readOnly + if !IsNil(o.SearchMode) { toSerialize["search_mode"] = o.SearchMode } - if o.BindMode != nil { + if !IsNil(o.BindMode) { toSerialize["bind_mode"] = o.BindMode } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableLDAPProvider struct { diff --git a/model_ldap_provider_request.go b/model_ldap_provider_request.go index 7e7faf652..cceebdc19 100644 --- a/model_ldap_provider_request.go +++ b/model_ldap_provider_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the LDAPProviderRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LDAPProviderRequest{} + // LDAPProviderRequest LDAPProvider Serializer type LDAPProviderRequest struct { Name string `json:"name"` @@ -82,7 +85,7 @@ func (o *LDAPProviderRequest) SetName(v string) { // GetAuthenticationFlow returns the AuthenticationFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *LDAPProviderRequest) GetAuthenticationFlow() string { - if o == nil || o.AuthenticationFlow.Get() == nil { + if o == nil || IsNil(o.AuthenticationFlow.Get()) { var ret string return ret } @@ -149,7 +152,7 @@ func (o *LDAPProviderRequest) SetAuthorizationFlow(v string) { // GetPropertyMappings returns the PropertyMappings field value if set, zero value otherwise. func (o *LDAPProviderRequest) GetPropertyMappings() []string { - if o == nil || o.PropertyMappings == nil { + if o == nil || IsNil(o.PropertyMappings) { var ret []string return ret } @@ -159,7 +162,7 @@ func (o *LDAPProviderRequest) GetPropertyMappings() []string { // GetPropertyMappingsOk returns a tuple with the PropertyMappings field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *LDAPProviderRequest) GetPropertyMappingsOk() ([]string, bool) { - if o == nil || o.PropertyMappings == nil { + if o == nil || IsNil(o.PropertyMappings) { return nil, false } return o.PropertyMappings, true @@ -167,7 +170,7 @@ func (o *LDAPProviderRequest) GetPropertyMappingsOk() ([]string, bool) { // HasPropertyMappings returns a boolean if a field has been set. func (o *LDAPProviderRequest) HasPropertyMappings() bool { - if o != nil && o.PropertyMappings != nil { + if o != nil && !IsNil(o.PropertyMappings) { return true } @@ -181,7 +184,7 @@ func (o *LDAPProviderRequest) SetPropertyMappings(v []string) { // GetBaseDn returns the BaseDn field value if set, zero value otherwise. func (o *LDAPProviderRequest) GetBaseDn() string { - if o == nil || o.BaseDn == nil { + if o == nil || IsNil(o.BaseDn) { var ret string return ret } @@ -191,7 +194,7 @@ func (o *LDAPProviderRequest) GetBaseDn() string { // GetBaseDnOk returns a tuple with the BaseDn field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *LDAPProviderRequest) GetBaseDnOk() (*string, bool) { - if o == nil || o.BaseDn == nil { + if o == nil || IsNil(o.BaseDn) { return nil, false } return o.BaseDn, true @@ -199,7 +202,7 @@ func (o *LDAPProviderRequest) GetBaseDnOk() (*string, bool) { // HasBaseDn returns a boolean if a field has been set. func (o *LDAPProviderRequest) HasBaseDn() bool { - if o != nil && o.BaseDn != nil { + if o != nil && !IsNil(o.BaseDn) { return true } @@ -213,7 +216,7 @@ func (o *LDAPProviderRequest) SetBaseDn(v string) { // GetSearchGroup returns the SearchGroup field value if set, zero value otherwise (both if not set or set to explicit null). func (o *LDAPProviderRequest) GetSearchGroup() string { - if o == nil || o.SearchGroup.Get() == nil { + if o == nil || IsNil(o.SearchGroup.Get()) { var ret string return ret } @@ -256,7 +259,7 @@ func (o *LDAPProviderRequest) UnsetSearchGroup() { // GetCertificate returns the Certificate field value if set, zero value otherwise (both if not set or set to explicit null). func (o *LDAPProviderRequest) GetCertificate() string { - if o == nil || o.Certificate.Get() == nil { + if o == nil || IsNil(o.Certificate.Get()) { var ret string return ret } @@ -299,7 +302,7 @@ func (o *LDAPProviderRequest) UnsetCertificate() { // GetTlsServerName returns the TlsServerName field value if set, zero value otherwise. func (o *LDAPProviderRequest) GetTlsServerName() string { - if o == nil || o.TlsServerName == nil { + if o == nil || IsNil(o.TlsServerName) { var ret string return ret } @@ -309,7 +312,7 @@ func (o *LDAPProviderRequest) GetTlsServerName() string { // GetTlsServerNameOk returns a tuple with the TlsServerName field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *LDAPProviderRequest) GetTlsServerNameOk() (*string, bool) { - if o == nil || o.TlsServerName == nil { + if o == nil || IsNil(o.TlsServerName) { return nil, false } return o.TlsServerName, true @@ -317,7 +320,7 @@ func (o *LDAPProviderRequest) GetTlsServerNameOk() (*string, bool) { // HasTlsServerName returns a boolean if a field has been set. func (o *LDAPProviderRequest) HasTlsServerName() bool { - if o != nil && o.TlsServerName != nil { + if o != nil && !IsNil(o.TlsServerName) { return true } @@ -331,7 +334,7 @@ func (o *LDAPProviderRequest) SetTlsServerName(v string) { // GetUidStartNumber returns the UidStartNumber field value if set, zero value otherwise. func (o *LDAPProviderRequest) GetUidStartNumber() int32 { - if o == nil || o.UidStartNumber == nil { + if o == nil || IsNil(o.UidStartNumber) { var ret int32 return ret } @@ -341,7 +344,7 @@ func (o *LDAPProviderRequest) GetUidStartNumber() int32 { // GetUidStartNumberOk returns a tuple with the UidStartNumber field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *LDAPProviderRequest) GetUidStartNumberOk() (*int32, bool) { - if o == nil || o.UidStartNumber == nil { + if o == nil || IsNil(o.UidStartNumber) { return nil, false } return o.UidStartNumber, true @@ -349,7 +352,7 @@ func (o *LDAPProviderRequest) GetUidStartNumberOk() (*int32, bool) { // HasUidStartNumber returns a boolean if a field has been set. func (o *LDAPProviderRequest) HasUidStartNumber() bool { - if o != nil && o.UidStartNumber != nil { + if o != nil && !IsNil(o.UidStartNumber) { return true } @@ -363,7 +366,7 @@ func (o *LDAPProviderRequest) SetUidStartNumber(v int32) { // GetGidStartNumber returns the GidStartNumber field value if set, zero value otherwise. func (o *LDAPProviderRequest) GetGidStartNumber() int32 { - if o == nil || o.GidStartNumber == nil { + if o == nil || IsNil(o.GidStartNumber) { var ret int32 return ret } @@ -373,7 +376,7 @@ func (o *LDAPProviderRequest) GetGidStartNumber() int32 { // GetGidStartNumberOk returns a tuple with the GidStartNumber field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *LDAPProviderRequest) GetGidStartNumberOk() (*int32, bool) { - if o == nil || o.GidStartNumber == nil { + if o == nil || IsNil(o.GidStartNumber) { return nil, false } return o.GidStartNumber, true @@ -381,7 +384,7 @@ func (o *LDAPProviderRequest) GetGidStartNumberOk() (*int32, bool) { // HasGidStartNumber returns a boolean if a field has been set. func (o *LDAPProviderRequest) HasGidStartNumber() bool { - if o != nil && o.GidStartNumber != nil { + if o != nil && !IsNil(o.GidStartNumber) { return true } @@ -395,7 +398,7 @@ func (o *LDAPProviderRequest) SetGidStartNumber(v int32) { // GetSearchMode returns the SearchMode field value if set, zero value otherwise. func (o *LDAPProviderRequest) GetSearchMode() LDAPAPIAccessMode { - if o == nil || o.SearchMode == nil { + if o == nil || IsNil(o.SearchMode) { var ret LDAPAPIAccessMode return ret } @@ -405,7 +408,7 @@ func (o *LDAPProviderRequest) GetSearchMode() LDAPAPIAccessMode { // GetSearchModeOk returns a tuple with the SearchMode field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *LDAPProviderRequest) GetSearchModeOk() (*LDAPAPIAccessMode, bool) { - if o == nil || o.SearchMode == nil { + if o == nil || IsNil(o.SearchMode) { return nil, false } return o.SearchMode, true @@ -413,7 +416,7 @@ func (o *LDAPProviderRequest) GetSearchModeOk() (*LDAPAPIAccessMode, bool) { // HasSearchMode returns a boolean if a field has been set. func (o *LDAPProviderRequest) HasSearchMode() bool { - if o != nil && o.SearchMode != nil { + if o != nil && !IsNil(o.SearchMode) { return true } @@ -427,7 +430,7 @@ func (o *LDAPProviderRequest) SetSearchMode(v LDAPAPIAccessMode) { // GetBindMode returns the BindMode field value if set, zero value otherwise. func (o *LDAPProviderRequest) GetBindMode() LDAPAPIAccessMode { - if o == nil || o.BindMode == nil { + if o == nil || IsNil(o.BindMode) { var ret LDAPAPIAccessMode return ret } @@ -437,7 +440,7 @@ func (o *LDAPProviderRequest) GetBindMode() LDAPAPIAccessMode { // GetBindModeOk returns a tuple with the BindMode field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *LDAPProviderRequest) GetBindModeOk() (*LDAPAPIAccessMode, bool) { - if o == nil || o.BindMode == nil { + if o == nil || IsNil(o.BindMode) { return nil, false } return o.BindMode, true @@ -445,7 +448,7 @@ func (o *LDAPProviderRequest) GetBindModeOk() (*LDAPAPIAccessMode, bool) { // HasBindMode returns a boolean if a field has been set. func (o *LDAPProviderRequest) HasBindMode() bool { - if o != nil && o.BindMode != nil { + if o != nil && !IsNil(o.BindMode) { return true } @@ -458,20 +461,24 @@ func (o *LDAPProviderRequest) SetBindMode(v LDAPAPIAccessMode) { } func (o LDAPProviderRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } + return json.Marshal(toSerialize) +} + +func (o LDAPProviderRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name if o.AuthenticationFlow.IsSet() { toSerialize["authentication_flow"] = o.AuthenticationFlow.Get() } - if true { - toSerialize["authorization_flow"] = o.AuthorizationFlow - } - if o.PropertyMappings != nil { + toSerialize["authorization_flow"] = o.AuthorizationFlow + if !IsNil(o.PropertyMappings) { toSerialize["property_mappings"] = o.PropertyMappings } - if o.BaseDn != nil { + if !IsNil(o.BaseDn) { toSerialize["base_dn"] = o.BaseDn } if o.SearchGroup.IsSet() { @@ -480,22 +487,22 @@ func (o LDAPProviderRequest) MarshalJSON() ([]byte, error) { if o.Certificate.IsSet() { toSerialize["certificate"] = o.Certificate.Get() } - if o.TlsServerName != nil { + if !IsNil(o.TlsServerName) { toSerialize["tls_server_name"] = o.TlsServerName } - if o.UidStartNumber != nil { + if !IsNil(o.UidStartNumber) { toSerialize["uid_start_number"] = o.UidStartNumber } - if o.GidStartNumber != nil { + if !IsNil(o.GidStartNumber) { toSerialize["gid_start_number"] = o.GidStartNumber } - if o.SearchMode != nil { + if !IsNil(o.SearchMode) { toSerialize["search_mode"] = o.SearchMode } - if o.BindMode != nil { + if !IsNil(o.BindMode) { toSerialize["bind_mode"] = o.BindMode } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableLDAPProviderRequest struct { diff --git a/model_ldap_source.go b/model_ldap_source.go index 9db9710dd..297f40299 100644 --- a/model_ldap_source.go +++ b/model_ldap_source.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the LDAPSource type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LDAPSource{} + // LDAPSource LDAP Source Serializer type LDAPSource struct { Pk string `json:"pk"` @@ -34,10 +37,9 @@ type LDAPSource struct { // Return object's plural verbose_name VerboseNamePlural string `json:"verbose_name_plural"` // Return internal model name - MetaModelName string `json:"meta_model_name"` - PolicyEngineMode *PolicyEngineMode `json:"policy_engine_mode,omitempty"` - // How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. - UserMatchingMode NullableUserMatchingModeEnum `json:"user_matching_mode,omitempty"` + MetaModelName string `json:"meta_model_name"` + PolicyEngineMode *PolicyEngineMode `json:"policy_engine_mode,omitempty"` + UserMatchingMode *UserMatchingModeEnum `json:"user_matching_mode,omitempty"` // Objects which are managed by authentik. These objects are created and updated automatically. This is flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. Managed NullableString `json:"managed"` UserPathTemplate *string `json:"user_path_template,omitempty"` @@ -173,7 +175,7 @@ func (o *LDAPSource) SetSlug(v string) { // GetEnabled returns the Enabled field value if set, zero value otherwise. func (o *LDAPSource) GetEnabled() bool { - if o == nil || o.Enabled == nil { + if o == nil || IsNil(o.Enabled) { var ret bool return ret } @@ -183,7 +185,7 @@ func (o *LDAPSource) GetEnabled() bool { // GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *LDAPSource) GetEnabledOk() (*bool, bool) { - if o == nil || o.Enabled == nil { + if o == nil || IsNil(o.Enabled) { return nil, false } return o.Enabled, true @@ -191,7 +193,7 @@ func (o *LDAPSource) GetEnabledOk() (*bool, bool) { // HasEnabled returns a boolean if a field has been set. func (o *LDAPSource) HasEnabled() bool { - if o != nil && o.Enabled != nil { + if o != nil && !IsNil(o.Enabled) { return true } @@ -205,7 +207,7 @@ func (o *LDAPSource) SetEnabled(v bool) { // GetAuthenticationFlow returns the AuthenticationFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *LDAPSource) GetAuthenticationFlow() string { - if o == nil || o.AuthenticationFlow.Get() == nil { + if o == nil || IsNil(o.AuthenticationFlow.Get()) { var ret string return ret } @@ -248,7 +250,7 @@ func (o *LDAPSource) UnsetAuthenticationFlow() { // GetEnrollmentFlow returns the EnrollmentFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *LDAPSource) GetEnrollmentFlow() string { - if o == nil || o.EnrollmentFlow.Get() == nil { + if o == nil || IsNil(o.EnrollmentFlow.Get()) { var ret string return ret } @@ -387,7 +389,7 @@ func (o *LDAPSource) SetMetaModelName(v string) { // GetPolicyEngineMode returns the PolicyEngineMode field value if set, zero value otherwise. func (o *LDAPSource) GetPolicyEngineMode() PolicyEngineMode { - if o == nil || o.PolicyEngineMode == nil { + if o == nil || IsNil(o.PolicyEngineMode) { var ret PolicyEngineMode return ret } @@ -397,7 +399,7 @@ func (o *LDAPSource) GetPolicyEngineMode() PolicyEngineMode { // GetPolicyEngineModeOk returns a tuple with the PolicyEngineMode field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *LDAPSource) GetPolicyEngineModeOk() (*PolicyEngineMode, bool) { - if o == nil || o.PolicyEngineMode == nil { + if o == nil || IsNil(o.PolicyEngineMode) { return nil, false } return o.PolicyEngineMode, true @@ -405,7 +407,7 @@ func (o *LDAPSource) GetPolicyEngineModeOk() (*PolicyEngineMode, bool) { // HasPolicyEngineMode returns a boolean if a field has been set. func (o *LDAPSource) HasPolicyEngineMode() bool { - if o != nil && o.PolicyEngineMode != nil { + if o != nil && !IsNil(o.PolicyEngineMode) { return true } @@ -417,47 +419,36 @@ func (o *LDAPSource) SetPolicyEngineMode(v PolicyEngineMode) { o.PolicyEngineMode = &v } -// GetUserMatchingMode returns the UserMatchingMode field value if set, zero value otherwise (both if not set or set to explicit null). +// GetUserMatchingMode returns the UserMatchingMode field value if set, zero value otherwise. func (o *LDAPSource) GetUserMatchingMode() UserMatchingModeEnum { - if o == nil || o.UserMatchingMode.Get() == nil { + if o == nil || IsNil(o.UserMatchingMode) { var ret UserMatchingModeEnum return ret } - return *o.UserMatchingMode.Get() + return *o.UserMatchingMode } // GetUserMatchingModeOk returns a tuple with the UserMatchingMode field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *LDAPSource) GetUserMatchingModeOk() (*UserMatchingModeEnum, bool) { - if o == nil { + if o == nil || IsNil(o.UserMatchingMode) { return nil, false } - return o.UserMatchingMode.Get(), o.UserMatchingMode.IsSet() + return o.UserMatchingMode, true } // HasUserMatchingMode returns a boolean if a field has been set. func (o *LDAPSource) HasUserMatchingMode() bool { - if o != nil && o.UserMatchingMode.IsSet() { + if o != nil && !IsNil(o.UserMatchingMode) { return true } return false } -// SetUserMatchingMode gets a reference to the given NullableUserMatchingModeEnum and assigns it to the UserMatchingMode field. +// SetUserMatchingMode gets a reference to the given UserMatchingModeEnum and assigns it to the UserMatchingMode field. func (o *LDAPSource) SetUserMatchingMode(v UserMatchingModeEnum) { - o.UserMatchingMode.Set(&v) -} - -// SetUserMatchingModeNil sets the value for UserMatchingMode to be an explicit nil -func (o *LDAPSource) SetUserMatchingModeNil() { - o.UserMatchingMode.Set(nil) -} - -// UnsetUserMatchingMode ensures that no value is present for UserMatchingMode, not even an explicit nil -func (o *LDAPSource) UnsetUserMatchingMode() { - o.UserMatchingMode.Unset() + o.UserMatchingMode = &v } // GetManaged returns the Managed field value @@ -488,7 +479,7 @@ func (o *LDAPSource) SetManaged(v string) { // GetUserPathTemplate returns the UserPathTemplate field value if set, zero value otherwise. func (o *LDAPSource) GetUserPathTemplate() string { - if o == nil || o.UserPathTemplate == nil { + if o == nil || IsNil(o.UserPathTemplate) { var ret string return ret } @@ -498,7 +489,7 @@ func (o *LDAPSource) GetUserPathTemplate() string { // GetUserPathTemplateOk returns a tuple with the UserPathTemplate field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *LDAPSource) GetUserPathTemplateOk() (*string, bool) { - if o == nil || o.UserPathTemplate == nil { + if o == nil || IsNil(o.UserPathTemplate) { return nil, false } return o.UserPathTemplate, true @@ -506,7 +497,7 @@ func (o *LDAPSource) GetUserPathTemplateOk() (*string, bool) { // HasUserPathTemplate returns a boolean if a field has been set. func (o *LDAPSource) HasUserPathTemplate() bool { - if o != nil && o.UserPathTemplate != nil { + if o != nil && !IsNil(o.UserPathTemplate) { return true } @@ -570,7 +561,7 @@ func (o *LDAPSource) SetServerUri(v string) { // GetPeerCertificate returns the PeerCertificate field value if set, zero value otherwise (both if not set or set to explicit null). func (o *LDAPSource) GetPeerCertificate() string { - if o == nil || o.PeerCertificate.Get() == nil { + if o == nil || IsNil(o.PeerCertificate.Get()) { var ret string return ret } @@ -613,7 +604,7 @@ func (o *LDAPSource) UnsetPeerCertificate() { // GetBindCn returns the BindCn field value if set, zero value otherwise. func (o *LDAPSource) GetBindCn() string { - if o == nil || o.BindCn == nil { + if o == nil || IsNil(o.BindCn) { var ret string return ret } @@ -623,7 +614,7 @@ func (o *LDAPSource) GetBindCn() string { // GetBindCnOk returns a tuple with the BindCn field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *LDAPSource) GetBindCnOk() (*string, bool) { - if o == nil || o.BindCn == nil { + if o == nil || IsNil(o.BindCn) { return nil, false } return o.BindCn, true @@ -631,7 +622,7 @@ func (o *LDAPSource) GetBindCnOk() (*string, bool) { // HasBindCn returns a boolean if a field has been set. func (o *LDAPSource) HasBindCn() bool { - if o != nil && o.BindCn != nil { + if o != nil && !IsNil(o.BindCn) { return true } @@ -645,7 +636,7 @@ func (o *LDAPSource) SetBindCn(v string) { // GetStartTls returns the StartTls field value if set, zero value otherwise. func (o *LDAPSource) GetStartTls() bool { - if o == nil || o.StartTls == nil { + if o == nil || IsNil(o.StartTls) { var ret bool return ret } @@ -655,7 +646,7 @@ func (o *LDAPSource) GetStartTls() bool { // GetStartTlsOk returns a tuple with the StartTls field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *LDAPSource) GetStartTlsOk() (*bool, bool) { - if o == nil || o.StartTls == nil { + if o == nil || IsNil(o.StartTls) { return nil, false } return o.StartTls, true @@ -663,7 +654,7 @@ func (o *LDAPSource) GetStartTlsOk() (*bool, bool) { // HasStartTls returns a boolean if a field has been set. func (o *LDAPSource) HasStartTls() bool { - if o != nil && o.StartTls != nil { + if o != nil && !IsNil(o.StartTls) { return true } @@ -701,7 +692,7 @@ func (o *LDAPSource) SetBaseDn(v string) { // GetAdditionalUserDn returns the AdditionalUserDn field value if set, zero value otherwise. func (o *LDAPSource) GetAdditionalUserDn() string { - if o == nil || o.AdditionalUserDn == nil { + if o == nil || IsNil(o.AdditionalUserDn) { var ret string return ret } @@ -711,7 +702,7 @@ func (o *LDAPSource) GetAdditionalUserDn() string { // GetAdditionalUserDnOk returns a tuple with the AdditionalUserDn field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *LDAPSource) GetAdditionalUserDnOk() (*string, bool) { - if o == nil || o.AdditionalUserDn == nil { + if o == nil || IsNil(o.AdditionalUserDn) { return nil, false } return o.AdditionalUserDn, true @@ -719,7 +710,7 @@ func (o *LDAPSource) GetAdditionalUserDnOk() (*string, bool) { // HasAdditionalUserDn returns a boolean if a field has been set. func (o *LDAPSource) HasAdditionalUserDn() bool { - if o != nil && o.AdditionalUserDn != nil { + if o != nil && !IsNil(o.AdditionalUserDn) { return true } @@ -733,7 +724,7 @@ func (o *LDAPSource) SetAdditionalUserDn(v string) { // GetAdditionalGroupDn returns the AdditionalGroupDn field value if set, zero value otherwise. func (o *LDAPSource) GetAdditionalGroupDn() string { - if o == nil || o.AdditionalGroupDn == nil { + if o == nil || IsNil(o.AdditionalGroupDn) { var ret string return ret } @@ -743,7 +734,7 @@ func (o *LDAPSource) GetAdditionalGroupDn() string { // GetAdditionalGroupDnOk returns a tuple with the AdditionalGroupDn field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *LDAPSource) GetAdditionalGroupDnOk() (*string, bool) { - if o == nil || o.AdditionalGroupDn == nil { + if o == nil || IsNil(o.AdditionalGroupDn) { return nil, false } return o.AdditionalGroupDn, true @@ -751,7 +742,7 @@ func (o *LDAPSource) GetAdditionalGroupDnOk() (*string, bool) { // HasAdditionalGroupDn returns a boolean if a field has been set. func (o *LDAPSource) HasAdditionalGroupDn() bool { - if o != nil && o.AdditionalGroupDn != nil { + if o != nil && !IsNil(o.AdditionalGroupDn) { return true } @@ -765,7 +756,7 @@ func (o *LDAPSource) SetAdditionalGroupDn(v string) { // GetUserObjectFilter returns the UserObjectFilter field value if set, zero value otherwise. func (o *LDAPSource) GetUserObjectFilter() string { - if o == nil || o.UserObjectFilter == nil { + if o == nil || IsNil(o.UserObjectFilter) { var ret string return ret } @@ -775,7 +766,7 @@ func (o *LDAPSource) GetUserObjectFilter() string { // GetUserObjectFilterOk returns a tuple with the UserObjectFilter field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *LDAPSource) GetUserObjectFilterOk() (*string, bool) { - if o == nil || o.UserObjectFilter == nil { + if o == nil || IsNil(o.UserObjectFilter) { return nil, false } return o.UserObjectFilter, true @@ -783,7 +774,7 @@ func (o *LDAPSource) GetUserObjectFilterOk() (*string, bool) { // HasUserObjectFilter returns a boolean if a field has been set. func (o *LDAPSource) HasUserObjectFilter() bool { - if o != nil && o.UserObjectFilter != nil { + if o != nil && !IsNil(o.UserObjectFilter) { return true } @@ -797,7 +788,7 @@ func (o *LDAPSource) SetUserObjectFilter(v string) { // GetGroupObjectFilter returns the GroupObjectFilter field value if set, zero value otherwise. func (o *LDAPSource) GetGroupObjectFilter() string { - if o == nil || o.GroupObjectFilter == nil { + if o == nil || IsNil(o.GroupObjectFilter) { var ret string return ret } @@ -807,7 +798,7 @@ func (o *LDAPSource) GetGroupObjectFilter() string { // GetGroupObjectFilterOk returns a tuple with the GroupObjectFilter field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *LDAPSource) GetGroupObjectFilterOk() (*string, bool) { - if o == nil || o.GroupObjectFilter == nil { + if o == nil || IsNil(o.GroupObjectFilter) { return nil, false } return o.GroupObjectFilter, true @@ -815,7 +806,7 @@ func (o *LDAPSource) GetGroupObjectFilterOk() (*string, bool) { // HasGroupObjectFilter returns a boolean if a field has been set. func (o *LDAPSource) HasGroupObjectFilter() bool { - if o != nil && o.GroupObjectFilter != nil { + if o != nil && !IsNil(o.GroupObjectFilter) { return true } @@ -829,7 +820,7 @@ func (o *LDAPSource) SetGroupObjectFilter(v string) { // GetGroupMembershipField returns the GroupMembershipField field value if set, zero value otherwise. func (o *LDAPSource) GetGroupMembershipField() string { - if o == nil || o.GroupMembershipField == nil { + if o == nil || IsNil(o.GroupMembershipField) { var ret string return ret } @@ -839,7 +830,7 @@ func (o *LDAPSource) GetGroupMembershipField() string { // GetGroupMembershipFieldOk returns a tuple with the GroupMembershipField field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *LDAPSource) GetGroupMembershipFieldOk() (*string, bool) { - if o == nil || o.GroupMembershipField == nil { + if o == nil || IsNil(o.GroupMembershipField) { return nil, false } return o.GroupMembershipField, true @@ -847,7 +838,7 @@ func (o *LDAPSource) GetGroupMembershipFieldOk() (*string, bool) { // HasGroupMembershipField returns a boolean if a field has been set. func (o *LDAPSource) HasGroupMembershipField() bool { - if o != nil && o.GroupMembershipField != nil { + if o != nil && !IsNil(o.GroupMembershipField) { return true } @@ -861,7 +852,7 @@ func (o *LDAPSource) SetGroupMembershipField(v string) { // GetObjectUniquenessField returns the ObjectUniquenessField field value if set, zero value otherwise. func (o *LDAPSource) GetObjectUniquenessField() string { - if o == nil || o.ObjectUniquenessField == nil { + if o == nil || IsNil(o.ObjectUniquenessField) { var ret string return ret } @@ -871,7 +862,7 @@ func (o *LDAPSource) GetObjectUniquenessField() string { // GetObjectUniquenessFieldOk returns a tuple with the ObjectUniquenessField field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *LDAPSource) GetObjectUniquenessFieldOk() (*string, bool) { - if o == nil || o.ObjectUniquenessField == nil { + if o == nil || IsNil(o.ObjectUniquenessField) { return nil, false } return o.ObjectUniquenessField, true @@ -879,7 +870,7 @@ func (o *LDAPSource) GetObjectUniquenessFieldOk() (*string, bool) { // HasObjectUniquenessField returns a boolean if a field has been set. func (o *LDAPSource) HasObjectUniquenessField() bool { - if o != nil && o.ObjectUniquenessField != nil { + if o != nil && !IsNil(o.ObjectUniquenessField) { return true } @@ -893,7 +884,7 @@ func (o *LDAPSource) SetObjectUniquenessField(v string) { // GetSyncUsers returns the SyncUsers field value if set, zero value otherwise. func (o *LDAPSource) GetSyncUsers() bool { - if o == nil || o.SyncUsers == nil { + if o == nil || IsNil(o.SyncUsers) { var ret bool return ret } @@ -903,7 +894,7 @@ func (o *LDAPSource) GetSyncUsers() bool { // GetSyncUsersOk returns a tuple with the SyncUsers field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *LDAPSource) GetSyncUsersOk() (*bool, bool) { - if o == nil || o.SyncUsers == nil { + if o == nil || IsNil(o.SyncUsers) { return nil, false } return o.SyncUsers, true @@ -911,7 +902,7 @@ func (o *LDAPSource) GetSyncUsersOk() (*bool, bool) { // HasSyncUsers returns a boolean if a field has been set. func (o *LDAPSource) HasSyncUsers() bool { - if o != nil && o.SyncUsers != nil { + if o != nil && !IsNil(o.SyncUsers) { return true } @@ -925,7 +916,7 @@ func (o *LDAPSource) SetSyncUsers(v bool) { // GetSyncUsersPassword returns the SyncUsersPassword field value if set, zero value otherwise. func (o *LDAPSource) GetSyncUsersPassword() bool { - if o == nil || o.SyncUsersPassword == nil { + if o == nil || IsNil(o.SyncUsersPassword) { var ret bool return ret } @@ -935,7 +926,7 @@ func (o *LDAPSource) GetSyncUsersPassword() bool { // GetSyncUsersPasswordOk returns a tuple with the SyncUsersPassword field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *LDAPSource) GetSyncUsersPasswordOk() (*bool, bool) { - if o == nil || o.SyncUsersPassword == nil { + if o == nil || IsNil(o.SyncUsersPassword) { return nil, false } return o.SyncUsersPassword, true @@ -943,7 +934,7 @@ func (o *LDAPSource) GetSyncUsersPasswordOk() (*bool, bool) { // HasSyncUsersPassword returns a boolean if a field has been set. func (o *LDAPSource) HasSyncUsersPassword() bool { - if o != nil && o.SyncUsersPassword != nil { + if o != nil && !IsNil(o.SyncUsersPassword) { return true } @@ -957,7 +948,7 @@ func (o *LDAPSource) SetSyncUsersPassword(v bool) { // GetSyncGroups returns the SyncGroups field value if set, zero value otherwise. func (o *LDAPSource) GetSyncGroups() bool { - if o == nil || o.SyncGroups == nil { + if o == nil || IsNil(o.SyncGroups) { var ret bool return ret } @@ -967,7 +958,7 @@ func (o *LDAPSource) GetSyncGroups() bool { // GetSyncGroupsOk returns a tuple with the SyncGroups field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *LDAPSource) GetSyncGroupsOk() (*bool, bool) { - if o == nil || o.SyncGroups == nil { + if o == nil || IsNil(o.SyncGroups) { return nil, false } return o.SyncGroups, true @@ -975,7 +966,7 @@ func (o *LDAPSource) GetSyncGroupsOk() (*bool, bool) { // HasSyncGroups returns a boolean if a field has been set. func (o *LDAPSource) HasSyncGroups() bool { - if o != nil && o.SyncGroups != nil { + if o != nil && !IsNil(o.SyncGroups) { return true } @@ -989,7 +980,7 @@ func (o *LDAPSource) SetSyncGroups(v bool) { // GetSyncParentGroup returns the SyncParentGroup field value if set, zero value otherwise (both if not set or set to explicit null). func (o *LDAPSource) GetSyncParentGroup() string { - if o == nil || o.SyncParentGroup.Get() == nil { + if o == nil || IsNil(o.SyncParentGroup.Get()) { var ret string return ret } @@ -1032,7 +1023,7 @@ func (o *LDAPSource) UnsetSyncParentGroup() { // GetPropertyMappings returns the PropertyMappings field value if set, zero value otherwise. func (o *LDAPSource) GetPropertyMappings() []string { - if o == nil || o.PropertyMappings == nil { + if o == nil || IsNil(o.PropertyMappings) { var ret []string return ret } @@ -1042,7 +1033,7 @@ func (o *LDAPSource) GetPropertyMappings() []string { // GetPropertyMappingsOk returns a tuple with the PropertyMappings field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *LDAPSource) GetPropertyMappingsOk() ([]string, bool) { - if o == nil || o.PropertyMappings == nil { + if o == nil || IsNil(o.PropertyMappings) { return nil, false } return o.PropertyMappings, true @@ -1050,7 +1041,7 @@ func (o *LDAPSource) GetPropertyMappingsOk() ([]string, bool) { // HasPropertyMappings returns a boolean if a field has been set. func (o *LDAPSource) HasPropertyMappings() bool { - if o != nil && o.PropertyMappings != nil { + if o != nil && !IsNil(o.PropertyMappings) { return true } @@ -1064,7 +1055,7 @@ func (o *LDAPSource) SetPropertyMappings(v []string) { // GetPropertyMappingsGroup returns the PropertyMappingsGroup field value if set, zero value otherwise. func (o *LDAPSource) GetPropertyMappingsGroup() []string { - if o == nil || o.PropertyMappingsGroup == nil { + if o == nil || IsNil(o.PropertyMappingsGroup) { var ret []string return ret } @@ -1074,7 +1065,7 @@ func (o *LDAPSource) GetPropertyMappingsGroup() []string { // GetPropertyMappingsGroupOk returns a tuple with the PropertyMappingsGroup field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *LDAPSource) GetPropertyMappingsGroupOk() ([]string, bool) { - if o == nil || o.PropertyMappingsGroup == nil { + if o == nil || IsNil(o.PropertyMappingsGroup) { return nil, false } return o.PropertyMappingsGroup, true @@ -1082,7 +1073,7 @@ func (o *LDAPSource) GetPropertyMappingsGroupOk() ([]string, bool) { // HasPropertyMappingsGroup returns a boolean if a field has been set. func (o *LDAPSource) HasPropertyMappingsGroup() bool { - if o != nil && o.PropertyMappingsGroup != nil { + if o != nil && !IsNil(o.PropertyMappingsGroup) { return true } @@ -1095,17 +1086,19 @@ func (o *LDAPSource) SetPropertyMappingsGroup(v []string) { } func (o LDAPSource) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if true { - toSerialize["slug"] = o.Slug - } - if o.Enabled != nil { + return json.Marshal(toSerialize) +} + +func (o LDAPSource) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name + toSerialize["slug"] = o.Slug + if !IsNil(o.Enabled) { toSerialize["enabled"] = o.Enabled } if o.AuthenticationFlow.IsSet() { @@ -1114,85 +1107,69 @@ func (o LDAPSource) MarshalJSON() ([]byte, error) { if o.EnrollmentFlow.IsSet() { toSerialize["enrollment_flow"] = o.EnrollmentFlow.Get() } - if true { - toSerialize["component"] = o.Component - } - if true { - toSerialize["verbose_name"] = o.VerboseName - } - if true { - toSerialize["verbose_name_plural"] = o.VerboseNamePlural - } - if true { - toSerialize["meta_model_name"] = o.MetaModelName - } - if o.PolicyEngineMode != nil { + // skip: component is readOnly + // skip: verbose_name is readOnly + // skip: verbose_name_plural is readOnly + // skip: meta_model_name is readOnly + if !IsNil(o.PolicyEngineMode) { toSerialize["policy_engine_mode"] = o.PolicyEngineMode } - if o.UserMatchingMode.IsSet() { - toSerialize["user_matching_mode"] = o.UserMatchingMode.Get() + if !IsNil(o.UserMatchingMode) { + toSerialize["user_matching_mode"] = o.UserMatchingMode } - if true { - toSerialize["managed"] = o.Managed.Get() - } - if o.UserPathTemplate != nil { + toSerialize["managed"] = o.Managed.Get() + if !IsNil(o.UserPathTemplate) { toSerialize["user_path_template"] = o.UserPathTemplate } - if true { - toSerialize["icon"] = o.Icon.Get() - } - if true { - toSerialize["server_uri"] = o.ServerUri - } + toSerialize["icon"] = o.Icon.Get() + toSerialize["server_uri"] = o.ServerUri if o.PeerCertificate.IsSet() { toSerialize["peer_certificate"] = o.PeerCertificate.Get() } - if o.BindCn != nil { + if !IsNil(o.BindCn) { toSerialize["bind_cn"] = o.BindCn } - if o.StartTls != nil { + if !IsNil(o.StartTls) { toSerialize["start_tls"] = o.StartTls } - if true { - toSerialize["base_dn"] = o.BaseDn - } - if o.AdditionalUserDn != nil { + toSerialize["base_dn"] = o.BaseDn + if !IsNil(o.AdditionalUserDn) { toSerialize["additional_user_dn"] = o.AdditionalUserDn } - if o.AdditionalGroupDn != nil { + if !IsNil(o.AdditionalGroupDn) { toSerialize["additional_group_dn"] = o.AdditionalGroupDn } - if o.UserObjectFilter != nil { + if !IsNil(o.UserObjectFilter) { toSerialize["user_object_filter"] = o.UserObjectFilter } - if o.GroupObjectFilter != nil { + if !IsNil(o.GroupObjectFilter) { toSerialize["group_object_filter"] = o.GroupObjectFilter } - if o.GroupMembershipField != nil { + if !IsNil(o.GroupMembershipField) { toSerialize["group_membership_field"] = o.GroupMembershipField } - if o.ObjectUniquenessField != nil { + if !IsNil(o.ObjectUniquenessField) { toSerialize["object_uniqueness_field"] = o.ObjectUniquenessField } - if o.SyncUsers != nil { + if !IsNil(o.SyncUsers) { toSerialize["sync_users"] = o.SyncUsers } - if o.SyncUsersPassword != nil { + if !IsNil(o.SyncUsersPassword) { toSerialize["sync_users_password"] = o.SyncUsersPassword } - if o.SyncGroups != nil { + if !IsNil(o.SyncGroups) { toSerialize["sync_groups"] = o.SyncGroups } if o.SyncParentGroup.IsSet() { toSerialize["sync_parent_group"] = o.SyncParentGroup.Get() } - if o.PropertyMappings != nil { + if !IsNil(o.PropertyMappings) { toSerialize["property_mappings"] = o.PropertyMappings } - if o.PropertyMappingsGroup != nil { + if !IsNil(o.PropertyMappingsGroup) { toSerialize["property_mappings_group"] = o.PropertyMappingsGroup } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableLDAPSource struct { diff --git a/model_ldap_source_request.go b/model_ldap_source_request.go index 805a8b4cb..3edd08473 100644 --- a/model_ldap_source_request.go +++ b/model_ldap_source_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the LDAPSourceRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LDAPSourceRequest{} + // LDAPSourceRequest LDAP Source Serializer type LDAPSourceRequest struct { // Source's display Name. @@ -25,12 +28,11 @@ type LDAPSourceRequest struct { // Flow to use when authenticating existing users. AuthenticationFlow NullableString `json:"authentication_flow,omitempty"` // Flow to use when enrolling new users. - EnrollmentFlow NullableString `json:"enrollment_flow,omitempty"` - PolicyEngineMode *PolicyEngineMode `json:"policy_engine_mode,omitempty"` - // How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. - UserMatchingMode NullableUserMatchingModeEnum `json:"user_matching_mode,omitempty"` - UserPathTemplate *string `json:"user_path_template,omitempty"` - ServerUri string `json:"server_uri"` + EnrollmentFlow NullableString `json:"enrollment_flow,omitempty"` + PolicyEngineMode *PolicyEngineMode `json:"policy_engine_mode,omitempty"` + UserMatchingMode *UserMatchingModeEnum `json:"user_matching_mode,omitempty"` + UserPathTemplate *string `json:"user_path_template,omitempty"` + ServerUri string `json:"server_uri"` // Optionally verify the LDAP Server's Certificate against the CA Chain in this keypair. PeerCertificate NullableString `json:"peer_certificate,omitempty"` BindCn *string `json:"bind_cn,omitempty"` @@ -130,7 +132,7 @@ func (o *LDAPSourceRequest) SetSlug(v string) { // GetEnabled returns the Enabled field value if set, zero value otherwise. func (o *LDAPSourceRequest) GetEnabled() bool { - if o == nil || o.Enabled == nil { + if o == nil || IsNil(o.Enabled) { var ret bool return ret } @@ -140,7 +142,7 @@ func (o *LDAPSourceRequest) GetEnabled() bool { // GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *LDAPSourceRequest) GetEnabledOk() (*bool, bool) { - if o == nil || o.Enabled == nil { + if o == nil || IsNil(o.Enabled) { return nil, false } return o.Enabled, true @@ -148,7 +150,7 @@ func (o *LDAPSourceRequest) GetEnabledOk() (*bool, bool) { // HasEnabled returns a boolean if a field has been set. func (o *LDAPSourceRequest) HasEnabled() bool { - if o != nil && o.Enabled != nil { + if o != nil && !IsNil(o.Enabled) { return true } @@ -162,7 +164,7 @@ func (o *LDAPSourceRequest) SetEnabled(v bool) { // GetAuthenticationFlow returns the AuthenticationFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *LDAPSourceRequest) GetAuthenticationFlow() string { - if o == nil || o.AuthenticationFlow.Get() == nil { + if o == nil || IsNil(o.AuthenticationFlow.Get()) { var ret string return ret } @@ -205,7 +207,7 @@ func (o *LDAPSourceRequest) UnsetAuthenticationFlow() { // GetEnrollmentFlow returns the EnrollmentFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *LDAPSourceRequest) GetEnrollmentFlow() string { - if o == nil || o.EnrollmentFlow.Get() == nil { + if o == nil || IsNil(o.EnrollmentFlow.Get()) { var ret string return ret } @@ -248,7 +250,7 @@ func (o *LDAPSourceRequest) UnsetEnrollmentFlow() { // GetPolicyEngineMode returns the PolicyEngineMode field value if set, zero value otherwise. func (o *LDAPSourceRequest) GetPolicyEngineMode() PolicyEngineMode { - if o == nil || o.PolicyEngineMode == nil { + if o == nil || IsNil(o.PolicyEngineMode) { var ret PolicyEngineMode return ret } @@ -258,7 +260,7 @@ func (o *LDAPSourceRequest) GetPolicyEngineMode() PolicyEngineMode { // GetPolicyEngineModeOk returns a tuple with the PolicyEngineMode field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *LDAPSourceRequest) GetPolicyEngineModeOk() (*PolicyEngineMode, bool) { - if o == nil || o.PolicyEngineMode == nil { + if o == nil || IsNil(o.PolicyEngineMode) { return nil, false } return o.PolicyEngineMode, true @@ -266,7 +268,7 @@ func (o *LDAPSourceRequest) GetPolicyEngineModeOk() (*PolicyEngineMode, bool) { // HasPolicyEngineMode returns a boolean if a field has been set. func (o *LDAPSourceRequest) HasPolicyEngineMode() bool { - if o != nil && o.PolicyEngineMode != nil { + if o != nil && !IsNil(o.PolicyEngineMode) { return true } @@ -278,52 +280,41 @@ func (o *LDAPSourceRequest) SetPolicyEngineMode(v PolicyEngineMode) { o.PolicyEngineMode = &v } -// GetUserMatchingMode returns the UserMatchingMode field value if set, zero value otherwise (both if not set or set to explicit null). +// GetUserMatchingMode returns the UserMatchingMode field value if set, zero value otherwise. func (o *LDAPSourceRequest) GetUserMatchingMode() UserMatchingModeEnum { - if o == nil || o.UserMatchingMode.Get() == nil { + if o == nil || IsNil(o.UserMatchingMode) { var ret UserMatchingModeEnum return ret } - return *o.UserMatchingMode.Get() + return *o.UserMatchingMode } // GetUserMatchingModeOk returns a tuple with the UserMatchingMode field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *LDAPSourceRequest) GetUserMatchingModeOk() (*UserMatchingModeEnum, bool) { - if o == nil { + if o == nil || IsNil(o.UserMatchingMode) { return nil, false } - return o.UserMatchingMode.Get(), o.UserMatchingMode.IsSet() + return o.UserMatchingMode, true } // HasUserMatchingMode returns a boolean if a field has been set. func (o *LDAPSourceRequest) HasUserMatchingMode() bool { - if o != nil && o.UserMatchingMode.IsSet() { + if o != nil && !IsNil(o.UserMatchingMode) { return true } return false } -// SetUserMatchingMode gets a reference to the given NullableUserMatchingModeEnum and assigns it to the UserMatchingMode field. +// SetUserMatchingMode gets a reference to the given UserMatchingModeEnum and assigns it to the UserMatchingMode field. func (o *LDAPSourceRequest) SetUserMatchingMode(v UserMatchingModeEnum) { - o.UserMatchingMode.Set(&v) -} - -// SetUserMatchingModeNil sets the value for UserMatchingMode to be an explicit nil -func (o *LDAPSourceRequest) SetUserMatchingModeNil() { - o.UserMatchingMode.Set(nil) -} - -// UnsetUserMatchingMode ensures that no value is present for UserMatchingMode, not even an explicit nil -func (o *LDAPSourceRequest) UnsetUserMatchingMode() { - o.UserMatchingMode.Unset() + o.UserMatchingMode = &v } // GetUserPathTemplate returns the UserPathTemplate field value if set, zero value otherwise. func (o *LDAPSourceRequest) GetUserPathTemplate() string { - if o == nil || o.UserPathTemplate == nil { + if o == nil || IsNil(o.UserPathTemplate) { var ret string return ret } @@ -333,7 +324,7 @@ func (o *LDAPSourceRequest) GetUserPathTemplate() string { // GetUserPathTemplateOk returns a tuple with the UserPathTemplate field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *LDAPSourceRequest) GetUserPathTemplateOk() (*string, bool) { - if o == nil || o.UserPathTemplate == nil { + if o == nil || IsNil(o.UserPathTemplate) { return nil, false } return o.UserPathTemplate, true @@ -341,7 +332,7 @@ func (o *LDAPSourceRequest) GetUserPathTemplateOk() (*string, bool) { // HasUserPathTemplate returns a boolean if a field has been set. func (o *LDAPSourceRequest) HasUserPathTemplate() bool { - if o != nil && o.UserPathTemplate != nil { + if o != nil && !IsNil(o.UserPathTemplate) { return true } @@ -379,7 +370,7 @@ func (o *LDAPSourceRequest) SetServerUri(v string) { // GetPeerCertificate returns the PeerCertificate field value if set, zero value otherwise (both if not set or set to explicit null). func (o *LDAPSourceRequest) GetPeerCertificate() string { - if o == nil || o.PeerCertificate.Get() == nil { + if o == nil || IsNil(o.PeerCertificate.Get()) { var ret string return ret } @@ -422,7 +413,7 @@ func (o *LDAPSourceRequest) UnsetPeerCertificate() { // GetBindCn returns the BindCn field value if set, zero value otherwise. func (o *LDAPSourceRequest) GetBindCn() string { - if o == nil || o.BindCn == nil { + if o == nil || IsNil(o.BindCn) { var ret string return ret } @@ -432,7 +423,7 @@ func (o *LDAPSourceRequest) GetBindCn() string { // GetBindCnOk returns a tuple with the BindCn field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *LDAPSourceRequest) GetBindCnOk() (*string, bool) { - if o == nil || o.BindCn == nil { + if o == nil || IsNil(o.BindCn) { return nil, false } return o.BindCn, true @@ -440,7 +431,7 @@ func (o *LDAPSourceRequest) GetBindCnOk() (*string, bool) { // HasBindCn returns a boolean if a field has been set. func (o *LDAPSourceRequest) HasBindCn() bool { - if o != nil && o.BindCn != nil { + if o != nil && !IsNil(o.BindCn) { return true } @@ -454,7 +445,7 @@ func (o *LDAPSourceRequest) SetBindCn(v string) { // GetBindPassword returns the BindPassword field value if set, zero value otherwise. func (o *LDAPSourceRequest) GetBindPassword() string { - if o == nil || o.BindPassword == nil { + if o == nil || IsNil(o.BindPassword) { var ret string return ret } @@ -464,7 +455,7 @@ func (o *LDAPSourceRequest) GetBindPassword() string { // GetBindPasswordOk returns a tuple with the BindPassword field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *LDAPSourceRequest) GetBindPasswordOk() (*string, bool) { - if o == nil || o.BindPassword == nil { + if o == nil || IsNil(o.BindPassword) { return nil, false } return o.BindPassword, true @@ -472,7 +463,7 @@ func (o *LDAPSourceRequest) GetBindPasswordOk() (*string, bool) { // HasBindPassword returns a boolean if a field has been set. func (o *LDAPSourceRequest) HasBindPassword() bool { - if o != nil && o.BindPassword != nil { + if o != nil && !IsNil(o.BindPassword) { return true } @@ -486,7 +477,7 @@ func (o *LDAPSourceRequest) SetBindPassword(v string) { // GetStartTls returns the StartTls field value if set, zero value otherwise. func (o *LDAPSourceRequest) GetStartTls() bool { - if o == nil || o.StartTls == nil { + if o == nil || IsNil(o.StartTls) { var ret bool return ret } @@ -496,7 +487,7 @@ func (o *LDAPSourceRequest) GetStartTls() bool { // GetStartTlsOk returns a tuple with the StartTls field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *LDAPSourceRequest) GetStartTlsOk() (*bool, bool) { - if o == nil || o.StartTls == nil { + if o == nil || IsNil(o.StartTls) { return nil, false } return o.StartTls, true @@ -504,7 +495,7 @@ func (o *LDAPSourceRequest) GetStartTlsOk() (*bool, bool) { // HasStartTls returns a boolean if a field has been set. func (o *LDAPSourceRequest) HasStartTls() bool { - if o != nil && o.StartTls != nil { + if o != nil && !IsNil(o.StartTls) { return true } @@ -542,7 +533,7 @@ func (o *LDAPSourceRequest) SetBaseDn(v string) { // GetAdditionalUserDn returns the AdditionalUserDn field value if set, zero value otherwise. func (o *LDAPSourceRequest) GetAdditionalUserDn() string { - if o == nil || o.AdditionalUserDn == nil { + if o == nil || IsNil(o.AdditionalUserDn) { var ret string return ret } @@ -552,7 +543,7 @@ func (o *LDAPSourceRequest) GetAdditionalUserDn() string { // GetAdditionalUserDnOk returns a tuple with the AdditionalUserDn field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *LDAPSourceRequest) GetAdditionalUserDnOk() (*string, bool) { - if o == nil || o.AdditionalUserDn == nil { + if o == nil || IsNil(o.AdditionalUserDn) { return nil, false } return o.AdditionalUserDn, true @@ -560,7 +551,7 @@ func (o *LDAPSourceRequest) GetAdditionalUserDnOk() (*string, bool) { // HasAdditionalUserDn returns a boolean if a field has been set. func (o *LDAPSourceRequest) HasAdditionalUserDn() bool { - if o != nil && o.AdditionalUserDn != nil { + if o != nil && !IsNil(o.AdditionalUserDn) { return true } @@ -574,7 +565,7 @@ func (o *LDAPSourceRequest) SetAdditionalUserDn(v string) { // GetAdditionalGroupDn returns the AdditionalGroupDn field value if set, zero value otherwise. func (o *LDAPSourceRequest) GetAdditionalGroupDn() string { - if o == nil || o.AdditionalGroupDn == nil { + if o == nil || IsNil(o.AdditionalGroupDn) { var ret string return ret } @@ -584,7 +575,7 @@ func (o *LDAPSourceRequest) GetAdditionalGroupDn() string { // GetAdditionalGroupDnOk returns a tuple with the AdditionalGroupDn field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *LDAPSourceRequest) GetAdditionalGroupDnOk() (*string, bool) { - if o == nil || o.AdditionalGroupDn == nil { + if o == nil || IsNil(o.AdditionalGroupDn) { return nil, false } return o.AdditionalGroupDn, true @@ -592,7 +583,7 @@ func (o *LDAPSourceRequest) GetAdditionalGroupDnOk() (*string, bool) { // HasAdditionalGroupDn returns a boolean if a field has been set. func (o *LDAPSourceRequest) HasAdditionalGroupDn() bool { - if o != nil && o.AdditionalGroupDn != nil { + if o != nil && !IsNil(o.AdditionalGroupDn) { return true } @@ -606,7 +597,7 @@ func (o *LDAPSourceRequest) SetAdditionalGroupDn(v string) { // GetUserObjectFilter returns the UserObjectFilter field value if set, zero value otherwise. func (o *LDAPSourceRequest) GetUserObjectFilter() string { - if o == nil || o.UserObjectFilter == nil { + if o == nil || IsNil(o.UserObjectFilter) { var ret string return ret } @@ -616,7 +607,7 @@ func (o *LDAPSourceRequest) GetUserObjectFilter() string { // GetUserObjectFilterOk returns a tuple with the UserObjectFilter field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *LDAPSourceRequest) GetUserObjectFilterOk() (*string, bool) { - if o == nil || o.UserObjectFilter == nil { + if o == nil || IsNil(o.UserObjectFilter) { return nil, false } return o.UserObjectFilter, true @@ -624,7 +615,7 @@ func (o *LDAPSourceRequest) GetUserObjectFilterOk() (*string, bool) { // HasUserObjectFilter returns a boolean if a field has been set. func (o *LDAPSourceRequest) HasUserObjectFilter() bool { - if o != nil && o.UserObjectFilter != nil { + if o != nil && !IsNil(o.UserObjectFilter) { return true } @@ -638,7 +629,7 @@ func (o *LDAPSourceRequest) SetUserObjectFilter(v string) { // GetGroupObjectFilter returns the GroupObjectFilter field value if set, zero value otherwise. func (o *LDAPSourceRequest) GetGroupObjectFilter() string { - if o == nil || o.GroupObjectFilter == nil { + if o == nil || IsNil(o.GroupObjectFilter) { var ret string return ret } @@ -648,7 +639,7 @@ func (o *LDAPSourceRequest) GetGroupObjectFilter() string { // GetGroupObjectFilterOk returns a tuple with the GroupObjectFilter field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *LDAPSourceRequest) GetGroupObjectFilterOk() (*string, bool) { - if o == nil || o.GroupObjectFilter == nil { + if o == nil || IsNil(o.GroupObjectFilter) { return nil, false } return o.GroupObjectFilter, true @@ -656,7 +647,7 @@ func (o *LDAPSourceRequest) GetGroupObjectFilterOk() (*string, bool) { // HasGroupObjectFilter returns a boolean if a field has been set. func (o *LDAPSourceRequest) HasGroupObjectFilter() bool { - if o != nil && o.GroupObjectFilter != nil { + if o != nil && !IsNil(o.GroupObjectFilter) { return true } @@ -670,7 +661,7 @@ func (o *LDAPSourceRequest) SetGroupObjectFilter(v string) { // GetGroupMembershipField returns the GroupMembershipField field value if set, zero value otherwise. func (o *LDAPSourceRequest) GetGroupMembershipField() string { - if o == nil || o.GroupMembershipField == nil { + if o == nil || IsNil(o.GroupMembershipField) { var ret string return ret } @@ -680,7 +671,7 @@ func (o *LDAPSourceRequest) GetGroupMembershipField() string { // GetGroupMembershipFieldOk returns a tuple with the GroupMembershipField field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *LDAPSourceRequest) GetGroupMembershipFieldOk() (*string, bool) { - if o == nil || o.GroupMembershipField == nil { + if o == nil || IsNil(o.GroupMembershipField) { return nil, false } return o.GroupMembershipField, true @@ -688,7 +679,7 @@ func (o *LDAPSourceRequest) GetGroupMembershipFieldOk() (*string, bool) { // HasGroupMembershipField returns a boolean if a field has been set. func (o *LDAPSourceRequest) HasGroupMembershipField() bool { - if o != nil && o.GroupMembershipField != nil { + if o != nil && !IsNil(o.GroupMembershipField) { return true } @@ -702,7 +693,7 @@ func (o *LDAPSourceRequest) SetGroupMembershipField(v string) { // GetObjectUniquenessField returns the ObjectUniquenessField field value if set, zero value otherwise. func (o *LDAPSourceRequest) GetObjectUniquenessField() string { - if o == nil || o.ObjectUniquenessField == nil { + if o == nil || IsNil(o.ObjectUniquenessField) { var ret string return ret } @@ -712,7 +703,7 @@ func (o *LDAPSourceRequest) GetObjectUniquenessField() string { // GetObjectUniquenessFieldOk returns a tuple with the ObjectUniquenessField field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *LDAPSourceRequest) GetObjectUniquenessFieldOk() (*string, bool) { - if o == nil || o.ObjectUniquenessField == nil { + if o == nil || IsNil(o.ObjectUniquenessField) { return nil, false } return o.ObjectUniquenessField, true @@ -720,7 +711,7 @@ func (o *LDAPSourceRequest) GetObjectUniquenessFieldOk() (*string, bool) { // HasObjectUniquenessField returns a boolean if a field has been set. func (o *LDAPSourceRequest) HasObjectUniquenessField() bool { - if o != nil && o.ObjectUniquenessField != nil { + if o != nil && !IsNil(o.ObjectUniquenessField) { return true } @@ -734,7 +725,7 @@ func (o *LDAPSourceRequest) SetObjectUniquenessField(v string) { // GetSyncUsers returns the SyncUsers field value if set, zero value otherwise. func (o *LDAPSourceRequest) GetSyncUsers() bool { - if o == nil || o.SyncUsers == nil { + if o == nil || IsNil(o.SyncUsers) { var ret bool return ret } @@ -744,7 +735,7 @@ func (o *LDAPSourceRequest) GetSyncUsers() bool { // GetSyncUsersOk returns a tuple with the SyncUsers field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *LDAPSourceRequest) GetSyncUsersOk() (*bool, bool) { - if o == nil || o.SyncUsers == nil { + if o == nil || IsNil(o.SyncUsers) { return nil, false } return o.SyncUsers, true @@ -752,7 +743,7 @@ func (o *LDAPSourceRequest) GetSyncUsersOk() (*bool, bool) { // HasSyncUsers returns a boolean if a field has been set. func (o *LDAPSourceRequest) HasSyncUsers() bool { - if o != nil && o.SyncUsers != nil { + if o != nil && !IsNil(o.SyncUsers) { return true } @@ -766,7 +757,7 @@ func (o *LDAPSourceRequest) SetSyncUsers(v bool) { // GetSyncUsersPassword returns the SyncUsersPassword field value if set, zero value otherwise. func (o *LDAPSourceRequest) GetSyncUsersPassword() bool { - if o == nil || o.SyncUsersPassword == nil { + if o == nil || IsNil(o.SyncUsersPassword) { var ret bool return ret } @@ -776,7 +767,7 @@ func (o *LDAPSourceRequest) GetSyncUsersPassword() bool { // GetSyncUsersPasswordOk returns a tuple with the SyncUsersPassword field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *LDAPSourceRequest) GetSyncUsersPasswordOk() (*bool, bool) { - if o == nil || o.SyncUsersPassword == nil { + if o == nil || IsNil(o.SyncUsersPassword) { return nil, false } return o.SyncUsersPassword, true @@ -784,7 +775,7 @@ func (o *LDAPSourceRequest) GetSyncUsersPasswordOk() (*bool, bool) { // HasSyncUsersPassword returns a boolean if a field has been set. func (o *LDAPSourceRequest) HasSyncUsersPassword() bool { - if o != nil && o.SyncUsersPassword != nil { + if o != nil && !IsNil(o.SyncUsersPassword) { return true } @@ -798,7 +789,7 @@ func (o *LDAPSourceRequest) SetSyncUsersPassword(v bool) { // GetSyncGroups returns the SyncGroups field value if set, zero value otherwise. func (o *LDAPSourceRequest) GetSyncGroups() bool { - if o == nil || o.SyncGroups == nil { + if o == nil || IsNil(o.SyncGroups) { var ret bool return ret } @@ -808,7 +799,7 @@ func (o *LDAPSourceRequest) GetSyncGroups() bool { // GetSyncGroupsOk returns a tuple with the SyncGroups field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *LDAPSourceRequest) GetSyncGroupsOk() (*bool, bool) { - if o == nil || o.SyncGroups == nil { + if o == nil || IsNil(o.SyncGroups) { return nil, false } return o.SyncGroups, true @@ -816,7 +807,7 @@ func (o *LDAPSourceRequest) GetSyncGroupsOk() (*bool, bool) { // HasSyncGroups returns a boolean if a field has been set. func (o *LDAPSourceRequest) HasSyncGroups() bool { - if o != nil && o.SyncGroups != nil { + if o != nil && !IsNil(o.SyncGroups) { return true } @@ -830,7 +821,7 @@ func (o *LDAPSourceRequest) SetSyncGroups(v bool) { // GetSyncParentGroup returns the SyncParentGroup field value if set, zero value otherwise (both if not set or set to explicit null). func (o *LDAPSourceRequest) GetSyncParentGroup() string { - if o == nil || o.SyncParentGroup.Get() == nil { + if o == nil || IsNil(o.SyncParentGroup.Get()) { var ret string return ret } @@ -873,7 +864,7 @@ func (o *LDAPSourceRequest) UnsetSyncParentGroup() { // GetPropertyMappings returns the PropertyMappings field value if set, zero value otherwise. func (o *LDAPSourceRequest) GetPropertyMappings() []string { - if o == nil || o.PropertyMappings == nil { + if o == nil || IsNil(o.PropertyMappings) { var ret []string return ret } @@ -883,7 +874,7 @@ func (o *LDAPSourceRequest) GetPropertyMappings() []string { // GetPropertyMappingsOk returns a tuple with the PropertyMappings field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *LDAPSourceRequest) GetPropertyMappingsOk() ([]string, bool) { - if o == nil || o.PropertyMappings == nil { + if o == nil || IsNil(o.PropertyMappings) { return nil, false } return o.PropertyMappings, true @@ -891,7 +882,7 @@ func (o *LDAPSourceRequest) GetPropertyMappingsOk() ([]string, bool) { // HasPropertyMappings returns a boolean if a field has been set. func (o *LDAPSourceRequest) HasPropertyMappings() bool { - if o != nil && o.PropertyMappings != nil { + if o != nil && !IsNil(o.PropertyMappings) { return true } @@ -905,7 +896,7 @@ func (o *LDAPSourceRequest) SetPropertyMappings(v []string) { // GetPropertyMappingsGroup returns the PropertyMappingsGroup field value if set, zero value otherwise. func (o *LDAPSourceRequest) GetPropertyMappingsGroup() []string { - if o == nil || o.PropertyMappingsGroup == nil { + if o == nil || IsNil(o.PropertyMappingsGroup) { var ret []string return ret } @@ -915,7 +906,7 @@ func (o *LDAPSourceRequest) GetPropertyMappingsGroup() []string { // GetPropertyMappingsGroupOk returns a tuple with the PropertyMappingsGroup field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *LDAPSourceRequest) GetPropertyMappingsGroupOk() ([]string, bool) { - if o == nil || o.PropertyMappingsGroup == nil { + if o == nil || IsNil(o.PropertyMappingsGroup) { return nil, false } return o.PropertyMappingsGroup, true @@ -923,7 +914,7 @@ func (o *LDAPSourceRequest) GetPropertyMappingsGroupOk() ([]string, bool) { // HasPropertyMappingsGroup returns a boolean if a field has been set. func (o *LDAPSourceRequest) HasPropertyMappingsGroup() bool { - if o != nil && o.PropertyMappingsGroup != nil { + if o != nil && !IsNil(o.PropertyMappingsGroup) { return true } @@ -936,14 +927,18 @@ func (o *LDAPSourceRequest) SetPropertyMappingsGroup(v []string) { } func (o LDAPSourceRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if true { - toSerialize["slug"] = o.Slug - } - if o.Enabled != nil { + return json.Marshal(toSerialize) +} + +func (o LDAPSourceRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["slug"] = o.Slug + if !IsNil(o.Enabled) { toSerialize["enabled"] = o.Enabled } if o.AuthenticationFlow.IsSet() { @@ -952,70 +947,66 @@ func (o LDAPSourceRequest) MarshalJSON() ([]byte, error) { if o.EnrollmentFlow.IsSet() { toSerialize["enrollment_flow"] = o.EnrollmentFlow.Get() } - if o.PolicyEngineMode != nil { + if !IsNil(o.PolicyEngineMode) { toSerialize["policy_engine_mode"] = o.PolicyEngineMode } - if o.UserMatchingMode.IsSet() { - toSerialize["user_matching_mode"] = o.UserMatchingMode.Get() + if !IsNil(o.UserMatchingMode) { + toSerialize["user_matching_mode"] = o.UserMatchingMode } - if o.UserPathTemplate != nil { + if !IsNil(o.UserPathTemplate) { toSerialize["user_path_template"] = o.UserPathTemplate } - if true { - toSerialize["server_uri"] = o.ServerUri - } + toSerialize["server_uri"] = o.ServerUri if o.PeerCertificate.IsSet() { toSerialize["peer_certificate"] = o.PeerCertificate.Get() } - if o.BindCn != nil { + if !IsNil(o.BindCn) { toSerialize["bind_cn"] = o.BindCn } - if o.BindPassword != nil { + if !IsNil(o.BindPassword) { toSerialize["bind_password"] = o.BindPassword } - if o.StartTls != nil { + if !IsNil(o.StartTls) { toSerialize["start_tls"] = o.StartTls } - if true { - toSerialize["base_dn"] = o.BaseDn - } - if o.AdditionalUserDn != nil { + toSerialize["base_dn"] = o.BaseDn + if !IsNil(o.AdditionalUserDn) { toSerialize["additional_user_dn"] = o.AdditionalUserDn } - if o.AdditionalGroupDn != nil { + if !IsNil(o.AdditionalGroupDn) { toSerialize["additional_group_dn"] = o.AdditionalGroupDn } - if o.UserObjectFilter != nil { + if !IsNil(o.UserObjectFilter) { toSerialize["user_object_filter"] = o.UserObjectFilter } - if o.GroupObjectFilter != nil { + if !IsNil(o.GroupObjectFilter) { toSerialize["group_object_filter"] = o.GroupObjectFilter } - if o.GroupMembershipField != nil { + if !IsNil(o.GroupMembershipField) { toSerialize["group_membership_field"] = o.GroupMembershipField } - if o.ObjectUniquenessField != nil { + if !IsNil(o.ObjectUniquenessField) { toSerialize["object_uniqueness_field"] = o.ObjectUniquenessField } - if o.SyncUsers != nil { + if !IsNil(o.SyncUsers) { toSerialize["sync_users"] = o.SyncUsers } - if o.SyncUsersPassword != nil { + if !IsNil(o.SyncUsersPassword) { toSerialize["sync_users_password"] = o.SyncUsersPassword } - if o.SyncGroups != nil { + if !IsNil(o.SyncGroups) { toSerialize["sync_groups"] = o.SyncGroups } if o.SyncParentGroup.IsSet() { toSerialize["sync_parent_group"] = o.SyncParentGroup.Get() } - if o.PropertyMappings != nil { + if !IsNil(o.PropertyMappings) { toSerialize["property_mappings"] = o.PropertyMappings } - if o.PropertyMappingsGroup != nil { + if !IsNil(o.PropertyMappingsGroup) { toSerialize["property_mappings_group"] = o.PropertyMappingsGroup } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableLDAPSourceRequest struct { diff --git a/model_link.go b/model_link.go index 09991a948..bd2eafbe6 100644 --- a/model_link.go +++ b/model_link.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the Link type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Link{} + // Link Returns a single link type Link struct { Link string `json:"link"` @@ -63,13 +66,19 @@ func (o *Link) SetLink(v string) { } func (o Link) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["link"] = o.Link + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o Link) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["link"] = o.Link + return toSerialize, nil +} + type NullableLink struct { value *Link isSet bool diff --git a/model_login_challenge_types.go b/model_login_challenge_types.go index b3f2b10da..82bec70a0 100644 --- a/model_login_challenge_types.go +++ b/model_login_challenge_types.go @@ -51,7 +51,7 @@ func (dst *LoginChallengeTypes) UnmarshalJSON(data []byte) error { var jsonDict map[string]interface{} err = newStrictDecoder(data).Decode(&jsonDict) if err != nil { - return fmt.Errorf("Failed to unmarshal JSON into map for the discriminator lookup.") + return fmt.Errorf("failed to unmarshal JSON into map for the discriminator lookup") } // check if the discriminator value is 'AppleLoginChallenge' @@ -62,7 +62,7 @@ func (dst *LoginChallengeTypes) UnmarshalJSON(data []byte) error { return nil // data stored in dst.AppleLoginChallenge, return on the first match } else { dst.AppleLoginChallenge = nil - return fmt.Errorf("Failed to unmarshal LoginChallengeTypes as AppleLoginChallenge: %s", err.Error()) + return fmt.Errorf("failed to unmarshal LoginChallengeTypes as AppleLoginChallenge: %s", err.Error()) } } @@ -74,7 +74,7 @@ func (dst *LoginChallengeTypes) UnmarshalJSON(data []byte) error { return nil // data stored in dst.PlexAuthenticationChallenge, return on the first match } else { dst.PlexAuthenticationChallenge = nil - return fmt.Errorf("Failed to unmarshal LoginChallengeTypes as PlexAuthenticationChallenge: %s", err.Error()) + return fmt.Errorf("failed to unmarshal LoginChallengeTypes as PlexAuthenticationChallenge: %s", err.Error()) } } @@ -86,7 +86,7 @@ func (dst *LoginChallengeTypes) UnmarshalJSON(data []byte) error { return nil // data stored in dst.RedirectChallenge, return on the first match } else { dst.RedirectChallenge = nil - return fmt.Errorf("Failed to unmarshal LoginChallengeTypes as RedirectChallenge: %s", err.Error()) + return fmt.Errorf("failed to unmarshal LoginChallengeTypes as RedirectChallenge: %s", err.Error()) } } @@ -98,7 +98,7 @@ func (dst *LoginChallengeTypes) UnmarshalJSON(data []byte) error { return nil // data stored in dst.AppleLoginChallenge, return on the first match } else { dst.AppleLoginChallenge = nil - return fmt.Errorf("Failed to unmarshal LoginChallengeTypes as AppleLoginChallenge: %s", err.Error()) + return fmt.Errorf("failed to unmarshal LoginChallengeTypes as AppleLoginChallenge: %s", err.Error()) } } @@ -110,7 +110,7 @@ func (dst *LoginChallengeTypes) UnmarshalJSON(data []byte) error { return nil // data stored in dst.PlexAuthenticationChallenge, return on the first match } else { dst.PlexAuthenticationChallenge = nil - return fmt.Errorf("Failed to unmarshal LoginChallengeTypes as PlexAuthenticationChallenge: %s", err.Error()) + return fmt.Errorf("failed to unmarshal LoginChallengeTypes as PlexAuthenticationChallenge: %s", err.Error()) } } @@ -122,7 +122,7 @@ func (dst *LoginChallengeTypes) UnmarshalJSON(data []byte) error { return nil // data stored in dst.RedirectChallenge, return on the first match } else { dst.RedirectChallenge = nil - return fmt.Errorf("Failed to unmarshal LoginChallengeTypes as RedirectChallenge: %s", err.Error()) + return fmt.Errorf("failed to unmarshal LoginChallengeTypes as RedirectChallenge: %s", err.Error()) } } diff --git a/model_login_metrics.go b/model_login_metrics.go index 62482bd1b..b8e790f4b 100644 --- a/model_login_metrics.go +++ b/model_login_metrics.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the LoginMetrics type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LoginMetrics{} + // LoginMetrics Login Metrics per 1h type LoginMetrics struct { Logins []Coordinate `json:"logins"` @@ -115,19 +118,21 @@ func (o *LoginMetrics) SetAuthorizations(v []Coordinate) { } func (o LoginMetrics) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["logins"] = o.Logins - } - if true { - toSerialize["logins_failed"] = o.LoginsFailed - } - if true { - toSerialize["authorizations"] = o.Authorizations + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o LoginMetrics) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: logins is readOnly + // skip: logins_failed is readOnly + // skip: authorizations is readOnly + return toSerialize, nil +} + type NullableLoginMetrics struct { value *LoginMetrics isSet bool diff --git a/model_login_source.go b/model_login_source.go index 6a582e79e..c62224ac2 100644 --- a/model_login_source.go +++ b/model_login_source.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the LoginSource type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LoginSource{} + // LoginSource Serializer for Login buttons of sources type LoginSource struct { Name string `json:"name"` @@ -67,7 +70,7 @@ func (o *LoginSource) SetName(v string) { // GetIconUrl returns the IconUrl field value if set, zero value otherwise (both if not set or set to explicit null). func (o *LoginSource) GetIconUrl() string { - if o == nil || o.IconUrl.Get() == nil { + if o == nil || IsNil(o.IconUrl.Get()) { var ret string return ret } @@ -133,17 +136,21 @@ func (o *LoginSource) SetChallenge(v LoginChallengeTypes) { } func (o LoginSource) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } + return json.Marshal(toSerialize) +} + +func (o LoginSource) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name if o.IconUrl.IsSet() { toSerialize["icon_url"] = o.IconUrl.Get() } - if true { - toSerialize["challenge"] = o.Challenge - } - return json.Marshal(toSerialize) + toSerialize["challenge"] = o.Challenge + return toSerialize, nil } type NullableLoginSource struct { diff --git a/model_metadata.go b/model_metadata.go index c76430eb1..783d07e83 100644 --- a/model_metadata.go +++ b/model_metadata.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the Metadata type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Metadata{} + // Metadata Serializer for blueprint metadata type Metadata struct { Name string `json:"name"` @@ -78,7 +81,7 @@ func (o *Metadata) GetLabels() map[string]interface{} { // and a boolean to check if the value has been set. func (o *Metadata) GetLabelsOk() (map[string]interface{}, bool) { if o == nil { - return nil, false + return map[string]interface{}{}, false } return o.Labels, true } @@ -89,16 +92,20 @@ func (o *Metadata) SetLabels(v map[string]interface{}) { } func (o Metadata) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["labels"] = o.Labels + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o Metadata) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["labels"] = o.Labels + return toSerialize, nil +} + type NullableMetadata struct { value *Metadata isSet bool diff --git a/model_notification.go b/model_notification.go index 785922706..bef2133d1 100644 --- a/model_notification.go +++ b/model_notification.go @@ -16,21 +16,24 @@ import ( "time" ) +// checks if the Notification type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Notification{} + // Notification Notification Serializer type Notification struct { - Pk string `json:"pk"` - Severity NullableSeverityEnum `json:"severity"` - Body string `json:"body"` - Created time.Time `json:"created"` - Event *Event `json:"event,omitempty"` - Seen *bool `json:"seen,omitempty"` + Pk string `json:"pk"` + Severity SeverityEnum `json:"severity"` + Body string `json:"body"` + Created time.Time `json:"created"` + Event *Event `json:"event,omitempty"` + Seen *bool `json:"seen,omitempty"` } // NewNotification instantiates a new Notification object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewNotification(pk string, severity NullableSeverityEnum, body string, created time.Time) *Notification { +func NewNotification(pk string, severity SeverityEnum, body string, created time.Time) *Notification { this := Notification{} this.Pk = pk this.Severity = severity @@ -72,29 +75,27 @@ func (o *Notification) SetPk(v string) { } // GetSeverity returns the Severity field value -// If the value is explicit nil, the zero value for SeverityEnum will be returned func (o *Notification) GetSeverity() SeverityEnum { - if o == nil || o.Severity.Get() == nil { + if o == nil { var ret SeverityEnum return ret } - return *o.Severity.Get() + return o.Severity } // GetSeverityOk returns a tuple with the Severity field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Notification) GetSeverityOk() (*SeverityEnum, bool) { if o == nil { return nil, false } - return o.Severity.Get(), o.Severity.IsSet() + return &o.Severity, true } // SetSeverity sets field value func (o *Notification) SetSeverity(v SeverityEnum) { - o.Severity.Set(&v) + o.Severity = v } // GetBody returns the Body field value @@ -147,7 +148,7 @@ func (o *Notification) SetCreated(v time.Time) { // GetEvent returns the Event field value if set, zero value otherwise. func (o *Notification) GetEvent() Event { - if o == nil || o.Event == nil { + if o == nil || IsNil(o.Event) { var ret Event return ret } @@ -157,7 +158,7 @@ func (o *Notification) GetEvent() Event { // GetEventOk returns a tuple with the Event field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Notification) GetEventOk() (*Event, bool) { - if o == nil || o.Event == nil { + if o == nil || IsNil(o.Event) { return nil, false } return o.Event, true @@ -165,7 +166,7 @@ func (o *Notification) GetEventOk() (*Event, bool) { // HasEvent returns a boolean if a field has been set. func (o *Notification) HasEvent() bool { - if o != nil && o.Event != nil { + if o != nil && !IsNil(o.Event) { return true } @@ -179,7 +180,7 @@ func (o *Notification) SetEvent(v Event) { // GetSeen returns the Seen field value if set, zero value otherwise. func (o *Notification) GetSeen() bool { - if o == nil || o.Seen == nil { + if o == nil || IsNil(o.Seen) { var ret bool return ret } @@ -189,7 +190,7 @@ func (o *Notification) GetSeen() bool { // GetSeenOk returns a tuple with the Seen field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Notification) GetSeenOk() (*bool, bool) { - if o == nil || o.Seen == nil { + if o == nil || IsNil(o.Seen) { return nil, false } return o.Seen, true @@ -197,7 +198,7 @@ func (o *Notification) GetSeenOk() (*bool, bool) { // HasSeen returns a boolean if a field has been set. func (o *Notification) HasSeen() bool { - if o != nil && o.Seen != nil { + if o != nil && !IsNil(o.Seen) { return true } @@ -210,26 +211,26 @@ func (o *Notification) SetSeen(v bool) { } func (o Notification) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["severity"] = o.Severity.Get() - } - if true { - toSerialize["body"] = o.Body - } - if true { - toSerialize["created"] = o.Created + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.Event != nil { + return json.Marshal(toSerialize) +} + +func (o Notification) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + // skip: severity is readOnly + // skip: body is readOnly + // skip: created is readOnly + if !IsNil(o.Event) { toSerialize["event"] = o.Event } - if o.Seen != nil { + if !IsNil(o.Seen) { toSerialize["seen"] = o.Seen } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableNotification struct { diff --git a/model_notification_request.go b/model_notification_request.go index e279b5cea..909c76f7e 100644 --- a/model_notification_request.go +++ b/model_notification_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the NotificationRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NotificationRequest{} + // NotificationRequest Notification Serializer type NotificationRequest struct { Event *EventRequest `json:"event,omitempty"` @@ -40,7 +43,7 @@ func NewNotificationRequestWithDefaults() *NotificationRequest { // GetEvent returns the Event field value if set, zero value otherwise. func (o *NotificationRequest) GetEvent() EventRequest { - if o == nil || o.Event == nil { + if o == nil || IsNil(o.Event) { var ret EventRequest return ret } @@ -50,7 +53,7 @@ func (o *NotificationRequest) GetEvent() EventRequest { // GetEventOk returns a tuple with the Event field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *NotificationRequest) GetEventOk() (*EventRequest, bool) { - if o == nil || o.Event == nil { + if o == nil || IsNil(o.Event) { return nil, false } return o.Event, true @@ -58,7 +61,7 @@ func (o *NotificationRequest) GetEventOk() (*EventRequest, bool) { // HasEvent returns a boolean if a field has been set. func (o *NotificationRequest) HasEvent() bool { - if o != nil && o.Event != nil { + if o != nil && !IsNil(o.Event) { return true } @@ -72,7 +75,7 @@ func (o *NotificationRequest) SetEvent(v EventRequest) { // GetSeen returns the Seen field value if set, zero value otherwise. func (o *NotificationRequest) GetSeen() bool { - if o == nil || o.Seen == nil { + if o == nil || IsNil(o.Seen) { var ret bool return ret } @@ -82,7 +85,7 @@ func (o *NotificationRequest) GetSeen() bool { // GetSeenOk returns a tuple with the Seen field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *NotificationRequest) GetSeenOk() (*bool, bool) { - if o == nil || o.Seen == nil { + if o == nil || IsNil(o.Seen) { return nil, false } return o.Seen, true @@ -90,7 +93,7 @@ func (o *NotificationRequest) GetSeenOk() (*bool, bool) { // HasSeen returns a boolean if a field has been set. func (o *NotificationRequest) HasSeen() bool { - if o != nil && o.Seen != nil { + if o != nil && !IsNil(o.Seen) { return true } @@ -103,14 +106,22 @@ func (o *NotificationRequest) SetSeen(v bool) { } func (o NotificationRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NotificationRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Event != nil { + if !IsNil(o.Event) { toSerialize["event"] = o.Event } - if o.Seen != nil { + if !IsNil(o.Seen) { toSerialize["seen"] = o.Seen } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableNotificationRequest struct { diff --git a/model_notification_rule.go b/model_notification_rule.go index 0e52bf746..b3f32923c 100644 --- a/model_notification_rule.go +++ b/model_notification_rule.go @@ -15,24 +15,26 @@ import ( "encoding/json" ) +// checks if the NotificationRule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NotificationRule{} + // NotificationRule NotificationRule Serializer type NotificationRule struct { Pk string `json:"pk"` Name string `json:"name"` // Select which transports should be used to notify the user. If none are selected, the notification will only be shown in the authentik UI. - Transports []string `json:"transports,omitempty"` - // Controls which severity level the created notifications will have. * `notice` - Notice * `warning` - Warning * `alert` - Alert - Severity NullableSeverityEnum `json:"severity,omitempty"` + Transports []string `json:"transports,omitempty"` + Severity *SeverityEnum `json:"severity,omitempty"` // Define which group of users this notification should be sent and shown to. If left empty, Notification won't ben sent. - Group NullableString `json:"group,omitempty"` - GroupObj NotificationRuleGroupObj `json:"group_obj"` + Group NullableString `json:"group,omitempty"` + GroupObj Group `json:"group_obj"` } // NewNotificationRule instantiates a new NotificationRule object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewNotificationRule(pk string, name string, groupObj NotificationRuleGroupObj) *NotificationRule { +func NewNotificationRule(pk string, name string, groupObj Group) *NotificationRule { this := NotificationRule{} this.Pk = pk this.Name = name @@ -98,7 +100,7 @@ func (o *NotificationRule) SetName(v string) { // GetTransports returns the Transports field value if set, zero value otherwise. func (o *NotificationRule) GetTransports() []string { - if o == nil || o.Transports == nil { + if o == nil || IsNil(o.Transports) { var ret []string return ret } @@ -108,7 +110,7 @@ func (o *NotificationRule) GetTransports() []string { // GetTransportsOk returns a tuple with the Transports field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *NotificationRule) GetTransportsOk() ([]string, bool) { - if o == nil || o.Transports == nil { + if o == nil || IsNil(o.Transports) { return nil, false } return o.Transports, true @@ -116,7 +118,7 @@ func (o *NotificationRule) GetTransportsOk() ([]string, bool) { // HasTransports returns a boolean if a field has been set. func (o *NotificationRule) HasTransports() bool { - if o != nil && o.Transports != nil { + if o != nil && !IsNil(o.Transports) { return true } @@ -128,52 +130,41 @@ func (o *NotificationRule) SetTransports(v []string) { o.Transports = v } -// GetSeverity returns the Severity field value if set, zero value otherwise (both if not set or set to explicit null). +// GetSeverity returns the Severity field value if set, zero value otherwise. func (o *NotificationRule) GetSeverity() SeverityEnum { - if o == nil || o.Severity.Get() == nil { + if o == nil || IsNil(o.Severity) { var ret SeverityEnum return ret } - return *o.Severity.Get() + return *o.Severity } // GetSeverityOk returns a tuple with the Severity field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NotificationRule) GetSeverityOk() (*SeverityEnum, bool) { - if o == nil { + if o == nil || IsNil(o.Severity) { return nil, false } - return o.Severity.Get(), o.Severity.IsSet() + return o.Severity, true } // HasSeverity returns a boolean if a field has been set. func (o *NotificationRule) HasSeverity() bool { - if o != nil && o.Severity.IsSet() { + if o != nil && !IsNil(o.Severity) { return true } return false } -// SetSeverity gets a reference to the given NullableSeverityEnum and assigns it to the Severity field. +// SetSeverity gets a reference to the given SeverityEnum and assigns it to the Severity field. func (o *NotificationRule) SetSeverity(v SeverityEnum) { - o.Severity.Set(&v) -} - -// SetSeverityNil sets the value for Severity to be an explicit nil -func (o *NotificationRule) SetSeverityNil() { - o.Severity.Set(nil) -} - -// UnsetSeverity ensures that no value is present for Severity, not even an explicit nil -func (o *NotificationRule) UnsetSeverity() { - o.Severity.Unset() + o.Severity = &v } // GetGroup returns the Group field value if set, zero value otherwise (both if not set or set to explicit null). func (o *NotificationRule) GetGroup() string { - if o == nil || o.Group.Get() == nil { + if o == nil || IsNil(o.Group.Get()) { var ret string return ret } @@ -215,9 +206,9 @@ func (o *NotificationRule) UnsetGroup() { } // GetGroupObj returns the GroupObj field value -func (o *NotificationRule) GetGroupObj() NotificationRuleGroupObj { +func (o *NotificationRule) GetGroupObj() Group { if o == nil { - var ret NotificationRuleGroupObj + var ret Group return ret } @@ -226,7 +217,7 @@ func (o *NotificationRule) GetGroupObj() NotificationRuleGroupObj { // GetGroupObjOk returns a tuple with the GroupObj field value // and a boolean to check if the value has been set. -func (o *NotificationRule) GetGroupObjOk() (*NotificationRuleGroupObj, bool) { +func (o *NotificationRule) GetGroupObjOk() (*Group, bool) { if o == nil { return nil, false } @@ -234,31 +225,33 @@ func (o *NotificationRule) GetGroupObjOk() (*NotificationRuleGroupObj, bool) { } // SetGroupObj sets field value -func (o *NotificationRule) SetGroupObj(v NotificationRuleGroupObj) { +func (o *NotificationRule) SetGroupObj(v Group) { o.GroupObj = v } func (o NotificationRule) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if true { - toSerialize["name"] = o.Name - } - if o.Transports != nil { + return json.Marshal(toSerialize) +} + +func (o NotificationRule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name + if !IsNil(o.Transports) { toSerialize["transports"] = o.Transports } - if o.Severity.IsSet() { - toSerialize["severity"] = o.Severity.Get() + if !IsNil(o.Severity) { + toSerialize["severity"] = o.Severity } if o.Group.IsSet() { toSerialize["group"] = o.Group.Get() } - if true { - toSerialize["group_obj"] = o.GroupObj - } - return json.Marshal(toSerialize) + // skip: group_obj is readOnly + return toSerialize, nil } type NullableNotificationRule struct { diff --git a/model_notification_rule_group_obj.go b/model_notification_rule_group_obj.go deleted file mode 100644 index e1f0d9042..000000000 --- a/model_notification_rule_group_obj.go +++ /dev/null @@ -1,379 +0,0 @@ -/* -authentik - -Making authentication simple. - -API version: 2023.3.1 -Contact: hello@goauthentik.io -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package api - -import ( - "encoding/json" -) - -// NotificationRuleGroupObj struct for NotificationRuleGroupObj -type NotificationRuleGroupObj struct { - Pk string `json:"pk"` - NumPk int32 `json:"num_pk"` - Name string `json:"name"` - // Users added to this group will be superusers. - IsSuperuser *bool `json:"is_superuser,omitempty"` - Parent NullableString `json:"parent,omitempty"` - ParentName string `json:"parent_name"` - Users []int32 `json:"users,omitempty"` - Attributes map[string]interface{} `json:"attributes,omitempty"` - UsersObj []GroupMember `json:"users_obj"` -} - -// NewNotificationRuleGroupObj instantiates a new NotificationRuleGroupObj object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewNotificationRuleGroupObj(pk string, numPk int32, name string, parentName string, usersObj []GroupMember) *NotificationRuleGroupObj { - this := NotificationRuleGroupObj{} - this.Pk = pk - this.NumPk = numPk - this.Name = name - this.ParentName = parentName - this.UsersObj = usersObj - return &this -} - -// NewNotificationRuleGroupObjWithDefaults instantiates a new NotificationRuleGroupObj object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewNotificationRuleGroupObjWithDefaults() *NotificationRuleGroupObj { - this := NotificationRuleGroupObj{} - return &this -} - -// GetPk returns the Pk field value -func (o *NotificationRuleGroupObj) GetPk() string { - if o == nil { - var ret string - return ret - } - - return o.Pk -} - -// GetPkOk returns a tuple with the Pk field value -// and a boolean to check if the value has been set. -func (o *NotificationRuleGroupObj) GetPkOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Pk, true -} - -// SetPk sets field value -func (o *NotificationRuleGroupObj) SetPk(v string) { - o.Pk = v -} - -// GetNumPk returns the NumPk field value -func (o *NotificationRuleGroupObj) GetNumPk() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.NumPk -} - -// GetNumPkOk returns a tuple with the NumPk field value -// and a boolean to check if the value has been set. -func (o *NotificationRuleGroupObj) GetNumPkOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.NumPk, true -} - -// SetNumPk sets field value -func (o *NotificationRuleGroupObj) SetNumPk(v int32) { - o.NumPk = v -} - -// GetName returns the Name field value -func (o *NotificationRuleGroupObj) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *NotificationRuleGroupObj) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *NotificationRuleGroupObj) SetName(v string) { - o.Name = v -} - -// GetIsSuperuser returns the IsSuperuser field value if set, zero value otherwise. -func (o *NotificationRuleGroupObj) GetIsSuperuser() bool { - if o == nil || o.IsSuperuser == nil { - var ret bool - return ret - } - return *o.IsSuperuser -} - -// GetIsSuperuserOk returns a tuple with the IsSuperuser field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *NotificationRuleGroupObj) GetIsSuperuserOk() (*bool, bool) { - if o == nil || o.IsSuperuser == nil { - return nil, false - } - return o.IsSuperuser, true -} - -// HasIsSuperuser returns a boolean if a field has been set. -func (o *NotificationRuleGroupObj) HasIsSuperuser() bool { - if o != nil && o.IsSuperuser != nil { - return true - } - - return false -} - -// SetIsSuperuser gets a reference to the given bool and assigns it to the IsSuperuser field. -func (o *NotificationRuleGroupObj) SetIsSuperuser(v bool) { - o.IsSuperuser = &v -} - -// GetParent returns the Parent field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *NotificationRuleGroupObj) GetParent() string { - if o == nil || o.Parent.Get() == nil { - var ret string - return ret - } - return *o.Parent.Get() -} - -// GetParentOk returns a tuple with the Parent field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NotificationRuleGroupObj) GetParentOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Parent.Get(), o.Parent.IsSet() -} - -// HasParent returns a boolean if a field has been set. -func (o *NotificationRuleGroupObj) HasParent() bool { - if o != nil && o.Parent.IsSet() { - return true - } - - return false -} - -// SetParent gets a reference to the given NullableString and assigns it to the Parent field. -func (o *NotificationRuleGroupObj) SetParent(v string) { - o.Parent.Set(&v) -} - -// SetParentNil sets the value for Parent to be an explicit nil -func (o *NotificationRuleGroupObj) SetParentNil() { - o.Parent.Set(nil) -} - -// UnsetParent ensures that no value is present for Parent, not even an explicit nil -func (o *NotificationRuleGroupObj) UnsetParent() { - o.Parent.Unset() -} - -// GetParentName returns the ParentName field value -func (o *NotificationRuleGroupObj) GetParentName() string { - if o == nil { - var ret string - return ret - } - - return o.ParentName -} - -// GetParentNameOk returns a tuple with the ParentName field value -// and a boolean to check if the value has been set. -func (o *NotificationRuleGroupObj) GetParentNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ParentName, true -} - -// SetParentName sets field value -func (o *NotificationRuleGroupObj) SetParentName(v string) { - o.ParentName = v -} - -// GetUsers returns the Users field value if set, zero value otherwise. -func (o *NotificationRuleGroupObj) GetUsers() []int32 { - if o == nil || o.Users == nil { - var ret []int32 - return ret - } - return o.Users -} - -// GetUsersOk returns a tuple with the Users field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *NotificationRuleGroupObj) GetUsersOk() ([]int32, bool) { - if o == nil || o.Users == nil { - return nil, false - } - return o.Users, true -} - -// HasUsers returns a boolean if a field has been set. -func (o *NotificationRuleGroupObj) HasUsers() bool { - if o != nil && o.Users != nil { - return true - } - - return false -} - -// SetUsers gets a reference to the given []int32 and assigns it to the Users field. -func (o *NotificationRuleGroupObj) SetUsers(v []int32) { - o.Users = v -} - -// GetAttributes returns the Attributes field value if set, zero value otherwise. -func (o *NotificationRuleGroupObj) GetAttributes() map[string]interface{} { - if o == nil || o.Attributes == nil { - var ret map[string]interface{} - return ret - } - return o.Attributes -} - -// GetAttributesOk returns a tuple with the Attributes field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *NotificationRuleGroupObj) GetAttributesOk() (map[string]interface{}, bool) { - if o == nil || o.Attributes == nil { - return nil, false - } - return o.Attributes, true -} - -// HasAttributes returns a boolean if a field has been set. -func (o *NotificationRuleGroupObj) HasAttributes() bool { - if o != nil && o.Attributes != nil { - return true - } - - return false -} - -// SetAttributes gets a reference to the given map[string]interface{} and assigns it to the Attributes field. -func (o *NotificationRuleGroupObj) SetAttributes(v map[string]interface{}) { - o.Attributes = v -} - -// GetUsersObj returns the UsersObj field value -func (o *NotificationRuleGroupObj) GetUsersObj() []GroupMember { - if o == nil { - var ret []GroupMember - return ret - } - - return o.UsersObj -} - -// GetUsersObjOk returns a tuple with the UsersObj field value -// and a boolean to check if the value has been set. -func (o *NotificationRuleGroupObj) GetUsersObjOk() ([]GroupMember, bool) { - if o == nil { - return nil, false - } - return o.UsersObj, true -} - -// SetUsersObj sets field value -func (o *NotificationRuleGroupObj) SetUsersObj(v []GroupMember) { - o.UsersObj = v -} - -func (o NotificationRuleGroupObj) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["num_pk"] = o.NumPk - } - if true { - toSerialize["name"] = o.Name - } - if o.IsSuperuser != nil { - toSerialize["is_superuser"] = o.IsSuperuser - } - if o.Parent.IsSet() { - toSerialize["parent"] = o.Parent.Get() - } - if true { - toSerialize["parent_name"] = o.ParentName - } - if o.Users != nil { - toSerialize["users"] = o.Users - } - if o.Attributes != nil { - toSerialize["attributes"] = o.Attributes - } - if true { - toSerialize["users_obj"] = o.UsersObj - } - return json.Marshal(toSerialize) -} - -type NullableNotificationRuleGroupObj struct { - value *NotificationRuleGroupObj - isSet bool -} - -func (v NullableNotificationRuleGroupObj) Get() *NotificationRuleGroupObj { - return v.value -} - -func (v *NullableNotificationRuleGroupObj) Set(val *NotificationRuleGroupObj) { - v.value = val - v.isSet = true -} - -func (v NullableNotificationRuleGroupObj) IsSet() bool { - return v.isSet -} - -func (v *NullableNotificationRuleGroupObj) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableNotificationRuleGroupObj(val *NotificationRuleGroupObj) *NullableNotificationRuleGroupObj { - return &NullableNotificationRuleGroupObj{value: val, isSet: true} -} - -func (v NullableNotificationRuleGroupObj) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableNotificationRuleGroupObj) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/model_notification_rule_request.go b/model_notification_rule_request.go index 30772e402..4dc04adc1 100644 --- a/model_notification_rule_request.go +++ b/model_notification_rule_request.go @@ -15,13 +15,15 @@ import ( "encoding/json" ) +// checks if the NotificationRuleRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NotificationRuleRequest{} + // NotificationRuleRequest NotificationRule Serializer type NotificationRuleRequest struct { Name string `json:"name"` // Select which transports should be used to notify the user. If none are selected, the notification will only be shown in the authentik UI. - Transports []string `json:"transports,omitempty"` - // Controls which severity level the created notifications will have. * `notice` - Notice * `warning` - Warning * `alert` - Alert - Severity NullableSeverityEnum `json:"severity,omitempty"` + Transports []string `json:"transports,omitempty"` + Severity *SeverityEnum `json:"severity,omitempty"` // Define which group of users this notification should be sent and shown to. If left empty, Notification won't ben sent. Group NullableString `json:"group,omitempty"` } @@ -70,7 +72,7 @@ func (o *NotificationRuleRequest) SetName(v string) { // GetTransports returns the Transports field value if set, zero value otherwise. func (o *NotificationRuleRequest) GetTransports() []string { - if o == nil || o.Transports == nil { + if o == nil || IsNil(o.Transports) { var ret []string return ret } @@ -80,7 +82,7 @@ func (o *NotificationRuleRequest) GetTransports() []string { // GetTransportsOk returns a tuple with the Transports field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *NotificationRuleRequest) GetTransportsOk() ([]string, bool) { - if o == nil || o.Transports == nil { + if o == nil || IsNil(o.Transports) { return nil, false } return o.Transports, true @@ -88,7 +90,7 @@ func (o *NotificationRuleRequest) GetTransportsOk() ([]string, bool) { // HasTransports returns a boolean if a field has been set. func (o *NotificationRuleRequest) HasTransports() bool { - if o != nil && o.Transports != nil { + if o != nil && !IsNil(o.Transports) { return true } @@ -100,52 +102,41 @@ func (o *NotificationRuleRequest) SetTransports(v []string) { o.Transports = v } -// GetSeverity returns the Severity field value if set, zero value otherwise (both if not set or set to explicit null). +// GetSeverity returns the Severity field value if set, zero value otherwise. func (o *NotificationRuleRequest) GetSeverity() SeverityEnum { - if o == nil || o.Severity.Get() == nil { + if o == nil || IsNil(o.Severity) { var ret SeverityEnum return ret } - return *o.Severity.Get() + return *o.Severity } // GetSeverityOk returns a tuple with the Severity field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NotificationRuleRequest) GetSeverityOk() (*SeverityEnum, bool) { - if o == nil { + if o == nil || IsNil(o.Severity) { return nil, false } - return o.Severity.Get(), o.Severity.IsSet() + return o.Severity, true } // HasSeverity returns a boolean if a field has been set. func (o *NotificationRuleRequest) HasSeverity() bool { - if o != nil && o.Severity.IsSet() { + if o != nil && !IsNil(o.Severity) { return true } return false } -// SetSeverity gets a reference to the given NullableSeverityEnum and assigns it to the Severity field. +// SetSeverity gets a reference to the given SeverityEnum and assigns it to the Severity field. func (o *NotificationRuleRequest) SetSeverity(v SeverityEnum) { - o.Severity.Set(&v) -} - -// SetSeverityNil sets the value for Severity to be an explicit nil -func (o *NotificationRuleRequest) SetSeverityNil() { - o.Severity.Set(nil) -} - -// UnsetSeverity ensures that no value is present for Severity, not even an explicit nil -func (o *NotificationRuleRequest) UnsetSeverity() { - o.Severity.Unset() + o.Severity = &v } // GetGroup returns the Group field value if set, zero value otherwise (both if not set or set to explicit null). func (o *NotificationRuleRequest) GetGroup() string { - if o == nil || o.Group.Get() == nil { + if o == nil || IsNil(o.Group.Get()) { var ret string return ret } @@ -187,20 +178,26 @@ func (o *NotificationRuleRequest) UnsetGroup() { } func (o NotificationRuleRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.Transports != nil { + return json.Marshal(toSerialize) +} + +func (o NotificationRuleRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Transports) { toSerialize["transports"] = o.Transports } - if o.Severity.IsSet() { - toSerialize["severity"] = o.Severity.Get() + if !IsNil(o.Severity) { + toSerialize["severity"] = o.Severity } if o.Group.IsSet() { toSerialize["group"] = o.Group.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableNotificationRuleRequest struct { diff --git a/model_notification_transport.go b/model_notification_transport.go index 64bb33bd9..5729fd388 100644 --- a/model_notification_transport.go +++ b/model_notification_transport.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the NotificationTransport type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NotificationTransport{} + // NotificationTransport NotificationTransport Serializer type NotificationTransport struct { Pk string `json:"pk"` @@ -98,7 +101,7 @@ func (o *NotificationTransport) SetName(v string) { // GetMode returns the Mode field value if set, zero value otherwise. func (o *NotificationTransport) GetMode() NotificationTransportModeEnum { - if o == nil || o.Mode == nil { + if o == nil || IsNil(o.Mode) { var ret NotificationTransportModeEnum return ret } @@ -108,7 +111,7 @@ func (o *NotificationTransport) GetMode() NotificationTransportModeEnum { // GetModeOk returns a tuple with the Mode field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *NotificationTransport) GetModeOk() (*NotificationTransportModeEnum, bool) { - if o == nil || o.Mode == nil { + if o == nil || IsNil(o.Mode) { return nil, false } return o.Mode, true @@ -116,7 +119,7 @@ func (o *NotificationTransport) GetModeOk() (*NotificationTransportModeEnum, boo // HasMode returns a boolean if a field has been set. func (o *NotificationTransport) HasMode() bool { - if o != nil && o.Mode != nil { + if o != nil && !IsNil(o.Mode) { return true } @@ -154,7 +157,7 @@ func (o *NotificationTransport) SetModeVerbose(v string) { // GetWebhookUrl returns the WebhookUrl field value if set, zero value otherwise. func (o *NotificationTransport) GetWebhookUrl() string { - if o == nil || o.WebhookUrl == nil { + if o == nil || IsNil(o.WebhookUrl) { var ret string return ret } @@ -164,7 +167,7 @@ func (o *NotificationTransport) GetWebhookUrl() string { // GetWebhookUrlOk returns a tuple with the WebhookUrl field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *NotificationTransport) GetWebhookUrlOk() (*string, bool) { - if o == nil || o.WebhookUrl == nil { + if o == nil || IsNil(o.WebhookUrl) { return nil, false } return o.WebhookUrl, true @@ -172,7 +175,7 @@ func (o *NotificationTransport) GetWebhookUrlOk() (*string, bool) { // HasWebhookUrl returns a boolean if a field has been set. func (o *NotificationTransport) HasWebhookUrl() bool { - if o != nil && o.WebhookUrl != nil { + if o != nil && !IsNil(o.WebhookUrl) { return true } @@ -186,7 +189,7 @@ func (o *NotificationTransport) SetWebhookUrl(v string) { // GetWebhookMapping returns the WebhookMapping field value if set, zero value otherwise (both if not set or set to explicit null). func (o *NotificationTransport) GetWebhookMapping() string { - if o == nil || o.WebhookMapping.Get() == nil { + if o == nil || IsNil(o.WebhookMapping.Get()) { var ret string return ret } @@ -229,7 +232,7 @@ func (o *NotificationTransport) UnsetWebhookMapping() { // GetSendOnce returns the SendOnce field value if set, zero value otherwise. func (o *NotificationTransport) GetSendOnce() bool { - if o == nil || o.SendOnce == nil { + if o == nil || IsNil(o.SendOnce) { var ret bool return ret } @@ -239,7 +242,7 @@ func (o *NotificationTransport) GetSendOnce() bool { // GetSendOnceOk returns a tuple with the SendOnce field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *NotificationTransport) GetSendOnceOk() (*bool, bool) { - if o == nil || o.SendOnce == nil { + if o == nil || IsNil(o.SendOnce) { return nil, false } return o.SendOnce, true @@ -247,7 +250,7 @@ func (o *NotificationTransport) GetSendOnceOk() (*bool, bool) { // HasSendOnce returns a boolean if a field has been set. func (o *NotificationTransport) HasSendOnce() bool { - if o != nil && o.SendOnce != nil { + if o != nil && !IsNil(o.SendOnce) { return true } @@ -260,29 +263,31 @@ func (o *NotificationTransport) SetSendOnce(v bool) { } func (o NotificationTransport) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.Mode != nil { + return json.Marshal(toSerialize) +} + +func (o NotificationTransport) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name + if !IsNil(o.Mode) { toSerialize["mode"] = o.Mode } - if true { - toSerialize["mode_verbose"] = o.ModeVerbose - } - if o.WebhookUrl != nil { + // skip: mode_verbose is readOnly + if !IsNil(o.WebhookUrl) { toSerialize["webhook_url"] = o.WebhookUrl } if o.WebhookMapping.IsSet() { toSerialize["webhook_mapping"] = o.WebhookMapping.Get() } - if o.SendOnce != nil { + if !IsNil(o.SendOnce) { toSerialize["send_once"] = o.SendOnce } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableNotificationTransport struct { diff --git a/model_notification_transport_request.go b/model_notification_transport_request.go index 9b439f780..0fd7a1419 100644 --- a/model_notification_transport_request.go +++ b/model_notification_transport_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the NotificationTransportRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NotificationTransportRequest{} + // NotificationTransportRequest NotificationTransport Serializer type NotificationTransportRequest struct { Name string `json:"name"` @@ -69,7 +72,7 @@ func (o *NotificationTransportRequest) SetName(v string) { // GetMode returns the Mode field value if set, zero value otherwise. func (o *NotificationTransportRequest) GetMode() NotificationTransportModeEnum { - if o == nil || o.Mode == nil { + if o == nil || IsNil(o.Mode) { var ret NotificationTransportModeEnum return ret } @@ -79,7 +82,7 @@ func (o *NotificationTransportRequest) GetMode() NotificationTransportModeEnum { // GetModeOk returns a tuple with the Mode field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *NotificationTransportRequest) GetModeOk() (*NotificationTransportModeEnum, bool) { - if o == nil || o.Mode == nil { + if o == nil || IsNil(o.Mode) { return nil, false } return o.Mode, true @@ -87,7 +90,7 @@ func (o *NotificationTransportRequest) GetModeOk() (*NotificationTransportModeEn // HasMode returns a boolean if a field has been set. func (o *NotificationTransportRequest) HasMode() bool { - if o != nil && o.Mode != nil { + if o != nil && !IsNil(o.Mode) { return true } @@ -101,7 +104,7 @@ func (o *NotificationTransportRequest) SetMode(v NotificationTransportModeEnum) // GetWebhookUrl returns the WebhookUrl field value if set, zero value otherwise. func (o *NotificationTransportRequest) GetWebhookUrl() string { - if o == nil || o.WebhookUrl == nil { + if o == nil || IsNil(o.WebhookUrl) { var ret string return ret } @@ -111,7 +114,7 @@ func (o *NotificationTransportRequest) GetWebhookUrl() string { // GetWebhookUrlOk returns a tuple with the WebhookUrl field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *NotificationTransportRequest) GetWebhookUrlOk() (*string, bool) { - if o == nil || o.WebhookUrl == nil { + if o == nil || IsNil(o.WebhookUrl) { return nil, false } return o.WebhookUrl, true @@ -119,7 +122,7 @@ func (o *NotificationTransportRequest) GetWebhookUrlOk() (*string, bool) { // HasWebhookUrl returns a boolean if a field has been set. func (o *NotificationTransportRequest) HasWebhookUrl() bool { - if o != nil && o.WebhookUrl != nil { + if o != nil && !IsNil(o.WebhookUrl) { return true } @@ -133,7 +136,7 @@ func (o *NotificationTransportRequest) SetWebhookUrl(v string) { // GetWebhookMapping returns the WebhookMapping field value if set, zero value otherwise (both if not set or set to explicit null). func (o *NotificationTransportRequest) GetWebhookMapping() string { - if o == nil || o.WebhookMapping.Get() == nil { + if o == nil || IsNil(o.WebhookMapping.Get()) { var ret string return ret } @@ -176,7 +179,7 @@ func (o *NotificationTransportRequest) UnsetWebhookMapping() { // GetSendOnce returns the SendOnce field value if set, zero value otherwise. func (o *NotificationTransportRequest) GetSendOnce() bool { - if o == nil || o.SendOnce == nil { + if o == nil || IsNil(o.SendOnce) { var ret bool return ret } @@ -186,7 +189,7 @@ func (o *NotificationTransportRequest) GetSendOnce() bool { // GetSendOnceOk returns a tuple with the SendOnce field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *NotificationTransportRequest) GetSendOnceOk() (*bool, bool) { - if o == nil || o.SendOnce == nil { + if o == nil || IsNil(o.SendOnce) { return nil, false } return o.SendOnce, true @@ -194,7 +197,7 @@ func (o *NotificationTransportRequest) GetSendOnceOk() (*bool, bool) { // HasSendOnce returns a boolean if a field has been set. func (o *NotificationTransportRequest) HasSendOnce() bool { - if o != nil && o.SendOnce != nil { + if o != nil && !IsNil(o.SendOnce) { return true } @@ -207,23 +210,29 @@ func (o *NotificationTransportRequest) SetSendOnce(v bool) { } func (o NotificationTransportRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.Mode != nil { + return json.Marshal(toSerialize) +} + +func (o NotificationTransportRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Mode) { toSerialize["mode"] = o.Mode } - if o.WebhookUrl != nil { + if !IsNil(o.WebhookUrl) { toSerialize["webhook_url"] = o.WebhookUrl } if o.WebhookMapping.IsSet() { toSerialize["webhook_mapping"] = o.WebhookMapping.Get() } - if o.SendOnce != nil { + if !IsNil(o.SendOnce) { toSerialize["send_once"] = o.SendOnce } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableNotificationTransportRequest struct { diff --git a/model_notification_transport_test_.go b/model_notification_transport_test_.go index 22550edc1..7b325db16 100644 --- a/model_notification_transport_test_.go +++ b/model_notification_transport_test_.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the NotificationTransportTest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NotificationTransportTest{} + // NotificationTransportTest Notification test serializer type NotificationTransportTest struct { Messages []string `json:"messages"` @@ -63,13 +66,19 @@ func (o *NotificationTransportTest) SetMessages(v []string) { } func (o NotificationTransportTest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["messages"] = o.Messages + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o NotificationTransportTest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["messages"] = o.Messages + return toSerialize, nil +} + type NullableNotificationTransportTest struct { value *NotificationTransportTest isSet bool diff --git a/model_notification_webhook_mapping.go b/model_notification_webhook_mapping.go index c7cfce677..e9b4895e0 100644 --- a/model_notification_webhook_mapping.go +++ b/model_notification_webhook_mapping.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the NotificationWebhookMapping type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NotificationWebhookMapping{} + // NotificationWebhookMapping NotificationWebhookMapping Serializer type NotificationWebhookMapping struct { Pk string `json:"pk"` @@ -115,19 +118,21 @@ func (o *NotificationWebhookMapping) SetExpression(v string) { } func (o NotificationWebhookMapping) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["expression"] = o.Expression + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o NotificationWebhookMapping) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name + toSerialize["expression"] = o.Expression + return toSerialize, nil +} + type NullableNotificationWebhookMapping struct { value *NotificationWebhookMapping isSet bool diff --git a/model_notification_webhook_mapping_request.go b/model_notification_webhook_mapping_request.go index 16e6d58b1..d10bcc798 100644 --- a/model_notification_webhook_mapping_request.go +++ b/model_notification_webhook_mapping_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the NotificationWebhookMappingRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NotificationWebhookMappingRequest{} + // NotificationWebhookMappingRequest NotificationWebhookMapping Serializer type NotificationWebhookMappingRequest struct { Name string `json:"name"` @@ -89,16 +92,20 @@ func (o *NotificationWebhookMappingRequest) SetExpression(v string) { } func (o NotificationWebhookMappingRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["expression"] = o.Expression + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o NotificationWebhookMappingRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["expression"] = o.Expression + return toSerialize, nil +} + type NullableNotificationWebhookMappingRequest struct { value *NotificationWebhookMappingRequest isSet bool diff --git a/model_o_auth2_provider.go b/model_o_auth2_provider.go index cc4682139..5565ba5a9 100644 --- a/model_o_auth2_provider.go +++ b/model_o_auth2_provider.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the OAuth2Provider type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OAuth2Provider{} + // OAuth2Provider OAuth2Provider Serializer type OAuth2Provider struct { Pk int32 `json:"pk"` @@ -35,11 +38,10 @@ type OAuth2Provider struct { // Return object's plural verbose_name VerboseNamePlural string `json:"verbose_name_plural"` // Return internal model name - MetaModelName string `json:"meta_model_name"` - // Confidential clients are capable of maintaining the confidentiality of their credentials. Public clients are incapable * `confidential` - Confidential * `public` - Public - ClientType NullableClientTypeEnum `json:"client_type,omitempty"` - ClientId *string `json:"client_id,omitempty"` - ClientSecret *string `json:"client_secret,omitempty"` + MetaModelName string `json:"meta_model_name"` + ClientType *ClientTypeEnum `json:"client_type,omitempty"` + ClientId *string `json:"client_id,omitempty"` + ClientSecret *string `json:"client_secret,omitempty"` // Access codes not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). AccessCodeValidity *string `json:"access_code_validity,omitempty"` // Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). @@ -51,12 +53,10 @@ type OAuth2Provider struct { // Key used to sign the tokens. Only required when JWT Algorithm is set to RS256. SigningKey NullableString `json:"signing_key,omitempty"` // Enter each URI on a new line. - RedirectUris *string `json:"redirect_uris,omitempty"` - // Configure what data should be used as unique User Identifier. For most cases, the default should be fine. * `hashed_user_id` - Based on the Hashed User ID * `user_id` - Based on user ID * `user_username` - Based on the username * `user_email` - Based on the User's Email. This is recommended over the UPN method. * `user_upn` - Based on the User's UPN, only works if user has a 'upn' attribute set. Use this method only if you have different UPN and Mail domains. - SubMode NullableSubModeEnum `json:"sub_mode,omitempty"` - // Configure how the issuer field of the ID Token should be filled. * `global` - Same identifier is used for all providers * `per_provider` - Each provider has a different issuer, based on the application slug. - IssuerMode NullableIssuerModeEnum `json:"issuer_mode,omitempty"` - JwksSources []string `json:"jwks_sources,omitempty"` + RedirectUris *string `json:"redirect_uris,omitempty"` + SubMode *SubModeEnum `json:"sub_mode,omitempty"` + IssuerMode *IssuerModeEnum `json:"issuer_mode,omitempty"` + JwksSources []string `json:"jwks_sources,omitempty"` } // NewOAuth2Provider instantiates a new OAuth2Provider object @@ -135,7 +135,7 @@ func (o *OAuth2Provider) SetName(v string) { // GetAuthenticationFlow returns the AuthenticationFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *OAuth2Provider) GetAuthenticationFlow() string { - if o == nil || o.AuthenticationFlow.Get() == nil { + if o == nil || IsNil(o.AuthenticationFlow.Get()) { var ret string return ret } @@ -202,7 +202,7 @@ func (o *OAuth2Provider) SetAuthorizationFlow(v string) { // GetPropertyMappings returns the PropertyMappings field value if set, zero value otherwise. func (o *OAuth2Provider) GetPropertyMappings() []string { - if o == nil || o.PropertyMappings == nil { + if o == nil || IsNil(o.PropertyMappings) { var ret []string return ret } @@ -212,7 +212,7 @@ func (o *OAuth2Provider) GetPropertyMappings() []string { // GetPropertyMappingsOk returns a tuple with the PropertyMappings field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *OAuth2Provider) GetPropertyMappingsOk() ([]string, bool) { - if o == nil || o.PropertyMappings == nil { + if o == nil || IsNil(o.PropertyMappings) { return nil, false } return o.PropertyMappings, true @@ -220,7 +220,7 @@ func (o *OAuth2Provider) GetPropertyMappingsOk() ([]string, bool) { // HasPropertyMappings returns a boolean if a field has been set. func (o *OAuth2Provider) HasPropertyMappings() bool { - if o != nil && o.PropertyMappings != nil { + if o != nil && !IsNil(o.PropertyMappings) { return true } @@ -376,52 +376,41 @@ func (o *OAuth2Provider) SetMetaModelName(v string) { o.MetaModelName = v } -// GetClientType returns the ClientType field value if set, zero value otherwise (both if not set or set to explicit null). +// GetClientType returns the ClientType field value if set, zero value otherwise. func (o *OAuth2Provider) GetClientType() ClientTypeEnum { - if o == nil || o.ClientType.Get() == nil { + if o == nil || IsNil(o.ClientType) { var ret ClientTypeEnum return ret } - return *o.ClientType.Get() + return *o.ClientType } // GetClientTypeOk returns a tuple with the ClientType field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *OAuth2Provider) GetClientTypeOk() (*ClientTypeEnum, bool) { - if o == nil { + if o == nil || IsNil(o.ClientType) { return nil, false } - return o.ClientType.Get(), o.ClientType.IsSet() + return o.ClientType, true } // HasClientType returns a boolean if a field has been set. func (o *OAuth2Provider) HasClientType() bool { - if o != nil && o.ClientType.IsSet() { + if o != nil && !IsNil(o.ClientType) { return true } return false } -// SetClientType gets a reference to the given NullableClientTypeEnum and assigns it to the ClientType field. +// SetClientType gets a reference to the given ClientTypeEnum and assigns it to the ClientType field. func (o *OAuth2Provider) SetClientType(v ClientTypeEnum) { - o.ClientType.Set(&v) -} - -// SetClientTypeNil sets the value for ClientType to be an explicit nil -func (o *OAuth2Provider) SetClientTypeNil() { - o.ClientType.Set(nil) -} - -// UnsetClientType ensures that no value is present for ClientType, not even an explicit nil -func (o *OAuth2Provider) UnsetClientType() { - o.ClientType.Unset() + o.ClientType = &v } // GetClientId returns the ClientId field value if set, zero value otherwise. func (o *OAuth2Provider) GetClientId() string { - if o == nil || o.ClientId == nil { + if o == nil || IsNil(o.ClientId) { var ret string return ret } @@ -431,7 +420,7 @@ func (o *OAuth2Provider) GetClientId() string { // GetClientIdOk returns a tuple with the ClientId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *OAuth2Provider) GetClientIdOk() (*string, bool) { - if o == nil || o.ClientId == nil { + if o == nil || IsNil(o.ClientId) { return nil, false } return o.ClientId, true @@ -439,7 +428,7 @@ func (o *OAuth2Provider) GetClientIdOk() (*string, bool) { // HasClientId returns a boolean if a field has been set. func (o *OAuth2Provider) HasClientId() bool { - if o != nil && o.ClientId != nil { + if o != nil && !IsNil(o.ClientId) { return true } @@ -453,7 +442,7 @@ func (o *OAuth2Provider) SetClientId(v string) { // GetClientSecret returns the ClientSecret field value if set, zero value otherwise. func (o *OAuth2Provider) GetClientSecret() string { - if o == nil || o.ClientSecret == nil { + if o == nil || IsNil(o.ClientSecret) { var ret string return ret } @@ -463,7 +452,7 @@ func (o *OAuth2Provider) GetClientSecret() string { // GetClientSecretOk returns a tuple with the ClientSecret field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *OAuth2Provider) GetClientSecretOk() (*string, bool) { - if o == nil || o.ClientSecret == nil { + if o == nil || IsNil(o.ClientSecret) { return nil, false } return o.ClientSecret, true @@ -471,7 +460,7 @@ func (o *OAuth2Provider) GetClientSecretOk() (*string, bool) { // HasClientSecret returns a boolean if a field has been set. func (o *OAuth2Provider) HasClientSecret() bool { - if o != nil && o.ClientSecret != nil { + if o != nil && !IsNil(o.ClientSecret) { return true } @@ -485,7 +474,7 @@ func (o *OAuth2Provider) SetClientSecret(v string) { // GetAccessCodeValidity returns the AccessCodeValidity field value if set, zero value otherwise. func (o *OAuth2Provider) GetAccessCodeValidity() string { - if o == nil || o.AccessCodeValidity == nil { + if o == nil || IsNil(o.AccessCodeValidity) { var ret string return ret } @@ -495,7 +484,7 @@ func (o *OAuth2Provider) GetAccessCodeValidity() string { // GetAccessCodeValidityOk returns a tuple with the AccessCodeValidity field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *OAuth2Provider) GetAccessCodeValidityOk() (*string, bool) { - if o == nil || o.AccessCodeValidity == nil { + if o == nil || IsNil(o.AccessCodeValidity) { return nil, false } return o.AccessCodeValidity, true @@ -503,7 +492,7 @@ func (o *OAuth2Provider) GetAccessCodeValidityOk() (*string, bool) { // HasAccessCodeValidity returns a boolean if a field has been set. func (o *OAuth2Provider) HasAccessCodeValidity() bool { - if o != nil && o.AccessCodeValidity != nil { + if o != nil && !IsNil(o.AccessCodeValidity) { return true } @@ -517,7 +506,7 @@ func (o *OAuth2Provider) SetAccessCodeValidity(v string) { // GetAccessTokenValidity returns the AccessTokenValidity field value if set, zero value otherwise. func (o *OAuth2Provider) GetAccessTokenValidity() string { - if o == nil || o.AccessTokenValidity == nil { + if o == nil || IsNil(o.AccessTokenValidity) { var ret string return ret } @@ -527,7 +516,7 @@ func (o *OAuth2Provider) GetAccessTokenValidity() string { // GetAccessTokenValidityOk returns a tuple with the AccessTokenValidity field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *OAuth2Provider) GetAccessTokenValidityOk() (*string, bool) { - if o == nil || o.AccessTokenValidity == nil { + if o == nil || IsNil(o.AccessTokenValidity) { return nil, false } return o.AccessTokenValidity, true @@ -535,7 +524,7 @@ func (o *OAuth2Provider) GetAccessTokenValidityOk() (*string, bool) { // HasAccessTokenValidity returns a boolean if a field has been set. func (o *OAuth2Provider) HasAccessTokenValidity() bool { - if o != nil && o.AccessTokenValidity != nil { + if o != nil && !IsNil(o.AccessTokenValidity) { return true } @@ -549,7 +538,7 @@ func (o *OAuth2Provider) SetAccessTokenValidity(v string) { // GetRefreshTokenValidity returns the RefreshTokenValidity field value if set, zero value otherwise. func (o *OAuth2Provider) GetRefreshTokenValidity() string { - if o == nil || o.RefreshTokenValidity == nil { + if o == nil || IsNil(o.RefreshTokenValidity) { var ret string return ret } @@ -559,7 +548,7 @@ func (o *OAuth2Provider) GetRefreshTokenValidity() string { // GetRefreshTokenValidityOk returns a tuple with the RefreshTokenValidity field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *OAuth2Provider) GetRefreshTokenValidityOk() (*string, bool) { - if o == nil || o.RefreshTokenValidity == nil { + if o == nil || IsNil(o.RefreshTokenValidity) { return nil, false } return o.RefreshTokenValidity, true @@ -567,7 +556,7 @@ func (o *OAuth2Provider) GetRefreshTokenValidityOk() (*string, bool) { // HasRefreshTokenValidity returns a boolean if a field has been set. func (o *OAuth2Provider) HasRefreshTokenValidity() bool { - if o != nil && o.RefreshTokenValidity != nil { + if o != nil && !IsNil(o.RefreshTokenValidity) { return true } @@ -581,7 +570,7 @@ func (o *OAuth2Provider) SetRefreshTokenValidity(v string) { // GetIncludeClaimsInIdToken returns the IncludeClaimsInIdToken field value if set, zero value otherwise. func (o *OAuth2Provider) GetIncludeClaimsInIdToken() bool { - if o == nil || o.IncludeClaimsInIdToken == nil { + if o == nil || IsNil(o.IncludeClaimsInIdToken) { var ret bool return ret } @@ -591,7 +580,7 @@ func (o *OAuth2Provider) GetIncludeClaimsInIdToken() bool { // GetIncludeClaimsInIdTokenOk returns a tuple with the IncludeClaimsInIdToken field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *OAuth2Provider) GetIncludeClaimsInIdTokenOk() (*bool, bool) { - if o == nil || o.IncludeClaimsInIdToken == nil { + if o == nil || IsNil(o.IncludeClaimsInIdToken) { return nil, false } return o.IncludeClaimsInIdToken, true @@ -599,7 +588,7 @@ func (o *OAuth2Provider) GetIncludeClaimsInIdTokenOk() (*bool, bool) { // HasIncludeClaimsInIdToken returns a boolean if a field has been set. func (o *OAuth2Provider) HasIncludeClaimsInIdToken() bool { - if o != nil && o.IncludeClaimsInIdToken != nil { + if o != nil && !IsNil(o.IncludeClaimsInIdToken) { return true } @@ -613,7 +602,7 @@ func (o *OAuth2Provider) SetIncludeClaimsInIdToken(v bool) { // GetSigningKey returns the SigningKey field value if set, zero value otherwise (both if not set or set to explicit null). func (o *OAuth2Provider) GetSigningKey() string { - if o == nil || o.SigningKey.Get() == nil { + if o == nil || IsNil(o.SigningKey.Get()) { var ret string return ret } @@ -656,7 +645,7 @@ func (o *OAuth2Provider) UnsetSigningKey() { // GetRedirectUris returns the RedirectUris field value if set, zero value otherwise. func (o *OAuth2Provider) GetRedirectUris() string { - if o == nil || o.RedirectUris == nil { + if o == nil || IsNil(o.RedirectUris) { var ret string return ret } @@ -666,7 +655,7 @@ func (o *OAuth2Provider) GetRedirectUris() string { // GetRedirectUrisOk returns a tuple with the RedirectUris field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *OAuth2Provider) GetRedirectUrisOk() (*string, bool) { - if o == nil || o.RedirectUris == nil { + if o == nil || IsNil(o.RedirectUris) { return nil, false } return o.RedirectUris, true @@ -674,7 +663,7 @@ func (o *OAuth2Provider) GetRedirectUrisOk() (*string, bool) { // HasRedirectUris returns a boolean if a field has been set. func (o *OAuth2Provider) HasRedirectUris() bool { - if o != nil && o.RedirectUris != nil { + if o != nil && !IsNil(o.RedirectUris) { return true } @@ -686,95 +675,73 @@ func (o *OAuth2Provider) SetRedirectUris(v string) { o.RedirectUris = &v } -// GetSubMode returns the SubMode field value if set, zero value otherwise (both if not set or set to explicit null). +// GetSubMode returns the SubMode field value if set, zero value otherwise. func (o *OAuth2Provider) GetSubMode() SubModeEnum { - if o == nil || o.SubMode.Get() == nil { + if o == nil || IsNil(o.SubMode) { var ret SubModeEnum return ret } - return *o.SubMode.Get() + return *o.SubMode } // GetSubModeOk returns a tuple with the SubMode field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *OAuth2Provider) GetSubModeOk() (*SubModeEnum, bool) { - if o == nil { + if o == nil || IsNil(o.SubMode) { return nil, false } - return o.SubMode.Get(), o.SubMode.IsSet() + return o.SubMode, true } // HasSubMode returns a boolean if a field has been set. func (o *OAuth2Provider) HasSubMode() bool { - if o != nil && o.SubMode.IsSet() { + if o != nil && !IsNil(o.SubMode) { return true } return false } -// SetSubMode gets a reference to the given NullableSubModeEnum and assigns it to the SubMode field. +// SetSubMode gets a reference to the given SubModeEnum and assigns it to the SubMode field. func (o *OAuth2Provider) SetSubMode(v SubModeEnum) { - o.SubMode.Set(&v) + o.SubMode = &v } -// SetSubModeNil sets the value for SubMode to be an explicit nil -func (o *OAuth2Provider) SetSubModeNil() { - o.SubMode.Set(nil) -} - -// UnsetSubMode ensures that no value is present for SubMode, not even an explicit nil -func (o *OAuth2Provider) UnsetSubMode() { - o.SubMode.Unset() -} - -// GetIssuerMode returns the IssuerMode field value if set, zero value otherwise (both if not set or set to explicit null). +// GetIssuerMode returns the IssuerMode field value if set, zero value otherwise. func (o *OAuth2Provider) GetIssuerMode() IssuerModeEnum { - if o == nil || o.IssuerMode.Get() == nil { + if o == nil || IsNil(o.IssuerMode) { var ret IssuerModeEnum return ret } - return *o.IssuerMode.Get() + return *o.IssuerMode } // GetIssuerModeOk returns a tuple with the IssuerMode field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *OAuth2Provider) GetIssuerModeOk() (*IssuerModeEnum, bool) { - if o == nil { + if o == nil || IsNil(o.IssuerMode) { return nil, false } - return o.IssuerMode.Get(), o.IssuerMode.IsSet() + return o.IssuerMode, true } // HasIssuerMode returns a boolean if a field has been set. func (o *OAuth2Provider) HasIssuerMode() bool { - if o != nil && o.IssuerMode.IsSet() { + if o != nil && !IsNil(o.IssuerMode) { return true } return false } -// SetIssuerMode gets a reference to the given NullableIssuerModeEnum and assigns it to the IssuerMode field. +// SetIssuerMode gets a reference to the given IssuerModeEnum and assigns it to the IssuerMode field. func (o *OAuth2Provider) SetIssuerMode(v IssuerModeEnum) { - o.IssuerMode.Set(&v) -} - -// SetIssuerModeNil sets the value for IssuerMode to be an explicit nil -func (o *OAuth2Provider) SetIssuerModeNil() { - o.IssuerMode.Set(nil) -} - -// UnsetIssuerMode ensures that no value is present for IssuerMode, not even an explicit nil -func (o *OAuth2Provider) UnsetIssuerMode() { - o.IssuerMode.Unset() + o.IssuerMode = &v } // GetJwksSources returns the JwksSources field value if set, zero value otherwise. func (o *OAuth2Provider) GetJwksSources() []string { - if o == nil || o.JwksSources == nil { + if o == nil || IsNil(o.JwksSources) { var ret []string return ret } @@ -784,7 +751,7 @@ func (o *OAuth2Provider) GetJwksSources() []string { // GetJwksSourcesOk returns a tuple with the JwksSources field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *OAuth2Provider) GetJwksSourcesOk() ([]string, bool) { - if o == nil || o.JwksSources == nil { + if o == nil || IsNil(o.JwksSources) { return nil, false } return o.JwksSources, true @@ -792,7 +759,7 @@ func (o *OAuth2Provider) GetJwksSourcesOk() ([]string, bool) { // HasJwksSources returns a boolean if a field has been set. func (o *OAuth2Provider) HasJwksSources() bool { - if o != nil && o.JwksSources != nil { + if o != nil && !IsNil(o.JwksSources) { return true } @@ -805,77 +772,67 @@ func (o *OAuth2Provider) SetJwksSources(v []string) { } func (o OAuth2Provider) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } + return json.Marshal(toSerialize) +} + +func (o OAuth2Provider) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name if o.AuthenticationFlow.IsSet() { toSerialize["authentication_flow"] = o.AuthenticationFlow.Get() } - if true { - toSerialize["authorization_flow"] = o.AuthorizationFlow - } - if o.PropertyMappings != nil { + toSerialize["authorization_flow"] = o.AuthorizationFlow + if !IsNil(o.PropertyMappings) { toSerialize["property_mappings"] = o.PropertyMappings } - if true { - toSerialize["component"] = o.Component - } - if true { - toSerialize["assigned_application_slug"] = o.AssignedApplicationSlug - } - if true { - toSerialize["assigned_application_name"] = o.AssignedApplicationName - } - if true { - toSerialize["verbose_name"] = o.VerboseName + // skip: component is readOnly + // skip: assigned_application_slug is readOnly + // skip: assigned_application_name is readOnly + // skip: verbose_name is readOnly + // skip: verbose_name_plural is readOnly + // skip: meta_model_name is readOnly + if !IsNil(o.ClientType) { + toSerialize["client_type"] = o.ClientType } - if true { - toSerialize["verbose_name_plural"] = o.VerboseNamePlural - } - if true { - toSerialize["meta_model_name"] = o.MetaModelName - } - if o.ClientType.IsSet() { - toSerialize["client_type"] = o.ClientType.Get() - } - if o.ClientId != nil { + if !IsNil(o.ClientId) { toSerialize["client_id"] = o.ClientId } - if o.ClientSecret != nil { + if !IsNil(o.ClientSecret) { toSerialize["client_secret"] = o.ClientSecret } - if o.AccessCodeValidity != nil { + if !IsNil(o.AccessCodeValidity) { toSerialize["access_code_validity"] = o.AccessCodeValidity } - if o.AccessTokenValidity != nil { + if !IsNil(o.AccessTokenValidity) { toSerialize["access_token_validity"] = o.AccessTokenValidity } - if o.RefreshTokenValidity != nil { + if !IsNil(o.RefreshTokenValidity) { toSerialize["refresh_token_validity"] = o.RefreshTokenValidity } - if o.IncludeClaimsInIdToken != nil { + if !IsNil(o.IncludeClaimsInIdToken) { toSerialize["include_claims_in_id_token"] = o.IncludeClaimsInIdToken } if o.SigningKey.IsSet() { toSerialize["signing_key"] = o.SigningKey.Get() } - if o.RedirectUris != nil { + if !IsNil(o.RedirectUris) { toSerialize["redirect_uris"] = o.RedirectUris } - if o.SubMode.IsSet() { - toSerialize["sub_mode"] = o.SubMode.Get() + if !IsNil(o.SubMode) { + toSerialize["sub_mode"] = o.SubMode } - if o.IssuerMode.IsSet() { - toSerialize["issuer_mode"] = o.IssuerMode.Get() + if !IsNil(o.IssuerMode) { + toSerialize["issuer_mode"] = o.IssuerMode } - if o.JwksSources != nil { + if !IsNil(o.JwksSources) { toSerialize["jwks_sources"] = o.JwksSources } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableOAuth2Provider struct { diff --git a/model_o_auth2_provider_request.go b/model_o_auth2_provider_request.go index 02ec61cc5..b471097ff 100644 --- a/model_o_auth2_provider_request.go +++ b/model_o_auth2_provider_request.go @@ -15,18 +15,20 @@ import ( "encoding/json" ) +// checks if the OAuth2ProviderRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OAuth2ProviderRequest{} + // OAuth2ProviderRequest OAuth2Provider Serializer type OAuth2ProviderRequest struct { Name string `json:"name"` // Flow used for authentication when the associated application is accessed by an un-authenticated user. AuthenticationFlow NullableString `json:"authentication_flow,omitempty"` // Flow used when authorizing this provider. - AuthorizationFlow string `json:"authorization_flow"` - PropertyMappings []string `json:"property_mappings,omitempty"` - // Confidential clients are capable of maintaining the confidentiality of their credentials. Public clients are incapable * `confidential` - Confidential * `public` - Public - ClientType NullableClientTypeEnum `json:"client_type,omitempty"` - ClientId *string `json:"client_id,omitempty"` - ClientSecret *string `json:"client_secret,omitempty"` + AuthorizationFlow string `json:"authorization_flow"` + PropertyMappings []string `json:"property_mappings,omitempty"` + ClientType *ClientTypeEnum `json:"client_type,omitempty"` + ClientId *string `json:"client_id,omitempty"` + ClientSecret *string `json:"client_secret,omitempty"` // Access codes not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). AccessCodeValidity *string `json:"access_code_validity,omitempty"` // Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). @@ -38,12 +40,10 @@ type OAuth2ProviderRequest struct { // Key used to sign the tokens. Only required when JWT Algorithm is set to RS256. SigningKey NullableString `json:"signing_key,omitempty"` // Enter each URI on a new line. - RedirectUris *string `json:"redirect_uris,omitempty"` - // Configure what data should be used as unique User Identifier. For most cases, the default should be fine. * `hashed_user_id` - Based on the Hashed User ID * `user_id` - Based on user ID * `user_username` - Based on the username * `user_email` - Based on the User's Email. This is recommended over the UPN method. * `user_upn` - Based on the User's UPN, only works if user has a 'upn' attribute set. Use this method only if you have different UPN and Mail domains. - SubMode NullableSubModeEnum `json:"sub_mode,omitempty"` - // Configure how the issuer field of the ID Token should be filled. * `global` - Same identifier is used for all providers * `per_provider` - Each provider has a different issuer, based on the application slug. - IssuerMode NullableIssuerModeEnum `json:"issuer_mode,omitempty"` - JwksSources []string `json:"jwks_sources,omitempty"` + RedirectUris *string `json:"redirect_uris,omitempty"` + SubMode *SubModeEnum `json:"sub_mode,omitempty"` + IssuerMode *IssuerModeEnum `json:"issuer_mode,omitempty"` + JwksSources []string `json:"jwks_sources,omitempty"` } // NewOAuth2ProviderRequest instantiates a new OAuth2ProviderRequest object @@ -91,7 +91,7 @@ func (o *OAuth2ProviderRequest) SetName(v string) { // GetAuthenticationFlow returns the AuthenticationFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *OAuth2ProviderRequest) GetAuthenticationFlow() string { - if o == nil || o.AuthenticationFlow.Get() == nil { + if o == nil || IsNil(o.AuthenticationFlow.Get()) { var ret string return ret } @@ -158,7 +158,7 @@ func (o *OAuth2ProviderRequest) SetAuthorizationFlow(v string) { // GetPropertyMappings returns the PropertyMappings field value if set, zero value otherwise. func (o *OAuth2ProviderRequest) GetPropertyMappings() []string { - if o == nil || o.PropertyMappings == nil { + if o == nil || IsNil(o.PropertyMappings) { var ret []string return ret } @@ -168,7 +168,7 @@ func (o *OAuth2ProviderRequest) GetPropertyMappings() []string { // GetPropertyMappingsOk returns a tuple with the PropertyMappings field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *OAuth2ProviderRequest) GetPropertyMappingsOk() ([]string, bool) { - if o == nil || o.PropertyMappings == nil { + if o == nil || IsNil(o.PropertyMappings) { return nil, false } return o.PropertyMappings, true @@ -176,7 +176,7 @@ func (o *OAuth2ProviderRequest) GetPropertyMappingsOk() ([]string, bool) { // HasPropertyMappings returns a boolean if a field has been set. func (o *OAuth2ProviderRequest) HasPropertyMappings() bool { - if o != nil && o.PropertyMappings != nil { + if o != nil && !IsNil(o.PropertyMappings) { return true } @@ -188,52 +188,41 @@ func (o *OAuth2ProviderRequest) SetPropertyMappings(v []string) { o.PropertyMappings = v } -// GetClientType returns the ClientType field value if set, zero value otherwise (both if not set or set to explicit null). +// GetClientType returns the ClientType field value if set, zero value otherwise. func (o *OAuth2ProviderRequest) GetClientType() ClientTypeEnum { - if o == nil || o.ClientType.Get() == nil { + if o == nil || IsNil(o.ClientType) { var ret ClientTypeEnum return ret } - return *o.ClientType.Get() + return *o.ClientType } // GetClientTypeOk returns a tuple with the ClientType field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *OAuth2ProviderRequest) GetClientTypeOk() (*ClientTypeEnum, bool) { - if o == nil { + if o == nil || IsNil(o.ClientType) { return nil, false } - return o.ClientType.Get(), o.ClientType.IsSet() + return o.ClientType, true } // HasClientType returns a boolean if a field has been set. func (o *OAuth2ProviderRequest) HasClientType() bool { - if o != nil && o.ClientType.IsSet() { + if o != nil && !IsNil(o.ClientType) { return true } return false } -// SetClientType gets a reference to the given NullableClientTypeEnum and assigns it to the ClientType field. +// SetClientType gets a reference to the given ClientTypeEnum and assigns it to the ClientType field. func (o *OAuth2ProviderRequest) SetClientType(v ClientTypeEnum) { - o.ClientType.Set(&v) -} - -// SetClientTypeNil sets the value for ClientType to be an explicit nil -func (o *OAuth2ProviderRequest) SetClientTypeNil() { - o.ClientType.Set(nil) -} - -// UnsetClientType ensures that no value is present for ClientType, not even an explicit nil -func (o *OAuth2ProviderRequest) UnsetClientType() { - o.ClientType.Unset() + o.ClientType = &v } // GetClientId returns the ClientId field value if set, zero value otherwise. func (o *OAuth2ProviderRequest) GetClientId() string { - if o == nil || o.ClientId == nil { + if o == nil || IsNil(o.ClientId) { var ret string return ret } @@ -243,7 +232,7 @@ func (o *OAuth2ProviderRequest) GetClientId() string { // GetClientIdOk returns a tuple with the ClientId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *OAuth2ProviderRequest) GetClientIdOk() (*string, bool) { - if o == nil || o.ClientId == nil { + if o == nil || IsNil(o.ClientId) { return nil, false } return o.ClientId, true @@ -251,7 +240,7 @@ func (o *OAuth2ProviderRequest) GetClientIdOk() (*string, bool) { // HasClientId returns a boolean if a field has been set. func (o *OAuth2ProviderRequest) HasClientId() bool { - if o != nil && o.ClientId != nil { + if o != nil && !IsNil(o.ClientId) { return true } @@ -265,7 +254,7 @@ func (o *OAuth2ProviderRequest) SetClientId(v string) { // GetClientSecret returns the ClientSecret field value if set, zero value otherwise. func (o *OAuth2ProviderRequest) GetClientSecret() string { - if o == nil || o.ClientSecret == nil { + if o == nil || IsNil(o.ClientSecret) { var ret string return ret } @@ -275,7 +264,7 @@ func (o *OAuth2ProviderRequest) GetClientSecret() string { // GetClientSecretOk returns a tuple with the ClientSecret field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *OAuth2ProviderRequest) GetClientSecretOk() (*string, bool) { - if o == nil || o.ClientSecret == nil { + if o == nil || IsNil(o.ClientSecret) { return nil, false } return o.ClientSecret, true @@ -283,7 +272,7 @@ func (o *OAuth2ProviderRequest) GetClientSecretOk() (*string, bool) { // HasClientSecret returns a boolean if a field has been set. func (o *OAuth2ProviderRequest) HasClientSecret() bool { - if o != nil && o.ClientSecret != nil { + if o != nil && !IsNil(o.ClientSecret) { return true } @@ -297,7 +286,7 @@ func (o *OAuth2ProviderRequest) SetClientSecret(v string) { // GetAccessCodeValidity returns the AccessCodeValidity field value if set, zero value otherwise. func (o *OAuth2ProviderRequest) GetAccessCodeValidity() string { - if o == nil || o.AccessCodeValidity == nil { + if o == nil || IsNil(o.AccessCodeValidity) { var ret string return ret } @@ -307,7 +296,7 @@ func (o *OAuth2ProviderRequest) GetAccessCodeValidity() string { // GetAccessCodeValidityOk returns a tuple with the AccessCodeValidity field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *OAuth2ProviderRequest) GetAccessCodeValidityOk() (*string, bool) { - if o == nil || o.AccessCodeValidity == nil { + if o == nil || IsNil(o.AccessCodeValidity) { return nil, false } return o.AccessCodeValidity, true @@ -315,7 +304,7 @@ func (o *OAuth2ProviderRequest) GetAccessCodeValidityOk() (*string, bool) { // HasAccessCodeValidity returns a boolean if a field has been set. func (o *OAuth2ProviderRequest) HasAccessCodeValidity() bool { - if o != nil && o.AccessCodeValidity != nil { + if o != nil && !IsNil(o.AccessCodeValidity) { return true } @@ -329,7 +318,7 @@ func (o *OAuth2ProviderRequest) SetAccessCodeValidity(v string) { // GetAccessTokenValidity returns the AccessTokenValidity field value if set, zero value otherwise. func (o *OAuth2ProviderRequest) GetAccessTokenValidity() string { - if o == nil || o.AccessTokenValidity == nil { + if o == nil || IsNil(o.AccessTokenValidity) { var ret string return ret } @@ -339,7 +328,7 @@ func (o *OAuth2ProviderRequest) GetAccessTokenValidity() string { // GetAccessTokenValidityOk returns a tuple with the AccessTokenValidity field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *OAuth2ProviderRequest) GetAccessTokenValidityOk() (*string, bool) { - if o == nil || o.AccessTokenValidity == nil { + if o == nil || IsNil(o.AccessTokenValidity) { return nil, false } return o.AccessTokenValidity, true @@ -347,7 +336,7 @@ func (o *OAuth2ProviderRequest) GetAccessTokenValidityOk() (*string, bool) { // HasAccessTokenValidity returns a boolean if a field has been set. func (o *OAuth2ProviderRequest) HasAccessTokenValidity() bool { - if o != nil && o.AccessTokenValidity != nil { + if o != nil && !IsNil(o.AccessTokenValidity) { return true } @@ -361,7 +350,7 @@ func (o *OAuth2ProviderRequest) SetAccessTokenValidity(v string) { // GetRefreshTokenValidity returns the RefreshTokenValidity field value if set, zero value otherwise. func (o *OAuth2ProviderRequest) GetRefreshTokenValidity() string { - if o == nil || o.RefreshTokenValidity == nil { + if o == nil || IsNil(o.RefreshTokenValidity) { var ret string return ret } @@ -371,7 +360,7 @@ func (o *OAuth2ProviderRequest) GetRefreshTokenValidity() string { // GetRefreshTokenValidityOk returns a tuple with the RefreshTokenValidity field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *OAuth2ProviderRequest) GetRefreshTokenValidityOk() (*string, bool) { - if o == nil || o.RefreshTokenValidity == nil { + if o == nil || IsNil(o.RefreshTokenValidity) { return nil, false } return o.RefreshTokenValidity, true @@ -379,7 +368,7 @@ func (o *OAuth2ProviderRequest) GetRefreshTokenValidityOk() (*string, bool) { // HasRefreshTokenValidity returns a boolean if a field has been set. func (o *OAuth2ProviderRequest) HasRefreshTokenValidity() bool { - if o != nil && o.RefreshTokenValidity != nil { + if o != nil && !IsNil(o.RefreshTokenValidity) { return true } @@ -393,7 +382,7 @@ func (o *OAuth2ProviderRequest) SetRefreshTokenValidity(v string) { // GetIncludeClaimsInIdToken returns the IncludeClaimsInIdToken field value if set, zero value otherwise. func (o *OAuth2ProviderRequest) GetIncludeClaimsInIdToken() bool { - if o == nil || o.IncludeClaimsInIdToken == nil { + if o == nil || IsNil(o.IncludeClaimsInIdToken) { var ret bool return ret } @@ -403,7 +392,7 @@ func (o *OAuth2ProviderRequest) GetIncludeClaimsInIdToken() bool { // GetIncludeClaimsInIdTokenOk returns a tuple with the IncludeClaimsInIdToken field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *OAuth2ProviderRequest) GetIncludeClaimsInIdTokenOk() (*bool, bool) { - if o == nil || o.IncludeClaimsInIdToken == nil { + if o == nil || IsNil(o.IncludeClaimsInIdToken) { return nil, false } return o.IncludeClaimsInIdToken, true @@ -411,7 +400,7 @@ func (o *OAuth2ProviderRequest) GetIncludeClaimsInIdTokenOk() (*bool, bool) { // HasIncludeClaimsInIdToken returns a boolean if a field has been set. func (o *OAuth2ProviderRequest) HasIncludeClaimsInIdToken() bool { - if o != nil && o.IncludeClaimsInIdToken != nil { + if o != nil && !IsNil(o.IncludeClaimsInIdToken) { return true } @@ -425,7 +414,7 @@ func (o *OAuth2ProviderRequest) SetIncludeClaimsInIdToken(v bool) { // GetSigningKey returns the SigningKey field value if set, zero value otherwise (both if not set or set to explicit null). func (o *OAuth2ProviderRequest) GetSigningKey() string { - if o == nil || o.SigningKey.Get() == nil { + if o == nil || IsNil(o.SigningKey.Get()) { var ret string return ret } @@ -468,7 +457,7 @@ func (o *OAuth2ProviderRequest) UnsetSigningKey() { // GetRedirectUris returns the RedirectUris field value if set, zero value otherwise. func (o *OAuth2ProviderRequest) GetRedirectUris() string { - if o == nil || o.RedirectUris == nil { + if o == nil || IsNil(o.RedirectUris) { var ret string return ret } @@ -478,7 +467,7 @@ func (o *OAuth2ProviderRequest) GetRedirectUris() string { // GetRedirectUrisOk returns a tuple with the RedirectUris field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *OAuth2ProviderRequest) GetRedirectUrisOk() (*string, bool) { - if o == nil || o.RedirectUris == nil { + if o == nil || IsNil(o.RedirectUris) { return nil, false } return o.RedirectUris, true @@ -486,7 +475,7 @@ func (o *OAuth2ProviderRequest) GetRedirectUrisOk() (*string, bool) { // HasRedirectUris returns a boolean if a field has been set. func (o *OAuth2ProviderRequest) HasRedirectUris() bool { - if o != nil && o.RedirectUris != nil { + if o != nil && !IsNil(o.RedirectUris) { return true } @@ -498,95 +487,73 @@ func (o *OAuth2ProviderRequest) SetRedirectUris(v string) { o.RedirectUris = &v } -// GetSubMode returns the SubMode field value if set, zero value otherwise (both if not set or set to explicit null). +// GetSubMode returns the SubMode field value if set, zero value otherwise. func (o *OAuth2ProviderRequest) GetSubMode() SubModeEnum { - if o == nil || o.SubMode.Get() == nil { + if o == nil || IsNil(o.SubMode) { var ret SubModeEnum return ret } - return *o.SubMode.Get() + return *o.SubMode } // GetSubModeOk returns a tuple with the SubMode field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *OAuth2ProviderRequest) GetSubModeOk() (*SubModeEnum, bool) { - if o == nil { + if o == nil || IsNil(o.SubMode) { return nil, false } - return o.SubMode.Get(), o.SubMode.IsSet() + return o.SubMode, true } // HasSubMode returns a boolean if a field has been set. func (o *OAuth2ProviderRequest) HasSubMode() bool { - if o != nil && o.SubMode.IsSet() { + if o != nil && !IsNil(o.SubMode) { return true } return false } -// SetSubMode gets a reference to the given NullableSubModeEnum and assigns it to the SubMode field. +// SetSubMode gets a reference to the given SubModeEnum and assigns it to the SubMode field. func (o *OAuth2ProviderRequest) SetSubMode(v SubModeEnum) { - o.SubMode.Set(&v) -} - -// SetSubModeNil sets the value for SubMode to be an explicit nil -func (o *OAuth2ProviderRequest) SetSubModeNil() { - o.SubMode.Set(nil) -} - -// UnsetSubMode ensures that no value is present for SubMode, not even an explicit nil -func (o *OAuth2ProviderRequest) UnsetSubMode() { - o.SubMode.Unset() + o.SubMode = &v } -// GetIssuerMode returns the IssuerMode field value if set, zero value otherwise (both if not set or set to explicit null). +// GetIssuerMode returns the IssuerMode field value if set, zero value otherwise. func (o *OAuth2ProviderRequest) GetIssuerMode() IssuerModeEnum { - if o == nil || o.IssuerMode.Get() == nil { + if o == nil || IsNil(o.IssuerMode) { var ret IssuerModeEnum return ret } - return *o.IssuerMode.Get() + return *o.IssuerMode } // GetIssuerModeOk returns a tuple with the IssuerMode field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *OAuth2ProviderRequest) GetIssuerModeOk() (*IssuerModeEnum, bool) { - if o == nil { + if o == nil || IsNil(o.IssuerMode) { return nil, false } - return o.IssuerMode.Get(), o.IssuerMode.IsSet() + return o.IssuerMode, true } // HasIssuerMode returns a boolean if a field has been set. func (o *OAuth2ProviderRequest) HasIssuerMode() bool { - if o != nil && o.IssuerMode.IsSet() { + if o != nil && !IsNil(o.IssuerMode) { return true } return false } -// SetIssuerMode gets a reference to the given NullableIssuerModeEnum and assigns it to the IssuerMode field. +// SetIssuerMode gets a reference to the given IssuerModeEnum and assigns it to the IssuerMode field. func (o *OAuth2ProviderRequest) SetIssuerMode(v IssuerModeEnum) { - o.IssuerMode.Set(&v) -} - -// SetIssuerModeNil sets the value for IssuerMode to be an explicit nil -func (o *OAuth2ProviderRequest) SetIssuerModeNil() { - o.IssuerMode.Set(nil) -} - -// UnsetIssuerMode ensures that no value is present for IssuerMode, not even an explicit nil -func (o *OAuth2ProviderRequest) UnsetIssuerMode() { - o.IssuerMode.Unset() + o.IssuerMode = &v } // GetJwksSources returns the JwksSources field value if set, zero value otherwise. func (o *OAuth2ProviderRequest) GetJwksSources() []string { - if o == nil || o.JwksSources == nil { + if o == nil || IsNil(o.JwksSources) { var ret []string return ret } @@ -596,7 +563,7 @@ func (o *OAuth2ProviderRequest) GetJwksSources() []string { // GetJwksSourcesOk returns a tuple with the JwksSources field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *OAuth2ProviderRequest) GetJwksSourcesOk() ([]string, bool) { - if o == nil || o.JwksSources == nil { + if o == nil || IsNil(o.JwksSources) { return nil, false } return o.JwksSources, true @@ -604,7 +571,7 @@ func (o *OAuth2ProviderRequest) GetJwksSourcesOk() ([]string, bool) { // HasJwksSources returns a boolean if a field has been set. func (o *OAuth2ProviderRequest) HasJwksSources() bool { - if o != nil && o.JwksSources != nil { + if o != nil && !IsNil(o.JwksSources) { return true } @@ -617,56 +584,60 @@ func (o *OAuth2ProviderRequest) SetJwksSources(v []string) { } func (o OAuth2ProviderRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } + return json.Marshal(toSerialize) +} + +func (o OAuth2ProviderRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name if o.AuthenticationFlow.IsSet() { toSerialize["authentication_flow"] = o.AuthenticationFlow.Get() } - if true { - toSerialize["authorization_flow"] = o.AuthorizationFlow - } - if o.PropertyMappings != nil { + toSerialize["authorization_flow"] = o.AuthorizationFlow + if !IsNil(o.PropertyMappings) { toSerialize["property_mappings"] = o.PropertyMappings } - if o.ClientType.IsSet() { - toSerialize["client_type"] = o.ClientType.Get() + if !IsNil(o.ClientType) { + toSerialize["client_type"] = o.ClientType } - if o.ClientId != nil { + if !IsNil(o.ClientId) { toSerialize["client_id"] = o.ClientId } - if o.ClientSecret != nil { + if !IsNil(o.ClientSecret) { toSerialize["client_secret"] = o.ClientSecret } - if o.AccessCodeValidity != nil { + if !IsNil(o.AccessCodeValidity) { toSerialize["access_code_validity"] = o.AccessCodeValidity } - if o.AccessTokenValidity != nil { + if !IsNil(o.AccessTokenValidity) { toSerialize["access_token_validity"] = o.AccessTokenValidity } - if o.RefreshTokenValidity != nil { + if !IsNil(o.RefreshTokenValidity) { toSerialize["refresh_token_validity"] = o.RefreshTokenValidity } - if o.IncludeClaimsInIdToken != nil { + if !IsNil(o.IncludeClaimsInIdToken) { toSerialize["include_claims_in_id_token"] = o.IncludeClaimsInIdToken } if o.SigningKey.IsSet() { toSerialize["signing_key"] = o.SigningKey.Get() } - if o.RedirectUris != nil { + if !IsNil(o.RedirectUris) { toSerialize["redirect_uris"] = o.RedirectUris } - if o.SubMode.IsSet() { - toSerialize["sub_mode"] = o.SubMode.Get() + if !IsNil(o.SubMode) { + toSerialize["sub_mode"] = o.SubMode } - if o.IssuerMode.IsSet() { - toSerialize["issuer_mode"] = o.IssuerMode.Get() + if !IsNil(o.IssuerMode) { + toSerialize["issuer_mode"] = o.IssuerMode } - if o.JwksSources != nil { + if !IsNil(o.JwksSources) { toSerialize["jwks_sources"] = o.JwksSources } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableOAuth2ProviderRequest struct { diff --git a/model_o_auth2_provider_setup_urls.go b/model_o_auth2_provider_setup_urls.go index ed6e71ed0..4379080f0 100644 --- a/model_o_auth2_provider_setup_urls.go +++ b/model_o_auth2_provider_setup_urls.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the OAuth2ProviderSetupURLs type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OAuth2ProviderSetupURLs{} + // OAuth2ProviderSetupURLs OAuth2 Provider Metadata serializer type OAuth2ProviderSetupURLs struct { Issuer string `json:"issuer"` @@ -219,31 +222,25 @@ func (o *OAuth2ProviderSetupURLs) SetJwks(v string) { } func (o OAuth2ProviderSetupURLs) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["issuer"] = o.Issuer - } - if true { - toSerialize["authorize"] = o.Authorize - } - if true { - toSerialize["token"] = o.Token - } - if true { - toSerialize["user_info"] = o.UserInfo - } - if true { - toSerialize["provider_info"] = o.ProviderInfo - } - if true { - toSerialize["logout"] = o.Logout - } - if true { - toSerialize["jwks"] = o.Jwks + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o OAuth2ProviderSetupURLs) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: issuer is readOnly + // skip: authorize is readOnly + // skip: token is readOnly + // skip: user_info is readOnly + // skip: provider_info is readOnly + // skip: logout is readOnly + // skip: jwks is readOnly + return toSerialize, nil +} + type NullableOAuth2ProviderSetupURLs struct { value *OAuth2ProviderSetupURLs isSet bool diff --git a/model_o_auth_device_code_challenge.go b/model_o_auth_device_code_challenge.go index c1f1899f4..0ee28a5fd 100644 --- a/model_o_auth_device_code_challenge.go +++ b/model_o_auth_device_code_challenge.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the OAuthDeviceCodeChallenge type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OAuthDeviceCodeChallenge{} + // OAuthDeviceCodeChallenge OAuth Device code challenge type OAuthDeviceCodeChallenge struct { Type ChallengeChoices `json:"type"` @@ -71,7 +74,7 @@ func (o *OAuthDeviceCodeChallenge) SetType(v ChallengeChoices) { // GetFlowInfo returns the FlowInfo field value if set, zero value otherwise. func (o *OAuthDeviceCodeChallenge) GetFlowInfo() ContextualFlowInfo { - if o == nil || o.FlowInfo == nil { + if o == nil || IsNil(o.FlowInfo) { var ret ContextualFlowInfo return ret } @@ -81,7 +84,7 @@ func (o *OAuthDeviceCodeChallenge) GetFlowInfo() ContextualFlowInfo { // GetFlowInfoOk returns a tuple with the FlowInfo field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *OAuthDeviceCodeChallenge) GetFlowInfoOk() (*ContextualFlowInfo, bool) { - if o == nil || o.FlowInfo == nil { + if o == nil || IsNil(o.FlowInfo) { return nil, false } return o.FlowInfo, true @@ -89,7 +92,7 @@ func (o *OAuthDeviceCodeChallenge) GetFlowInfoOk() (*ContextualFlowInfo, bool) { // HasFlowInfo returns a boolean if a field has been set. func (o *OAuthDeviceCodeChallenge) HasFlowInfo() bool { - if o != nil && o.FlowInfo != nil { + if o != nil && !IsNil(o.FlowInfo) { return true } @@ -103,7 +106,7 @@ func (o *OAuthDeviceCodeChallenge) SetFlowInfo(v ContextualFlowInfo) { // GetComponent returns the Component field value if set, zero value otherwise. func (o *OAuthDeviceCodeChallenge) GetComponent() string { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { var ret string return ret } @@ -113,7 +116,7 @@ func (o *OAuthDeviceCodeChallenge) GetComponent() string { // GetComponentOk returns a tuple with the Component field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *OAuthDeviceCodeChallenge) GetComponentOk() (*string, bool) { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { return nil, false } return o.Component, true @@ -121,7 +124,7 @@ func (o *OAuthDeviceCodeChallenge) GetComponentOk() (*string, bool) { // HasComponent returns a boolean if a field has been set. func (o *OAuthDeviceCodeChallenge) HasComponent() bool { - if o != nil && o.Component != nil { + if o != nil && !IsNil(o.Component) { return true } @@ -135,7 +138,7 @@ func (o *OAuthDeviceCodeChallenge) SetComponent(v string) { // GetResponseErrors returns the ResponseErrors field value if set, zero value otherwise. func (o *OAuthDeviceCodeChallenge) GetResponseErrors() map[string][]ErrorDetail { - if o == nil || o.ResponseErrors == nil { + if o == nil || IsNil(o.ResponseErrors) { var ret map[string][]ErrorDetail return ret } @@ -145,7 +148,7 @@ func (o *OAuthDeviceCodeChallenge) GetResponseErrors() map[string][]ErrorDetail // GetResponseErrorsOk returns a tuple with the ResponseErrors field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *OAuthDeviceCodeChallenge) GetResponseErrorsOk() (*map[string][]ErrorDetail, bool) { - if o == nil || o.ResponseErrors == nil { + if o == nil || IsNil(o.ResponseErrors) { return nil, false } return o.ResponseErrors, true @@ -153,7 +156,7 @@ func (o *OAuthDeviceCodeChallenge) GetResponseErrorsOk() (*map[string][]ErrorDet // HasResponseErrors returns a boolean if a field has been set. func (o *OAuthDeviceCodeChallenge) HasResponseErrors() bool { - if o != nil && o.ResponseErrors != nil { + if o != nil && !IsNil(o.ResponseErrors) { return true } @@ -166,20 +169,26 @@ func (o *OAuthDeviceCodeChallenge) SetResponseErrors(v map[string][]ErrorDetail) } func (o OAuthDeviceCodeChallenge) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["type"] = o.Type + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.FlowInfo != nil { + return json.Marshal(toSerialize) +} + +func (o OAuthDeviceCodeChallenge) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + if !IsNil(o.FlowInfo) { toSerialize["flow_info"] = o.FlowInfo } - if o.Component != nil { + if !IsNil(o.Component) { toSerialize["component"] = o.Component } - if o.ResponseErrors != nil { + if !IsNil(o.ResponseErrors) { toSerialize["response_errors"] = o.ResponseErrors } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableOAuthDeviceCodeChallenge struct { diff --git a/model_o_auth_device_code_challenge_response_request.go b/model_o_auth_device_code_challenge_response_request.go index e7c9957c6..e3a7773cd 100644 --- a/model_o_auth_device_code_challenge_response_request.go +++ b/model_o_auth_device_code_challenge_response_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the OAuthDeviceCodeChallengeResponseRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OAuthDeviceCodeChallengeResponseRequest{} + // OAuthDeviceCodeChallengeResponseRequest Response that includes the user-entered device code type OAuthDeviceCodeChallengeResponseRequest struct { Component *string `json:"component,omitempty"` @@ -45,7 +48,7 @@ func NewOAuthDeviceCodeChallengeResponseRequestWithDefaults() *OAuthDeviceCodeCh // GetComponent returns the Component field value if set, zero value otherwise. func (o *OAuthDeviceCodeChallengeResponseRequest) GetComponent() string { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { var ret string return ret } @@ -55,7 +58,7 @@ func (o *OAuthDeviceCodeChallengeResponseRequest) GetComponent() string { // GetComponentOk returns a tuple with the Component field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *OAuthDeviceCodeChallengeResponseRequest) GetComponentOk() (*string, bool) { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { return nil, false } return o.Component, true @@ -63,7 +66,7 @@ func (o *OAuthDeviceCodeChallengeResponseRequest) GetComponentOk() (*string, boo // HasComponent returns a boolean if a field has been set. func (o *OAuthDeviceCodeChallengeResponseRequest) HasComponent() bool { - if o != nil && o.Component != nil { + if o != nil && !IsNil(o.Component) { return true } @@ -100,14 +103,20 @@ func (o *OAuthDeviceCodeChallengeResponseRequest) SetCode(v int32) { } func (o OAuthDeviceCodeChallengeResponseRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OAuthDeviceCodeChallengeResponseRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Component != nil { + if !IsNil(o.Component) { toSerialize["component"] = o.Component } - if true { - toSerialize["code"] = o.Code - } - return json.Marshal(toSerialize) + toSerialize["code"] = o.Code + return toSerialize, nil } type NullableOAuthDeviceCodeChallengeResponseRequest struct { diff --git a/model_o_auth_device_code_finish_challenge.go b/model_o_auth_device_code_finish_challenge.go index 56a071053..23cade144 100644 --- a/model_o_auth_device_code_finish_challenge.go +++ b/model_o_auth_device_code_finish_challenge.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the OAuthDeviceCodeFinishChallenge type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OAuthDeviceCodeFinishChallenge{} + // OAuthDeviceCodeFinishChallenge Final challenge after user enters their code type OAuthDeviceCodeFinishChallenge struct { Type ChallengeChoices `json:"type"` @@ -71,7 +74,7 @@ func (o *OAuthDeviceCodeFinishChallenge) SetType(v ChallengeChoices) { // GetFlowInfo returns the FlowInfo field value if set, zero value otherwise. func (o *OAuthDeviceCodeFinishChallenge) GetFlowInfo() ContextualFlowInfo { - if o == nil || o.FlowInfo == nil { + if o == nil || IsNil(o.FlowInfo) { var ret ContextualFlowInfo return ret } @@ -81,7 +84,7 @@ func (o *OAuthDeviceCodeFinishChallenge) GetFlowInfo() ContextualFlowInfo { // GetFlowInfoOk returns a tuple with the FlowInfo field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *OAuthDeviceCodeFinishChallenge) GetFlowInfoOk() (*ContextualFlowInfo, bool) { - if o == nil || o.FlowInfo == nil { + if o == nil || IsNil(o.FlowInfo) { return nil, false } return o.FlowInfo, true @@ -89,7 +92,7 @@ func (o *OAuthDeviceCodeFinishChallenge) GetFlowInfoOk() (*ContextualFlowInfo, b // HasFlowInfo returns a boolean if a field has been set. func (o *OAuthDeviceCodeFinishChallenge) HasFlowInfo() bool { - if o != nil && o.FlowInfo != nil { + if o != nil && !IsNil(o.FlowInfo) { return true } @@ -103,7 +106,7 @@ func (o *OAuthDeviceCodeFinishChallenge) SetFlowInfo(v ContextualFlowInfo) { // GetComponent returns the Component field value if set, zero value otherwise. func (o *OAuthDeviceCodeFinishChallenge) GetComponent() string { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { var ret string return ret } @@ -113,7 +116,7 @@ func (o *OAuthDeviceCodeFinishChallenge) GetComponent() string { // GetComponentOk returns a tuple with the Component field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *OAuthDeviceCodeFinishChallenge) GetComponentOk() (*string, bool) { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { return nil, false } return o.Component, true @@ -121,7 +124,7 @@ func (o *OAuthDeviceCodeFinishChallenge) GetComponentOk() (*string, bool) { // HasComponent returns a boolean if a field has been set. func (o *OAuthDeviceCodeFinishChallenge) HasComponent() bool { - if o != nil && o.Component != nil { + if o != nil && !IsNil(o.Component) { return true } @@ -135,7 +138,7 @@ func (o *OAuthDeviceCodeFinishChallenge) SetComponent(v string) { // GetResponseErrors returns the ResponseErrors field value if set, zero value otherwise. func (o *OAuthDeviceCodeFinishChallenge) GetResponseErrors() map[string][]ErrorDetail { - if o == nil || o.ResponseErrors == nil { + if o == nil || IsNil(o.ResponseErrors) { var ret map[string][]ErrorDetail return ret } @@ -145,7 +148,7 @@ func (o *OAuthDeviceCodeFinishChallenge) GetResponseErrors() map[string][]ErrorD // GetResponseErrorsOk returns a tuple with the ResponseErrors field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *OAuthDeviceCodeFinishChallenge) GetResponseErrorsOk() (*map[string][]ErrorDetail, bool) { - if o == nil || o.ResponseErrors == nil { + if o == nil || IsNil(o.ResponseErrors) { return nil, false } return o.ResponseErrors, true @@ -153,7 +156,7 @@ func (o *OAuthDeviceCodeFinishChallenge) GetResponseErrorsOk() (*map[string][]Er // HasResponseErrors returns a boolean if a field has been set. func (o *OAuthDeviceCodeFinishChallenge) HasResponseErrors() bool { - if o != nil && o.ResponseErrors != nil { + if o != nil && !IsNil(o.ResponseErrors) { return true } @@ -166,20 +169,26 @@ func (o *OAuthDeviceCodeFinishChallenge) SetResponseErrors(v map[string][]ErrorD } func (o OAuthDeviceCodeFinishChallenge) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["type"] = o.Type + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.FlowInfo != nil { + return json.Marshal(toSerialize) +} + +func (o OAuthDeviceCodeFinishChallenge) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + if !IsNil(o.FlowInfo) { toSerialize["flow_info"] = o.FlowInfo } - if o.Component != nil { + if !IsNil(o.Component) { toSerialize["component"] = o.Component } - if o.ResponseErrors != nil { + if !IsNil(o.ResponseErrors) { toSerialize["response_errors"] = o.ResponseErrors } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableOAuthDeviceCodeFinishChallenge struct { diff --git a/model_o_auth_device_code_finish_challenge_response_request.go b/model_o_auth_device_code_finish_challenge_response_request.go index c4bce4f73..c29b2e1ec 100644 --- a/model_o_auth_device_code_finish_challenge_response_request.go +++ b/model_o_auth_device_code_finish_challenge_response_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the OAuthDeviceCodeFinishChallengeResponseRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OAuthDeviceCodeFinishChallengeResponseRequest{} + // OAuthDeviceCodeFinishChallengeResponseRequest Response that device has been authenticated and tab can be closed type OAuthDeviceCodeFinishChallengeResponseRequest struct { Component *string `json:"component,omitempty"` @@ -43,7 +46,7 @@ func NewOAuthDeviceCodeFinishChallengeResponseRequestWithDefaults() *OAuthDevice // GetComponent returns the Component field value if set, zero value otherwise. func (o *OAuthDeviceCodeFinishChallengeResponseRequest) GetComponent() string { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { var ret string return ret } @@ -53,7 +56,7 @@ func (o *OAuthDeviceCodeFinishChallengeResponseRequest) GetComponent() string { // GetComponentOk returns a tuple with the Component field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *OAuthDeviceCodeFinishChallengeResponseRequest) GetComponentOk() (*string, bool) { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { return nil, false } return o.Component, true @@ -61,7 +64,7 @@ func (o *OAuthDeviceCodeFinishChallengeResponseRequest) GetComponentOk() (*strin // HasComponent returns a boolean if a field has been set. func (o *OAuthDeviceCodeFinishChallengeResponseRequest) HasComponent() bool { - if o != nil && o.Component != nil { + if o != nil && !IsNil(o.Component) { return true } @@ -74,11 +77,19 @@ func (o *OAuthDeviceCodeFinishChallengeResponseRequest) SetComponent(v string) { } func (o OAuthDeviceCodeFinishChallengeResponseRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OAuthDeviceCodeFinishChallengeResponseRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Component != nil { + if !IsNil(o.Component) { toSerialize["component"] = o.Component } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableOAuthDeviceCodeFinishChallengeResponseRequest struct { diff --git a/model_o_auth_source.go b/model_o_auth_source.go index a2cd1e78f..ff4f5f59a 100644 --- a/model_o_auth_source.go +++ b/model_o_auth_source.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the OAuthSource type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OAuthSource{} + // OAuthSource OAuth Source Serializer type OAuthSource struct { Pk string `json:"pk"` @@ -34,10 +37,9 @@ type OAuthSource struct { // Return object's plural verbose_name VerboseNamePlural string `json:"verbose_name_plural"` // Return internal model name - MetaModelName string `json:"meta_model_name"` - PolicyEngineMode *PolicyEngineMode `json:"policy_engine_mode,omitempty"` - // How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. - UserMatchingMode NullableUserMatchingModeEnum `json:"user_matching_mode,omitempty"` + MetaModelName string `json:"meta_model_name"` + PolicyEngineMode *PolicyEngineMode `json:"policy_engine_mode,omitempty"` + UserMatchingMode *UserMatchingModeEnum `json:"user_matching_mode,omitempty"` // Objects which are managed by authentik. These objects are created and updated automatically. This is flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. Managed NullableString `json:"managed"` UserPathTemplate *string `json:"user_path_template,omitempty"` @@ -56,7 +58,7 @@ type OAuthSource struct { // Get OAuth Callback URL CallbackUrl string `json:"callback_url"` AdditionalScopes *string `json:"additional_scopes,omitempty"` - Type OAuthSourceType `json:"type"` + Type SourceType `json:"type"` OidcWellKnownUrl *string `json:"oidc_well_known_url,omitempty"` OidcJwksUrl *string `json:"oidc_jwks_url,omitempty"` OidcJwks map[string]interface{} `json:"oidc_jwks,omitempty"` @@ -66,7 +68,7 @@ type OAuthSource struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewOAuthSource(pk string, name string, slug string, component string, verboseName string, verboseNamePlural string, metaModelName string, managed NullableString, icon NullableString, providerType ProviderTypeEnum, consumerKey string, callbackUrl string, type_ OAuthSourceType) *OAuthSource { +func NewOAuthSource(pk string, name string, slug string, component string, verboseName string, verboseNamePlural string, metaModelName string, managed NullableString, icon NullableString, providerType ProviderTypeEnum, consumerKey string, callbackUrl string, type_ SourceType) *OAuthSource { this := OAuthSource{} this.Pk = pk this.Name = name @@ -166,7 +168,7 @@ func (o *OAuthSource) SetSlug(v string) { // GetEnabled returns the Enabled field value if set, zero value otherwise. func (o *OAuthSource) GetEnabled() bool { - if o == nil || o.Enabled == nil { + if o == nil || IsNil(o.Enabled) { var ret bool return ret } @@ -176,7 +178,7 @@ func (o *OAuthSource) GetEnabled() bool { // GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *OAuthSource) GetEnabledOk() (*bool, bool) { - if o == nil || o.Enabled == nil { + if o == nil || IsNil(o.Enabled) { return nil, false } return o.Enabled, true @@ -184,7 +186,7 @@ func (o *OAuthSource) GetEnabledOk() (*bool, bool) { // HasEnabled returns a boolean if a field has been set. func (o *OAuthSource) HasEnabled() bool { - if o != nil && o.Enabled != nil { + if o != nil && !IsNil(o.Enabled) { return true } @@ -198,7 +200,7 @@ func (o *OAuthSource) SetEnabled(v bool) { // GetAuthenticationFlow returns the AuthenticationFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *OAuthSource) GetAuthenticationFlow() string { - if o == nil || o.AuthenticationFlow.Get() == nil { + if o == nil || IsNil(o.AuthenticationFlow.Get()) { var ret string return ret } @@ -241,7 +243,7 @@ func (o *OAuthSource) UnsetAuthenticationFlow() { // GetEnrollmentFlow returns the EnrollmentFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *OAuthSource) GetEnrollmentFlow() string { - if o == nil || o.EnrollmentFlow.Get() == nil { + if o == nil || IsNil(o.EnrollmentFlow.Get()) { var ret string return ret } @@ -380,7 +382,7 @@ func (o *OAuthSource) SetMetaModelName(v string) { // GetPolicyEngineMode returns the PolicyEngineMode field value if set, zero value otherwise. func (o *OAuthSource) GetPolicyEngineMode() PolicyEngineMode { - if o == nil || o.PolicyEngineMode == nil { + if o == nil || IsNil(o.PolicyEngineMode) { var ret PolicyEngineMode return ret } @@ -390,7 +392,7 @@ func (o *OAuthSource) GetPolicyEngineMode() PolicyEngineMode { // GetPolicyEngineModeOk returns a tuple with the PolicyEngineMode field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *OAuthSource) GetPolicyEngineModeOk() (*PolicyEngineMode, bool) { - if o == nil || o.PolicyEngineMode == nil { + if o == nil || IsNil(o.PolicyEngineMode) { return nil, false } return o.PolicyEngineMode, true @@ -398,7 +400,7 @@ func (o *OAuthSource) GetPolicyEngineModeOk() (*PolicyEngineMode, bool) { // HasPolicyEngineMode returns a boolean if a field has been set. func (o *OAuthSource) HasPolicyEngineMode() bool { - if o != nil && o.PolicyEngineMode != nil { + if o != nil && !IsNil(o.PolicyEngineMode) { return true } @@ -410,47 +412,36 @@ func (o *OAuthSource) SetPolicyEngineMode(v PolicyEngineMode) { o.PolicyEngineMode = &v } -// GetUserMatchingMode returns the UserMatchingMode field value if set, zero value otherwise (both if not set or set to explicit null). +// GetUserMatchingMode returns the UserMatchingMode field value if set, zero value otherwise. func (o *OAuthSource) GetUserMatchingMode() UserMatchingModeEnum { - if o == nil || o.UserMatchingMode.Get() == nil { + if o == nil || IsNil(o.UserMatchingMode) { var ret UserMatchingModeEnum return ret } - return *o.UserMatchingMode.Get() + return *o.UserMatchingMode } // GetUserMatchingModeOk returns a tuple with the UserMatchingMode field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *OAuthSource) GetUserMatchingModeOk() (*UserMatchingModeEnum, bool) { - if o == nil { + if o == nil || IsNil(o.UserMatchingMode) { return nil, false } - return o.UserMatchingMode.Get(), o.UserMatchingMode.IsSet() + return o.UserMatchingMode, true } // HasUserMatchingMode returns a boolean if a field has been set. func (o *OAuthSource) HasUserMatchingMode() bool { - if o != nil && o.UserMatchingMode.IsSet() { + if o != nil && !IsNil(o.UserMatchingMode) { return true } return false } -// SetUserMatchingMode gets a reference to the given NullableUserMatchingModeEnum and assigns it to the UserMatchingMode field. +// SetUserMatchingMode gets a reference to the given UserMatchingModeEnum and assigns it to the UserMatchingMode field. func (o *OAuthSource) SetUserMatchingMode(v UserMatchingModeEnum) { - o.UserMatchingMode.Set(&v) -} - -// SetUserMatchingModeNil sets the value for UserMatchingMode to be an explicit nil -func (o *OAuthSource) SetUserMatchingModeNil() { - o.UserMatchingMode.Set(nil) -} - -// UnsetUserMatchingMode ensures that no value is present for UserMatchingMode, not even an explicit nil -func (o *OAuthSource) UnsetUserMatchingMode() { - o.UserMatchingMode.Unset() + o.UserMatchingMode = &v } // GetManaged returns the Managed field value @@ -481,7 +472,7 @@ func (o *OAuthSource) SetManaged(v string) { // GetUserPathTemplate returns the UserPathTemplate field value if set, zero value otherwise. func (o *OAuthSource) GetUserPathTemplate() string { - if o == nil || o.UserPathTemplate == nil { + if o == nil || IsNil(o.UserPathTemplate) { var ret string return ret } @@ -491,7 +482,7 @@ func (o *OAuthSource) GetUserPathTemplate() string { // GetUserPathTemplateOk returns a tuple with the UserPathTemplate field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *OAuthSource) GetUserPathTemplateOk() (*string, bool) { - if o == nil || o.UserPathTemplate == nil { + if o == nil || IsNil(o.UserPathTemplate) { return nil, false } return o.UserPathTemplate, true @@ -499,7 +490,7 @@ func (o *OAuthSource) GetUserPathTemplateOk() (*string, bool) { // HasUserPathTemplate returns a boolean if a field has been set. func (o *OAuthSource) HasUserPathTemplate() bool { - if o != nil && o.UserPathTemplate != nil { + if o != nil && !IsNil(o.UserPathTemplate) { return true } @@ -563,7 +554,7 @@ func (o *OAuthSource) SetProviderType(v ProviderTypeEnum) { // GetRequestTokenUrl returns the RequestTokenUrl field value if set, zero value otherwise (both if not set or set to explicit null). func (o *OAuthSource) GetRequestTokenUrl() string { - if o == nil || o.RequestTokenUrl.Get() == nil { + if o == nil || IsNil(o.RequestTokenUrl.Get()) { var ret string return ret } @@ -606,7 +597,7 @@ func (o *OAuthSource) UnsetRequestTokenUrl() { // GetAuthorizationUrl returns the AuthorizationUrl field value if set, zero value otherwise (both if not set or set to explicit null). func (o *OAuthSource) GetAuthorizationUrl() string { - if o == nil || o.AuthorizationUrl.Get() == nil { + if o == nil || IsNil(o.AuthorizationUrl.Get()) { var ret string return ret } @@ -649,7 +640,7 @@ func (o *OAuthSource) UnsetAuthorizationUrl() { // GetAccessTokenUrl returns the AccessTokenUrl field value if set, zero value otherwise (both if not set or set to explicit null). func (o *OAuthSource) GetAccessTokenUrl() string { - if o == nil || o.AccessTokenUrl.Get() == nil { + if o == nil || IsNil(o.AccessTokenUrl.Get()) { var ret string return ret } @@ -692,7 +683,7 @@ func (o *OAuthSource) UnsetAccessTokenUrl() { // GetProfileUrl returns the ProfileUrl field value if set, zero value otherwise (both if not set or set to explicit null). func (o *OAuthSource) GetProfileUrl() string { - if o == nil || o.ProfileUrl.Get() == nil { + if o == nil || IsNil(o.ProfileUrl.Get()) { var ret string return ret } @@ -783,7 +774,7 @@ func (o *OAuthSource) SetCallbackUrl(v string) { // GetAdditionalScopes returns the AdditionalScopes field value if set, zero value otherwise. func (o *OAuthSource) GetAdditionalScopes() string { - if o == nil || o.AdditionalScopes == nil { + if o == nil || IsNil(o.AdditionalScopes) { var ret string return ret } @@ -793,7 +784,7 @@ func (o *OAuthSource) GetAdditionalScopes() string { // GetAdditionalScopesOk returns a tuple with the AdditionalScopes field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *OAuthSource) GetAdditionalScopesOk() (*string, bool) { - if o == nil || o.AdditionalScopes == nil { + if o == nil || IsNil(o.AdditionalScopes) { return nil, false } return o.AdditionalScopes, true @@ -801,7 +792,7 @@ func (o *OAuthSource) GetAdditionalScopesOk() (*string, bool) { // HasAdditionalScopes returns a boolean if a field has been set. func (o *OAuthSource) HasAdditionalScopes() bool { - if o != nil && o.AdditionalScopes != nil { + if o != nil && !IsNil(o.AdditionalScopes) { return true } @@ -814,9 +805,9 @@ func (o *OAuthSource) SetAdditionalScopes(v string) { } // GetType returns the Type field value -func (o *OAuthSource) GetType() OAuthSourceType { +func (o *OAuthSource) GetType() SourceType { if o == nil { - var ret OAuthSourceType + var ret SourceType return ret } @@ -825,7 +816,7 @@ func (o *OAuthSource) GetType() OAuthSourceType { // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. -func (o *OAuthSource) GetTypeOk() (*OAuthSourceType, bool) { +func (o *OAuthSource) GetTypeOk() (*SourceType, bool) { if o == nil { return nil, false } @@ -833,13 +824,13 @@ func (o *OAuthSource) GetTypeOk() (*OAuthSourceType, bool) { } // SetType sets field value -func (o *OAuthSource) SetType(v OAuthSourceType) { +func (o *OAuthSource) SetType(v SourceType) { o.Type = v } // GetOidcWellKnownUrl returns the OidcWellKnownUrl field value if set, zero value otherwise. func (o *OAuthSource) GetOidcWellKnownUrl() string { - if o == nil || o.OidcWellKnownUrl == nil { + if o == nil || IsNil(o.OidcWellKnownUrl) { var ret string return ret } @@ -849,7 +840,7 @@ func (o *OAuthSource) GetOidcWellKnownUrl() string { // GetOidcWellKnownUrlOk returns a tuple with the OidcWellKnownUrl field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *OAuthSource) GetOidcWellKnownUrlOk() (*string, bool) { - if o == nil || o.OidcWellKnownUrl == nil { + if o == nil || IsNil(o.OidcWellKnownUrl) { return nil, false } return o.OidcWellKnownUrl, true @@ -857,7 +848,7 @@ func (o *OAuthSource) GetOidcWellKnownUrlOk() (*string, bool) { // HasOidcWellKnownUrl returns a boolean if a field has been set. func (o *OAuthSource) HasOidcWellKnownUrl() bool { - if o != nil && o.OidcWellKnownUrl != nil { + if o != nil && !IsNil(o.OidcWellKnownUrl) { return true } @@ -871,7 +862,7 @@ func (o *OAuthSource) SetOidcWellKnownUrl(v string) { // GetOidcJwksUrl returns the OidcJwksUrl field value if set, zero value otherwise. func (o *OAuthSource) GetOidcJwksUrl() string { - if o == nil || o.OidcJwksUrl == nil { + if o == nil || IsNil(o.OidcJwksUrl) { var ret string return ret } @@ -881,7 +872,7 @@ func (o *OAuthSource) GetOidcJwksUrl() string { // GetOidcJwksUrlOk returns a tuple with the OidcJwksUrl field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *OAuthSource) GetOidcJwksUrlOk() (*string, bool) { - if o == nil || o.OidcJwksUrl == nil { + if o == nil || IsNil(o.OidcJwksUrl) { return nil, false } return o.OidcJwksUrl, true @@ -889,7 +880,7 @@ func (o *OAuthSource) GetOidcJwksUrlOk() (*string, bool) { // HasOidcJwksUrl returns a boolean if a field has been set. func (o *OAuthSource) HasOidcJwksUrl() bool { - if o != nil && o.OidcJwksUrl != nil { + if o != nil && !IsNil(o.OidcJwksUrl) { return true } @@ -903,7 +894,7 @@ func (o *OAuthSource) SetOidcJwksUrl(v string) { // GetOidcJwks returns the OidcJwks field value if set, zero value otherwise. func (o *OAuthSource) GetOidcJwks() map[string]interface{} { - if o == nil || o.OidcJwks == nil { + if o == nil || IsNil(o.OidcJwks) { var ret map[string]interface{} return ret } @@ -913,15 +904,15 @@ func (o *OAuthSource) GetOidcJwks() map[string]interface{} { // GetOidcJwksOk returns a tuple with the OidcJwks field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *OAuthSource) GetOidcJwksOk() (map[string]interface{}, bool) { - if o == nil || o.OidcJwks == nil { - return nil, false + if o == nil || IsNil(o.OidcJwks) { + return map[string]interface{}{}, false } return o.OidcJwks, true } // HasOidcJwks returns a boolean if a field has been set. func (o *OAuthSource) HasOidcJwks() bool { - if o != nil && o.OidcJwks != nil { + if o != nil && !IsNil(o.OidcJwks) { return true } @@ -934,17 +925,19 @@ func (o *OAuthSource) SetOidcJwks(v map[string]interface{}) { } func (o OAuthSource) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if true { - toSerialize["slug"] = o.Slug - } - if o.Enabled != nil { + return json.Marshal(toSerialize) +} + +func (o OAuthSource) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name + toSerialize["slug"] = o.Slug + if !IsNil(o.Enabled) { toSerialize["enabled"] = o.Enabled } if o.AuthenticationFlow.IsSet() { @@ -953,36 +946,22 @@ func (o OAuthSource) MarshalJSON() ([]byte, error) { if o.EnrollmentFlow.IsSet() { toSerialize["enrollment_flow"] = o.EnrollmentFlow.Get() } - if true { - toSerialize["component"] = o.Component - } - if true { - toSerialize["verbose_name"] = o.VerboseName - } - if true { - toSerialize["verbose_name_plural"] = o.VerboseNamePlural - } - if true { - toSerialize["meta_model_name"] = o.MetaModelName - } - if o.PolicyEngineMode != nil { + // skip: component is readOnly + // skip: verbose_name is readOnly + // skip: verbose_name_plural is readOnly + // skip: meta_model_name is readOnly + if !IsNil(o.PolicyEngineMode) { toSerialize["policy_engine_mode"] = o.PolicyEngineMode } - if o.UserMatchingMode.IsSet() { - toSerialize["user_matching_mode"] = o.UserMatchingMode.Get() - } - if true { - toSerialize["managed"] = o.Managed.Get() + if !IsNil(o.UserMatchingMode) { + toSerialize["user_matching_mode"] = o.UserMatchingMode } - if o.UserPathTemplate != nil { + toSerialize["managed"] = o.Managed.Get() + if !IsNil(o.UserPathTemplate) { toSerialize["user_path_template"] = o.UserPathTemplate } - if true { - toSerialize["icon"] = o.Icon.Get() - } - if true { - toSerialize["provider_type"] = o.ProviderType - } + toSerialize["icon"] = o.Icon.Get() + toSerialize["provider_type"] = o.ProviderType if o.RequestTokenUrl.IsSet() { toSerialize["request_token_url"] = o.RequestTokenUrl.Get() } @@ -995,28 +974,22 @@ func (o OAuthSource) MarshalJSON() ([]byte, error) { if o.ProfileUrl.IsSet() { toSerialize["profile_url"] = o.ProfileUrl.Get() } - if true { - toSerialize["consumer_key"] = o.ConsumerKey - } - if true { - toSerialize["callback_url"] = o.CallbackUrl - } - if o.AdditionalScopes != nil { + toSerialize["consumer_key"] = o.ConsumerKey + // skip: callback_url is readOnly + if !IsNil(o.AdditionalScopes) { toSerialize["additional_scopes"] = o.AdditionalScopes } - if true { - toSerialize["type"] = o.Type - } - if o.OidcWellKnownUrl != nil { + // skip: type is readOnly + if !IsNil(o.OidcWellKnownUrl) { toSerialize["oidc_well_known_url"] = o.OidcWellKnownUrl } - if o.OidcJwksUrl != nil { + if !IsNil(o.OidcJwksUrl) { toSerialize["oidc_jwks_url"] = o.OidcJwksUrl } - if o.OidcJwks != nil { + if !IsNil(o.OidcJwks) { toSerialize["oidc_jwks"] = o.OidcJwks } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableOAuthSource struct { diff --git a/model_o_auth_source_request.go b/model_o_auth_source_request.go index a8d4bf5a2..cbc8e5e4a 100644 --- a/model_o_auth_source_request.go +++ b/model_o_auth_source_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the OAuthSourceRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OAuthSourceRequest{} + // OAuthSourceRequest OAuth Source Serializer type OAuthSourceRequest struct { // Source's display Name. @@ -25,12 +28,11 @@ type OAuthSourceRequest struct { // Flow to use when authenticating existing users. AuthenticationFlow NullableString `json:"authentication_flow,omitempty"` // Flow to use when enrolling new users. - EnrollmentFlow NullableString `json:"enrollment_flow,omitempty"` - PolicyEngineMode *PolicyEngineMode `json:"policy_engine_mode,omitempty"` - // How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. - UserMatchingMode NullableUserMatchingModeEnum `json:"user_matching_mode,omitempty"` - UserPathTemplate *string `json:"user_path_template,omitempty"` - ProviderType ProviderTypeEnum `json:"provider_type"` + EnrollmentFlow NullableString `json:"enrollment_flow,omitempty"` + PolicyEngineMode *PolicyEngineMode `json:"policy_engine_mode,omitempty"` + UserMatchingMode *UserMatchingModeEnum `json:"user_matching_mode,omitempty"` + UserPathTemplate *string `json:"user_path_template,omitempty"` + ProviderType ProviderTypeEnum `json:"provider_type"` // URL used to request the initial token. This URL is only required for OAuth 1. RequestTokenUrl NullableString `json:"request_token_url,omitempty"` // URL the user is redirect to to conest the flow. @@ -119,7 +121,7 @@ func (o *OAuthSourceRequest) SetSlug(v string) { // GetEnabled returns the Enabled field value if set, zero value otherwise. func (o *OAuthSourceRequest) GetEnabled() bool { - if o == nil || o.Enabled == nil { + if o == nil || IsNil(o.Enabled) { var ret bool return ret } @@ -129,7 +131,7 @@ func (o *OAuthSourceRequest) GetEnabled() bool { // GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *OAuthSourceRequest) GetEnabledOk() (*bool, bool) { - if o == nil || o.Enabled == nil { + if o == nil || IsNil(o.Enabled) { return nil, false } return o.Enabled, true @@ -137,7 +139,7 @@ func (o *OAuthSourceRequest) GetEnabledOk() (*bool, bool) { // HasEnabled returns a boolean if a field has been set. func (o *OAuthSourceRequest) HasEnabled() bool { - if o != nil && o.Enabled != nil { + if o != nil && !IsNil(o.Enabled) { return true } @@ -151,7 +153,7 @@ func (o *OAuthSourceRequest) SetEnabled(v bool) { // GetAuthenticationFlow returns the AuthenticationFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *OAuthSourceRequest) GetAuthenticationFlow() string { - if o == nil || o.AuthenticationFlow.Get() == nil { + if o == nil || IsNil(o.AuthenticationFlow.Get()) { var ret string return ret } @@ -194,7 +196,7 @@ func (o *OAuthSourceRequest) UnsetAuthenticationFlow() { // GetEnrollmentFlow returns the EnrollmentFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *OAuthSourceRequest) GetEnrollmentFlow() string { - if o == nil || o.EnrollmentFlow.Get() == nil { + if o == nil || IsNil(o.EnrollmentFlow.Get()) { var ret string return ret } @@ -237,7 +239,7 @@ func (o *OAuthSourceRequest) UnsetEnrollmentFlow() { // GetPolicyEngineMode returns the PolicyEngineMode field value if set, zero value otherwise. func (o *OAuthSourceRequest) GetPolicyEngineMode() PolicyEngineMode { - if o == nil || o.PolicyEngineMode == nil { + if o == nil || IsNil(o.PolicyEngineMode) { var ret PolicyEngineMode return ret } @@ -247,7 +249,7 @@ func (o *OAuthSourceRequest) GetPolicyEngineMode() PolicyEngineMode { // GetPolicyEngineModeOk returns a tuple with the PolicyEngineMode field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *OAuthSourceRequest) GetPolicyEngineModeOk() (*PolicyEngineMode, bool) { - if o == nil || o.PolicyEngineMode == nil { + if o == nil || IsNil(o.PolicyEngineMode) { return nil, false } return o.PolicyEngineMode, true @@ -255,7 +257,7 @@ func (o *OAuthSourceRequest) GetPolicyEngineModeOk() (*PolicyEngineMode, bool) { // HasPolicyEngineMode returns a boolean if a field has been set. func (o *OAuthSourceRequest) HasPolicyEngineMode() bool { - if o != nil && o.PolicyEngineMode != nil { + if o != nil && !IsNil(o.PolicyEngineMode) { return true } @@ -267,52 +269,41 @@ func (o *OAuthSourceRequest) SetPolicyEngineMode(v PolicyEngineMode) { o.PolicyEngineMode = &v } -// GetUserMatchingMode returns the UserMatchingMode field value if set, zero value otherwise (both if not set or set to explicit null). +// GetUserMatchingMode returns the UserMatchingMode field value if set, zero value otherwise. func (o *OAuthSourceRequest) GetUserMatchingMode() UserMatchingModeEnum { - if o == nil || o.UserMatchingMode.Get() == nil { + if o == nil || IsNil(o.UserMatchingMode) { var ret UserMatchingModeEnum return ret } - return *o.UserMatchingMode.Get() + return *o.UserMatchingMode } // GetUserMatchingModeOk returns a tuple with the UserMatchingMode field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *OAuthSourceRequest) GetUserMatchingModeOk() (*UserMatchingModeEnum, bool) { - if o == nil { + if o == nil || IsNil(o.UserMatchingMode) { return nil, false } - return o.UserMatchingMode.Get(), o.UserMatchingMode.IsSet() + return o.UserMatchingMode, true } // HasUserMatchingMode returns a boolean if a field has been set. func (o *OAuthSourceRequest) HasUserMatchingMode() bool { - if o != nil && o.UserMatchingMode.IsSet() { + if o != nil && !IsNil(o.UserMatchingMode) { return true } return false } -// SetUserMatchingMode gets a reference to the given NullableUserMatchingModeEnum and assigns it to the UserMatchingMode field. +// SetUserMatchingMode gets a reference to the given UserMatchingModeEnum and assigns it to the UserMatchingMode field. func (o *OAuthSourceRequest) SetUserMatchingMode(v UserMatchingModeEnum) { - o.UserMatchingMode.Set(&v) -} - -// SetUserMatchingModeNil sets the value for UserMatchingMode to be an explicit nil -func (o *OAuthSourceRequest) SetUserMatchingModeNil() { - o.UserMatchingMode.Set(nil) -} - -// UnsetUserMatchingMode ensures that no value is present for UserMatchingMode, not even an explicit nil -func (o *OAuthSourceRequest) UnsetUserMatchingMode() { - o.UserMatchingMode.Unset() + o.UserMatchingMode = &v } // GetUserPathTemplate returns the UserPathTemplate field value if set, zero value otherwise. func (o *OAuthSourceRequest) GetUserPathTemplate() string { - if o == nil || o.UserPathTemplate == nil { + if o == nil || IsNil(o.UserPathTemplate) { var ret string return ret } @@ -322,7 +313,7 @@ func (o *OAuthSourceRequest) GetUserPathTemplate() string { // GetUserPathTemplateOk returns a tuple with the UserPathTemplate field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *OAuthSourceRequest) GetUserPathTemplateOk() (*string, bool) { - if o == nil || o.UserPathTemplate == nil { + if o == nil || IsNil(o.UserPathTemplate) { return nil, false } return o.UserPathTemplate, true @@ -330,7 +321,7 @@ func (o *OAuthSourceRequest) GetUserPathTemplateOk() (*string, bool) { // HasUserPathTemplate returns a boolean if a field has been set. func (o *OAuthSourceRequest) HasUserPathTemplate() bool { - if o != nil && o.UserPathTemplate != nil { + if o != nil && !IsNil(o.UserPathTemplate) { return true } @@ -368,7 +359,7 @@ func (o *OAuthSourceRequest) SetProviderType(v ProviderTypeEnum) { // GetRequestTokenUrl returns the RequestTokenUrl field value if set, zero value otherwise (both if not set or set to explicit null). func (o *OAuthSourceRequest) GetRequestTokenUrl() string { - if o == nil || o.RequestTokenUrl.Get() == nil { + if o == nil || IsNil(o.RequestTokenUrl.Get()) { var ret string return ret } @@ -411,7 +402,7 @@ func (o *OAuthSourceRequest) UnsetRequestTokenUrl() { // GetAuthorizationUrl returns the AuthorizationUrl field value if set, zero value otherwise (both if not set or set to explicit null). func (o *OAuthSourceRequest) GetAuthorizationUrl() string { - if o == nil || o.AuthorizationUrl.Get() == nil { + if o == nil || IsNil(o.AuthorizationUrl.Get()) { var ret string return ret } @@ -454,7 +445,7 @@ func (o *OAuthSourceRequest) UnsetAuthorizationUrl() { // GetAccessTokenUrl returns the AccessTokenUrl field value if set, zero value otherwise (both if not set or set to explicit null). func (o *OAuthSourceRequest) GetAccessTokenUrl() string { - if o == nil || o.AccessTokenUrl.Get() == nil { + if o == nil || IsNil(o.AccessTokenUrl.Get()) { var ret string return ret } @@ -497,7 +488,7 @@ func (o *OAuthSourceRequest) UnsetAccessTokenUrl() { // GetProfileUrl returns the ProfileUrl field value if set, zero value otherwise (both if not set or set to explicit null). func (o *OAuthSourceRequest) GetProfileUrl() string { - if o == nil || o.ProfileUrl.Get() == nil { + if o == nil || IsNil(o.ProfileUrl.Get()) { var ret string return ret } @@ -588,7 +579,7 @@ func (o *OAuthSourceRequest) SetConsumerSecret(v string) { // GetAdditionalScopes returns the AdditionalScopes field value if set, zero value otherwise. func (o *OAuthSourceRequest) GetAdditionalScopes() string { - if o == nil || o.AdditionalScopes == nil { + if o == nil || IsNil(o.AdditionalScopes) { var ret string return ret } @@ -598,7 +589,7 @@ func (o *OAuthSourceRequest) GetAdditionalScopes() string { // GetAdditionalScopesOk returns a tuple with the AdditionalScopes field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *OAuthSourceRequest) GetAdditionalScopesOk() (*string, bool) { - if o == nil || o.AdditionalScopes == nil { + if o == nil || IsNil(o.AdditionalScopes) { return nil, false } return o.AdditionalScopes, true @@ -606,7 +597,7 @@ func (o *OAuthSourceRequest) GetAdditionalScopesOk() (*string, bool) { // HasAdditionalScopes returns a boolean if a field has been set. func (o *OAuthSourceRequest) HasAdditionalScopes() bool { - if o != nil && o.AdditionalScopes != nil { + if o != nil && !IsNil(o.AdditionalScopes) { return true } @@ -620,7 +611,7 @@ func (o *OAuthSourceRequest) SetAdditionalScopes(v string) { // GetOidcWellKnownUrl returns the OidcWellKnownUrl field value if set, zero value otherwise. func (o *OAuthSourceRequest) GetOidcWellKnownUrl() string { - if o == nil || o.OidcWellKnownUrl == nil { + if o == nil || IsNil(o.OidcWellKnownUrl) { var ret string return ret } @@ -630,7 +621,7 @@ func (o *OAuthSourceRequest) GetOidcWellKnownUrl() string { // GetOidcWellKnownUrlOk returns a tuple with the OidcWellKnownUrl field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *OAuthSourceRequest) GetOidcWellKnownUrlOk() (*string, bool) { - if o == nil || o.OidcWellKnownUrl == nil { + if o == nil || IsNil(o.OidcWellKnownUrl) { return nil, false } return o.OidcWellKnownUrl, true @@ -638,7 +629,7 @@ func (o *OAuthSourceRequest) GetOidcWellKnownUrlOk() (*string, bool) { // HasOidcWellKnownUrl returns a boolean if a field has been set. func (o *OAuthSourceRequest) HasOidcWellKnownUrl() bool { - if o != nil && o.OidcWellKnownUrl != nil { + if o != nil && !IsNil(o.OidcWellKnownUrl) { return true } @@ -652,7 +643,7 @@ func (o *OAuthSourceRequest) SetOidcWellKnownUrl(v string) { // GetOidcJwksUrl returns the OidcJwksUrl field value if set, zero value otherwise. func (o *OAuthSourceRequest) GetOidcJwksUrl() string { - if o == nil || o.OidcJwksUrl == nil { + if o == nil || IsNil(o.OidcJwksUrl) { var ret string return ret } @@ -662,7 +653,7 @@ func (o *OAuthSourceRequest) GetOidcJwksUrl() string { // GetOidcJwksUrlOk returns a tuple with the OidcJwksUrl field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *OAuthSourceRequest) GetOidcJwksUrlOk() (*string, bool) { - if o == nil || o.OidcJwksUrl == nil { + if o == nil || IsNil(o.OidcJwksUrl) { return nil, false } return o.OidcJwksUrl, true @@ -670,7 +661,7 @@ func (o *OAuthSourceRequest) GetOidcJwksUrlOk() (*string, bool) { // HasOidcJwksUrl returns a boolean if a field has been set. func (o *OAuthSourceRequest) HasOidcJwksUrl() bool { - if o != nil && o.OidcJwksUrl != nil { + if o != nil && !IsNil(o.OidcJwksUrl) { return true } @@ -684,7 +675,7 @@ func (o *OAuthSourceRequest) SetOidcJwksUrl(v string) { // GetOidcJwks returns the OidcJwks field value if set, zero value otherwise. func (o *OAuthSourceRequest) GetOidcJwks() map[string]interface{} { - if o == nil || o.OidcJwks == nil { + if o == nil || IsNil(o.OidcJwks) { var ret map[string]interface{} return ret } @@ -694,15 +685,15 @@ func (o *OAuthSourceRequest) GetOidcJwks() map[string]interface{} { // GetOidcJwksOk returns a tuple with the OidcJwks field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *OAuthSourceRequest) GetOidcJwksOk() (map[string]interface{}, bool) { - if o == nil || o.OidcJwks == nil { - return nil, false + if o == nil || IsNil(o.OidcJwks) { + return map[string]interface{}{}, false } return o.OidcJwks, true } // HasOidcJwks returns a boolean if a field has been set. func (o *OAuthSourceRequest) HasOidcJwks() bool { - if o != nil && o.OidcJwks != nil { + if o != nil && !IsNil(o.OidcJwks) { return true } @@ -715,14 +706,18 @@ func (o *OAuthSourceRequest) SetOidcJwks(v map[string]interface{}) { } func (o OAuthSourceRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if true { - toSerialize["slug"] = o.Slug - } - if o.Enabled != nil { + return json.Marshal(toSerialize) +} + +func (o OAuthSourceRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["slug"] = o.Slug + if !IsNil(o.Enabled) { toSerialize["enabled"] = o.Enabled } if o.AuthenticationFlow.IsSet() { @@ -731,18 +726,16 @@ func (o OAuthSourceRequest) MarshalJSON() ([]byte, error) { if o.EnrollmentFlow.IsSet() { toSerialize["enrollment_flow"] = o.EnrollmentFlow.Get() } - if o.PolicyEngineMode != nil { + if !IsNil(o.PolicyEngineMode) { toSerialize["policy_engine_mode"] = o.PolicyEngineMode } - if o.UserMatchingMode.IsSet() { - toSerialize["user_matching_mode"] = o.UserMatchingMode.Get() + if !IsNil(o.UserMatchingMode) { + toSerialize["user_matching_mode"] = o.UserMatchingMode } - if o.UserPathTemplate != nil { + if !IsNil(o.UserPathTemplate) { toSerialize["user_path_template"] = o.UserPathTemplate } - if true { - toSerialize["provider_type"] = o.ProviderType - } + toSerialize["provider_type"] = o.ProviderType if o.RequestTokenUrl.IsSet() { toSerialize["request_token_url"] = o.RequestTokenUrl.Get() } @@ -755,25 +748,21 @@ func (o OAuthSourceRequest) MarshalJSON() ([]byte, error) { if o.ProfileUrl.IsSet() { toSerialize["profile_url"] = o.ProfileUrl.Get() } - if true { - toSerialize["consumer_key"] = o.ConsumerKey - } - if true { - toSerialize["consumer_secret"] = o.ConsumerSecret - } - if o.AdditionalScopes != nil { + toSerialize["consumer_key"] = o.ConsumerKey + toSerialize["consumer_secret"] = o.ConsumerSecret + if !IsNil(o.AdditionalScopes) { toSerialize["additional_scopes"] = o.AdditionalScopes } - if o.OidcWellKnownUrl != nil { + if !IsNil(o.OidcWellKnownUrl) { toSerialize["oidc_well_known_url"] = o.OidcWellKnownUrl } - if o.OidcJwksUrl != nil { + if !IsNil(o.OidcJwksUrl) { toSerialize["oidc_jwks_url"] = o.OidcJwksUrl } - if o.OidcJwks != nil { + if !IsNil(o.OidcJwks) { toSerialize["oidc_jwks"] = o.OidcJwks } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableOAuthSourceRequest struct { diff --git a/model_o_auth_source_type.go b/model_o_auth_source_type.go deleted file mode 100644 index 636d738fa..000000000 --- a/model_o_auth_source_type.go +++ /dev/null @@ -1,289 +0,0 @@ -/* -authentik - -Making authentication simple. - -API version: 2023.3.1 -Contact: hello@goauthentik.io -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package api - -import ( - "encoding/json" -) - -// OAuthSourceType struct for OAuthSourceType -type OAuthSourceType struct { - Name string `json:"name"` - Slug string `json:"slug"` - UrlsCustomizable bool `json:"urls_customizable"` - RequestTokenUrl NullableString `json:"request_token_url"` - AuthorizationUrl NullableString `json:"authorization_url"` - AccessTokenUrl NullableString `json:"access_token_url"` - ProfileUrl NullableString `json:"profile_url"` -} - -// NewOAuthSourceType instantiates a new OAuthSourceType object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewOAuthSourceType(name string, slug string, urlsCustomizable bool, requestTokenUrl NullableString, authorizationUrl NullableString, accessTokenUrl NullableString, profileUrl NullableString) *OAuthSourceType { - this := OAuthSourceType{} - this.Name = name - this.Slug = slug - this.UrlsCustomizable = urlsCustomizable - this.RequestTokenUrl = requestTokenUrl - this.AuthorizationUrl = authorizationUrl - this.AccessTokenUrl = accessTokenUrl - this.ProfileUrl = profileUrl - return &this -} - -// NewOAuthSourceTypeWithDefaults instantiates a new OAuthSourceType object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewOAuthSourceTypeWithDefaults() *OAuthSourceType { - this := OAuthSourceType{} - return &this -} - -// GetName returns the Name field value -func (o *OAuthSourceType) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *OAuthSourceType) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *OAuthSourceType) SetName(v string) { - o.Name = v -} - -// GetSlug returns the Slug field value -func (o *OAuthSourceType) GetSlug() string { - if o == nil { - var ret string - return ret - } - - return o.Slug -} - -// GetSlugOk returns a tuple with the Slug field value -// and a boolean to check if the value has been set. -func (o *OAuthSourceType) GetSlugOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Slug, true -} - -// SetSlug sets field value -func (o *OAuthSourceType) SetSlug(v string) { - o.Slug = v -} - -// GetUrlsCustomizable returns the UrlsCustomizable field value -func (o *OAuthSourceType) GetUrlsCustomizable() bool { - if o == nil { - var ret bool - return ret - } - - return o.UrlsCustomizable -} - -// GetUrlsCustomizableOk returns a tuple with the UrlsCustomizable field value -// and a boolean to check if the value has been set. -func (o *OAuthSourceType) GetUrlsCustomizableOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.UrlsCustomizable, true -} - -// SetUrlsCustomizable sets field value -func (o *OAuthSourceType) SetUrlsCustomizable(v bool) { - o.UrlsCustomizable = v -} - -// GetRequestTokenUrl returns the RequestTokenUrl field value -// If the value is explicit nil, the zero value for string will be returned -func (o *OAuthSourceType) GetRequestTokenUrl() string { - if o == nil || o.RequestTokenUrl.Get() == nil { - var ret string - return ret - } - - return *o.RequestTokenUrl.Get() -} - -// GetRequestTokenUrlOk returns a tuple with the RequestTokenUrl field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *OAuthSourceType) GetRequestTokenUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.RequestTokenUrl.Get(), o.RequestTokenUrl.IsSet() -} - -// SetRequestTokenUrl sets field value -func (o *OAuthSourceType) SetRequestTokenUrl(v string) { - o.RequestTokenUrl.Set(&v) -} - -// GetAuthorizationUrl returns the AuthorizationUrl field value -// If the value is explicit nil, the zero value for string will be returned -func (o *OAuthSourceType) GetAuthorizationUrl() string { - if o == nil || o.AuthorizationUrl.Get() == nil { - var ret string - return ret - } - - return *o.AuthorizationUrl.Get() -} - -// GetAuthorizationUrlOk returns a tuple with the AuthorizationUrl field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *OAuthSourceType) GetAuthorizationUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.AuthorizationUrl.Get(), o.AuthorizationUrl.IsSet() -} - -// SetAuthorizationUrl sets field value -func (o *OAuthSourceType) SetAuthorizationUrl(v string) { - o.AuthorizationUrl.Set(&v) -} - -// GetAccessTokenUrl returns the AccessTokenUrl field value -// If the value is explicit nil, the zero value for string will be returned -func (o *OAuthSourceType) GetAccessTokenUrl() string { - if o == nil || o.AccessTokenUrl.Get() == nil { - var ret string - return ret - } - - return *o.AccessTokenUrl.Get() -} - -// GetAccessTokenUrlOk returns a tuple with the AccessTokenUrl field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *OAuthSourceType) GetAccessTokenUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.AccessTokenUrl.Get(), o.AccessTokenUrl.IsSet() -} - -// SetAccessTokenUrl sets field value -func (o *OAuthSourceType) SetAccessTokenUrl(v string) { - o.AccessTokenUrl.Set(&v) -} - -// GetProfileUrl returns the ProfileUrl field value -// If the value is explicit nil, the zero value for string will be returned -func (o *OAuthSourceType) GetProfileUrl() string { - if o == nil || o.ProfileUrl.Get() == nil { - var ret string - return ret - } - - return *o.ProfileUrl.Get() -} - -// GetProfileUrlOk returns a tuple with the ProfileUrl field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *OAuthSourceType) GetProfileUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.ProfileUrl.Get(), o.ProfileUrl.IsSet() -} - -// SetProfileUrl sets field value -func (o *OAuthSourceType) SetProfileUrl(v string) { - o.ProfileUrl.Set(&v) -} - -func (o OAuthSourceType) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["slug"] = o.Slug - } - if true { - toSerialize["urls_customizable"] = o.UrlsCustomizable - } - if true { - toSerialize["request_token_url"] = o.RequestTokenUrl.Get() - } - if true { - toSerialize["authorization_url"] = o.AuthorizationUrl.Get() - } - if true { - toSerialize["access_token_url"] = o.AccessTokenUrl.Get() - } - if true { - toSerialize["profile_url"] = o.ProfileUrl.Get() - } - return json.Marshal(toSerialize) -} - -type NullableOAuthSourceType struct { - value *OAuthSourceType - isSet bool -} - -func (v NullableOAuthSourceType) Get() *OAuthSourceType { - return v.value -} - -func (v *NullableOAuthSourceType) Set(val *OAuthSourceType) { - v.value = val - v.isSet = true -} - -func (v NullableOAuthSourceType) IsSet() bool { - return v.isSet -} - -func (v *NullableOAuthSourceType) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableOAuthSourceType(val *OAuthSourceType) *NullableOAuthSourceType { - return &NullableOAuthSourceType{value: val, isSet: true} -} - -func (v NullableOAuthSourceType) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableOAuthSourceType) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/model_open_id_connect_configuration.go b/model_open_id_connect_configuration.go index aa3d9cf5a..9ad7af247 100644 --- a/model_open_id_connect_configuration.go +++ b/model_open_id_connect_configuration.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the OpenIDConnectConfiguration type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OpenIDConnectConfiguration{} + // OpenIDConnectConfiguration rest_framework Serializer for OIDC Configuration type OpenIDConnectConfiguration struct { Issuer string `json:"issuer"` @@ -323,43 +326,29 @@ func (o *OpenIDConnectConfiguration) SetTokenEndpointAuthMethodsSupported(v []st } func (o OpenIDConnectConfiguration) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["issuer"] = o.Issuer - } - if true { - toSerialize["authorization_endpoint"] = o.AuthorizationEndpoint - } - if true { - toSerialize["token_endpoint"] = o.TokenEndpoint - } - if true { - toSerialize["userinfo_endpoint"] = o.UserinfoEndpoint - } - if true { - toSerialize["end_session_endpoint"] = o.EndSessionEndpoint - } - if true { - toSerialize["introspection_endpoint"] = o.IntrospectionEndpoint - } - if true { - toSerialize["jwks_uri"] = o.JwksUri - } - if true { - toSerialize["response_types_supported"] = o.ResponseTypesSupported - } - if true { - toSerialize["id_token_signing_alg_values_supported"] = o.IdTokenSigningAlgValuesSupported - } - if true { - toSerialize["subject_types_supported"] = o.SubjectTypesSupported - } - if true { - toSerialize["token_endpoint_auth_methods_supported"] = o.TokenEndpointAuthMethodsSupported + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o OpenIDConnectConfiguration) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["issuer"] = o.Issuer + toSerialize["authorization_endpoint"] = o.AuthorizationEndpoint + toSerialize["token_endpoint"] = o.TokenEndpoint + toSerialize["userinfo_endpoint"] = o.UserinfoEndpoint + toSerialize["end_session_endpoint"] = o.EndSessionEndpoint + toSerialize["introspection_endpoint"] = o.IntrospectionEndpoint + toSerialize["jwks_uri"] = o.JwksUri + toSerialize["response_types_supported"] = o.ResponseTypesSupported + toSerialize["id_token_signing_alg_values_supported"] = o.IdTokenSigningAlgValuesSupported + toSerialize["subject_types_supported"] = o.SubjectTypesSupported + toSerialize["token_endpoint_auth_methods_supported"] = o.TokenEndpointAuthMethodsSupported + return toSerialize, nil +} + type NullableOpenIDConnectConfiguration struct { value *OpenIDConnectConfiguration isSet bool diff --git a/model_outpost.go b/model_outpost.go index a72198ec5..6c8ec260b 100644 --- a/model_outpost.go +++ b/model_outpost.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the Outpost type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Outpost{} + // Outpost Outpost Serializer type Outpost struct { Pk string `json:"pk"` @@ -23,8 +26,8 @@ type Outpost struct { Providers []int32 `json:"providers"` ProvidersObj []Provider `json:"providers_obj"` // Select Service-Connection authentik should use to manage this outpost. Leave empty if authentik should not handle the deployment. - ServiceConnection NullableString `json:"service_connection,omitempty"` - ServiceConnectionObj OutpostServiceConnectionObj `json:"service_connection_obj"` + ServiceConnection NullableString `json:"service_connection,omitempty"` + ServiceConnectionObj ServiceConnection `json:"service_connection_obj"` // Get Token identifier TokenIdentifier string `json:"token_identifier"` Config map[string]interface{} `json:"config"` @@ -36,7 +39,7 @@ type Outpost struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewOutpost(pk string, name string, type_ OutpostTypeEnum, providers []int32, providersObj []Provider, serviceConnectionObj OutpostServiceConnectionObj, tokenIdentifier string, config map[string]interface{}) *Outpost { +func NewOutpost(pk string, name string, type_ OutpostTypeEnum, providers []int32, providersObj []Provider, serviceConnectionObj ServiceConnection, tokenIdentifier string, config map[string]interface{}) *Outpost { this := Outpost{} this.Pk = pk this.Name = name @@ -179,7 +182,7 @@ func (o *Outpost) SetProvidersObj(v []Provider) { // GetServiceConnection returns the ServiceConnection field value if set, zero value otherwise (both if not set or set to explicit null). func (o *Outpost) GetServiceConnection() string { - if o == nil || o.ServiceConnection.Get() == nil { + if o == nil || IsNil(o.ServiceConnection.Get()) { var ret string return ret } @@ -221,9 +224,9 @@ func (o *Outpost) UnsetServiceConnection() { } // GetServiceConnectionObj returns the ServiceConnectionObj field value -func (o *Outpost) GetServiceConnectionObj() OutpostServiceConnectionObj { +func (o *Outpost) GetServiceConnectionObj() ServiceConnection { if o == nil { - var ret OutpostServiceConnectionObj + var ret ServiceConnection return ret } @@ -232,7 +235,7 @@ func (o *Outpost) GetServiceConnectionObj() OutpostServiceConnectionObj { // GetServiceConnectionObjOk returns a tuple with the ServiceConnectionObj field value // and a boolean to check if the value has been set. -func (o *Outpost) GetServiceConnectionObjOk() (*OutpostServiceConnectionObj, bool) { +func (o *Outpost) GetServiceConnectionObjOk() (*ServiceConnection, bool) { if o == nil { return nil, false } @@ -240,7 +243,7 @@ func (o *Outpost) GetServiceConnectionObjOk() (*OutpostServiceConnectionObj, boo } // SetServiceConnectionObj sets field value -func (o *Outpost) SetServiceConnectionObj(v OutpostServiceConnectionObj) { +func (o *Outpost) SetServiceConnectionObj(v ServiceConnection) { o.ServiceConnectionObj = v } @@ -282,7 +285,7 @@ func (o *Outpost) GetConfig() map[string]interface{} { // and a boolean to check if the value has been set. func (o *Outpost) GetConfigOk() (map[string]interface{}, bool) { if o == nil { - return nil, false + return map[string]interface{}{}, false } return o.Config, true } @@ -294,7 +297,7 @@ func (o *Outpost) SetConfig(v map[string]interface{}) { // GetManaged returns the Managed field value if set, zero value otherwise (both if not set or set to explicit null). func (o *Outpost) GetManaged() string { - if o == nil || o.Managed.Get() == nil { + if o == nil || IsNil(o.Managed.Get()) { var ret string return ret } @@ -336,38 +339,30 @@ func (o *Outpost) UnsetManaged() { } func (o Outpost) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["type"] = o.Type - } - if true { - toSerialize["providers"] = o.Providers - } - if true { - toSerialize["providers_obj"] = o.ProvidersObj + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } + return json.Marshal(toSerialize) +} + +func (o Outpost) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name + toSerialize["type"] = o.Type + toSerialize["providers"] = o.Providers + // skip: providers_obj is readOnly if o.ServiceConnection.IsSet() { toSerialize["service_connection"] = o.ServiceConnection.Get() } - if true { - toSerialize["service_connection_obj"] = o.ServiceConnectionObj - } - if true { - toSerialize["token_identifier"] = o.TokenIdentifier - } - if true { - toSerialize["config"] = o.Config - } + // skip: service_connection_obj is readOnly + // skip: token_identifier is readOnly + toSerialize["config"] = o.Config if o.Managed.IsSet() { toSerialize["managed"] = o.Managed.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableOutpost struct { diff --git a/model_outpost_default_config.go b/model_outpost_default_config.go index a683d3cac..ac750aaab 100644 --- a/model_outpost_default_config.go +++ b/model_outpost_default_config.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the OutpostDefaultConfig type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OutpostDefaultConfig{} + // OutpostDefaultConfig Global default outpost config type OutpostDefaultConfig struct { Config map[string]interface{} `json:"config"` @@ -52,7 +55,7 @@ func (o *OutpostDefaultConfig) GetConfig() map[string]interface{} { // and a boolean to check if the value has been set. func (o *OutpostDefaultConfig) GetConfigOk() (map[string]interface{}, bool) { if o == nil { - return nil, false + return map[string]interface{}{}, false } return o.Config, true } @@ -63,13 +66,19 @@ func (o *OutpostDefaultConfig) SetConfig(v map[string]interface{}) { } func (o OutpostDefaultConfig) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["config"] = o.Config + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o OutpostDefaultConfig) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: config is readOnly + return toSerialize, nil +} + type NullableOutpostDefaultConfig struct { value *OutpostDefaultConfig isSet bool diff --git a/model_outpost_health.go b/model_outpost_health.go index 9cb42db2f..38596a5a7 100644 --- a/model_outpost_health.go +++ b/model_outpost_health.go @@ -16,6 +16,9 @@ import ( "time" ) +// checks if the OutpostHealth type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OutpostHealth{} + // OutpostHealth Outpost health status type OutpostHealth struct { Uid string `json:"uid"` @@ -246,34 +249,26 @@ func (o *OutpostHealth) SetHostname(v string) { } func (o OutpostHealth) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["uid"] = o.Uid - } - if true { - toSerialize["last_seen"] = o.LastSeen - } - if true { - toSerialize["version"] = o.Version - } - if true { - toSerialize["version_should"] = o.VersionShould - } - if true { - toSerialize["version_outdated"] = o.VersionOutdated - } - if true { - toSerialize["build_hash"] = o.BuildHash - } - if true { - toSerialize["build_hash_should"] = o.BuildHashShould - } - if true { - toSerialize["hostname"] = o.Hostname + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o OutpostHealth) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: uid is readOnly + // skip: last_seen is readOnly + // skip: version is readOnly + // skip: version_should is readOnly + // skip: version_outdated is readOnly + // skip: build_hash is readOnly + // skip: build_hash_should is readOnly + // skip: hostname is readOnly + return toSerialize, nil +} + type NullableOutpostHealth struct { value *OutpostHealth isSet bool diff --git a/model_outpost_request.go b/model_outpost_request.go index 8638e2fd8..52ee8dbf8 100644 --- a/model_outpost_request.go +++ b/model_outpost_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the OutpostRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OutpostRequest{} + // OutpostRequest Outpost Serializer type OutpostRequest struct { Name string `json:"name"` @@ -122,7 +125,7 @@ func (o *OutpostRequest) SetProviders(v []int32) { // GetServiceConnection returns the ServiceConnection field value if set, zero value otherwise (both if not set or set to explicit null). func (o *OutpostRequest) GetServiceConnection() string { - if o == nil || o.ServiceConnection.Get() == nil { + if o == nil || IsNil(o.ServiceConnection.Get()) { var ret string return ret } @@ -177,7 +180,7 @@ func (o *OutpostRequest) GetConfig() map[string]interface{} { // and a boolean to check if the value has been set. func (o *OutpostRequest) GetConfigOk() (map[string]interface{}, bool) { if o == nil { - return nil, false + return map[string]interface{}{}, false } return o.Config, true } @@ -189,7 +192,7 @@ func (o *OutpostRequest) SetConfig(v map[string]interface{}) { // GetManaged returns the Managed field value if set, zero value otherwise (both if not set or set to explicit null). func (o *OutpostRequest) GetManaged() string { - if o == nil || o.Managed.Get() == nil { + if o == nil || IsNil(o.Managed.Get()) { var ret string return ret } @@ -231,26 +234,26 @@ func (o *OutpostRequest) UnsetManaged() { } func (o OutpostRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["type"] = o.Type - } - if true { - toSerialize["providers"] = o.Providers + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } + return json.Marshal(toSerialize) +} + +func (o OutpostRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["type"] = o.Type + toSerialize["providers"] = o.Providers if o.ServiceConnection.IsSet() { toSerialize["service_connection"] = o.ServiceConnection.Get() } - if true { - toSerialize["config"] = o.Config - } + toSerialize["config"] = o.Config if o.Managed.IsSet() { toSerialize["managed"] = o.Managed.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableOutpostRequest struct { diff --git a/model_outpost_service_connection_obj.go b/model_outpost_service_connection_obj.go deleted file mode 100644 index b0a45da3e..000000000 --- a/model_outpost_service_connection_obj.go +++ /dev/null @@ -1,293 +0,0 @@ -/* -authentik - -Making authentication simple. - -API version: 2023.3.1 -Contact: hello@goauthentik.io -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package api - -import ( - "encoding/json" -) - -// OutpostServiceConnectionObj struct for OutpostServiceConnectionObj -type OutpostServiceConnectionObj struct { - Pk string `json:"pk"` - Name string `json:"name"` - // If enabled, use the local connection. Required Docker socket/Kubernetes Integration - Local *bool `json:"local,omitempty"` - // Return component used to edit this object - Component string `json:"component"` - // Return object's verbose_name - VerboseName string `json:"verbose_name"` - // Return object's plural verbose_name - VerboseNamePlural string `json:"verbose_name_plural"` - // Return internal model name - MetaModelName string `json:"meta_model_name"` -} - -// NewOutpostServiceConnectionObj instantiates a new OutpostServiceConnectionObj object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewOutpostServiceConnectionObj(pk string, name string, component string, verboseName string, verboseNamePlural string, metaModelName string) *OutpostServiceConnectionObj { - this := OutpostServiceConnectionObj{} - this.Pk = pk - this.Name = name - this.Component = component - this.VerboseName = verboseName - this.VerboseNamePlural = verboseNamePlural - this.MetaModelName = metaModelName - return &this -} - -// NewOutpostServiceConnectionObjWithDefaults instantiates a new OutpostServiceConnectionObj object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewOutpostServiceConnectionObjWithDefaults() *OutpostServiceConnectionObj { - this := OutpostServiceConnectionObj{} - return &this -} - -// GetPk returns the Pk field value -func (o *OutpostServiceConnectionObj) GetPk() string { - if o == nil { - var ret string - return ret - } - - return o.Pk -} - -// GetPkOk returns a tuple with the Pk field value -// and a boolean to check if the value has been set. -func (o *OutpostServiceConnectionObj) GetPkOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Pk, true -} - -// SetPk sets field value -func (o *OutpostServiceConnectionObj) SetPk(v string) { - o.Pk = v -} - -// GetName returns the Name field value -func (o *OutpostServiceConnectionObj) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *OutpostServiceConnectionObj) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *OutpostServiceConnectionObj) SetName(v string) { - o.Name = v -} - -// GetLocal returns the Local field value if set, zero value otherwise. -func (o *OutpostServiceConnectionObj) GetLocal() bool { - if o == nil || o.Local == nil { - var ret bool - return ret - } - return *o.Local -} - -// GetLocalOk returns a tuple with the Local field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *OutpostServiceConnectionObj) GetLocalOk() (*bool, bool) { - if o == nil || o.Local == nil { - return nil, false - } - return o.Local, true -} - -// HasLocal returns a boolean if a field has been set. -func (o *OutpostServiceConnectionObj) HasLocal() bool { - if o != nil && o.Local != nil { - return true - } - - return false -} - -// SetLocal gets a reference to the given bool and assigns it to the Local field. -func (o *OutpostServiceConnectionObj) SetLocal(v bool) { - o.Local = &v -} - -// GetComponent returns the Component field value -func (o *OutpostServiceConnectionObj) GetComponent() string { - if o == nil { - var ret string - return ret - } - - return o.Component -} - -// GetComponentOk returns a tuple with the Component field value -// and a boolean to check if the value has been set. -func (o *OutpostServiceConnectionObj) GetComponentOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Component, true -} - -// SetComponent sets field value -func (o *OutpostServiceConnectionObj) SetComponent(v string) { - o.Component = v -} - -// GetVerboseName returns the VerboseName field value -func (o *OutpostServiceConnectionObj) GetVerboseName() string { - if o == nil { - var ret string - return ret - } - - return o.VerboseName -} - -// GetVerboseNameOk returns a tuple with the VerboseName field value -// and a boolean to check if the value has been set. -func (o *OutpostServiceConnectionObj) GetVerboseNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.VerboseName, true -} - -// SetVerboseName sets field value -func (o *OutpostServiceConnectionObj) SetVerboseName(v string) { - o.VerboseName = v -} - -// GetVerboseNamePlural returns the VerboseNamePlural field value -func (o *OutpostServiceConnectionObj) GetVerboseNamePlural() string { - if o == nil { - var ret string - return ret - } - - return o.VerboseNamePlural -} - -// GetVerboseNamePluralOk returns a tuple with the VerboseNamePlural field value -// and a boolean to check if the value has been set. -func (o *OutpostServiceConnectionObj) GetVerboseNamePluralOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.VerboseNamePlural, true -} - -// SetVerboseNamePlural sets field value -func (o *OutpostServiceConnectionObj) SetVerboseNamePlural(v string) { - o.VerboseNamePlural = v -} - -// GetMetaModelName returns the MetaModelName field value -func (o *OutpostServiceConnectionObj) GetMetaModelName() string { - if o == nil { - var ret string - return ret - } - - return o.MetaModelName -} - -// GetMetaModelNameOk returns a tuple with the MetaModelName field value -// and a boolean to check if the value has been set. -func (o *OutpostServiceConnectionObj) GetMetaModelNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.MetaModelName, true -} - -// SetMetaModelName sets field value -func (o *OutpostServiceConnectionObj) SetMetaModelName(v string) { - o.MetaModelName = v -} - -func (o OutpostServiceConnectionObj) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["name"] = o.Name - } - if o.Local != nil { - toSerialize["local"] = o.Local - } - if true { - toSerialize["component"] = o.Component - } - if true { - toSerialize["verbose_name"] = o.VerboseName - } - if true { - toSerialize["verbose_name_plural"] = o.VerboseNamePlural - } - if true { - toSerialize["meta_model_name"] = o.MetaModelName - } - return json.Marshal(toSerialize) -} - -type NullableOutpostServiceConnectionObj struct { - value *OutpostServiceConnectionObj - isSet bool -} - -func (v NullableOutpostServiceConnectionObj) Get() *OutpostServiceConnectionObj { - return v.value -} - -func (v *NullableOutpostServiceConnectionObj) Set(val *OutpostServiceConnectionObj) { - v.value = val - v.isSet = true -} - -func (v NullableOutpostServiceConnectionObj) IsSet() bool { - return v.isSet -} - -func (v *NullableOutpostServiceConnectionObj) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableOutpostServiceConnectionObj(val *OutpostServiceConnectionObj) *NullableOutpostServiceConnectionObj { - return &NullableOutpostServiceConnectionObj{value: val, isSet: true} -} - -func (v NullableOutpostServiceConnectionObj) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableOutpostServiceConnectionObj) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/model_paginated_application_list.go b/model_paginated_application_list.go index 3142be17a..59be6d556 100644 --- a/model_paginated_application_list.go +++ b/model_paginated_application_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedApplicationList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedApplicationList{} + // PaginatedApplicationList struct for PaginatedApplicationList type PaginatedApplicationList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedApplicationList) SetResults(v []Application) { } func (o PaginatedApplicationList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedApplicationList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedApplicationList struct { value *PaginatedApplicationList isSet bool diff --git a/model_paginated_application_list_pagination.go b/model_paginated_application_list_pagination.go index 9d9c97a98..1e37e478a 100644 --- a/model_paginated_application_list_pagination.go +++ b/model_paginated_application_list_pagination.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedApplicationListPagination type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedApplicationListPagination{} + // PaginatedApplicationListPagination struct for PaginatedApplicationListPagination type PaginatedApplicationListPagination struct { Next float32 `json:"next"` @@ -219,31 +222,25 @@ func (o *PaginatedApplicationListPagination) SetEndIndex(v float32) { } func (o PaginatedApplicationListPagination) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["next"] = o.Next - } - if true { - toSerialize["previous"] = o.Previous - } - if true { - toSerialize["count"] = o.Count - } - if true { - toSerialize["current"] = o.Current - } - if true { - toSerialize["total_pages"] = o.TotalPages - } - if true { - toSerialize["start_index"] = o.StartIndex - } - if true { - toSerialize["end_index"] = o.EndIndex + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedApplicationListPagination) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["next"] = o.Next + toSerialize["previous"] = o.Previous + toSerialize["count"] = o.Count + toSerialize["current"] = o.Current + toSerialize["total_pages"] = o.TotalPages + toSerialize["start_index"] = o.StartIndex + toSerialize["end_index"] = o.EndIndex + return toSerialize, nil +} + type NullablePaginatedApplicationListPagination struct { value *PaginatedApplicationListPagination isSet bool diff --git a/model_paginated_authenticate_web_authn_stage_list.go b/model_paginated_authenticate_web_authn_stage_list.go index 2462e7237..7ff651135 100644 --- a/model_paginated_authenticate_web_authn_stage_list.go +++ b/model_paginated_authenticate_web_authn_stage_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedAuthenticateWebAuthnStageList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedAuthenticateWebAuthnStageList{} + // PaginatedAuthenticateWebAuthnStageList struct for PaginatedAuthenticateWebAuthnStageList type PaginatedAuthenticateWebAuthnStageList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedAuthenticateWebAuthnStageList) SetResults(v []AuthenticateWebA } func (o PaginatedAuthenticateWebAuthnStageList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedAuthenticateWebAuthnStageList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedAuthenticateWebAuthnStageList struct { value *PaginatedAuthenticateWebAuthnStageList isSet bool diff --git a/model_paginated_authenticated_session_list.go b/model_paginated_authenticated_session_list.go index 2ff46ee26..79214fdde 100644 --- a/model_paginated_authenticated_session_list.go +++ b/model_paginated_authenticated_session_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedAuthenticatedSessionList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedAuthenticatedSessionList{} + // PaginatedAuthenticatedSessionList struct for PaginatedAuthenticatedSessionList type PaginatedAuthenticatedSessionList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedAuthenticatedSessionList) SetResults(v []AuthenticatedSession) } func (o PaginatedAuthenticatedSessionList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedAuthenticatedSessionList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedAuthenticatedSessionList struct { value *PaginatedAuthenticatedSessionList isSet bool diff --git a/model_paginated_authenticator_duo_stage_list.go b/model_paginated_authenticator_duo_stage_list.go index e707f203f..db6956468 100644 --- a/model_paginated_authenticator_duo_stage_list.go +++ b/model_paginated_authenticator_duo_stage_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedAuthenticatorDuoStageList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedAuthenticatorDuoStageList{} + // PaginatedAuthenticatorDuoStageList struct for PaginatedAuthenticatorDuoStageList type PaginatedAuthenticatorDuoStageList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedAuthenticatorDuoStageList) SetResults(v []AuthenticatorDuoStag } func (o PaginatedAuthenticatorDuoStageList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedAuthenticatorDuoStageList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedAuthenticatorDuoStageList struct { value *PaginatedAuthenticatorDuoStageList isSet bool diff --git a/model_paginated_authenticator_sms_stage_list.go b/model_paginated_authenticator_sms_stage_list.go index 697142f5b..64b09e88b 100644 --- a/model_paginated_authenticator_sms_stage_list.go +++ b/model_paginated_authenticator_sms_stage_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedAuthenticatorSMSStageList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedAuthenticatorSMSStageList{} + // PaginatedAuthenticatorSMSStageList struct for PaginatedAuthenticatorSMSStageList type PaginatedAuthenticatorSMSStageList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedAuthenticatorSMSStageList) SetResults(v []AuthenticatorSMSStag } func (o PaginatedAuthenticatorSMSStageList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedAuthenticatorSMSStageList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedAuthenticatorSMSStageList struct { value *PaginatedAuthenticatorSMSStageList isSet bool diff --git a/model_paginated_authenticator_static_stage_list.go b/model_paginated_authenticator_static_stage_list.go index 0fc3aac93..80c5cb205 100644 --- a/model_paginated_authenticator_static_stage_list.go +++ b/model_paginated_authenticator_static_stage_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedAuthenticatorStaticStageList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedAuthenticatorStaticStageList{} + // PaginatedAuthenticatorStaticStageList struct for PaginatedAuthenticatorStaticStageList type PaginatedAuthenticatorStaticStageList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedAuthenticatorStaticStageList) SetResults(v []AuthenticatorStat } func (o PaginatedAuthenticatorStaticStageList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedAuthenticatorStaticStageList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedAuthenticatorStaticStageList struct { value *PaginatedAuthenticatorStaticStageList isSet bool diff --git a/model_paginated_authenticator_totp_stage_list.go b/model_paginated_authenticator_totp_stage_list.go index 8f62c1a7b..d789d41af 100644 --- a/model_paginated_authenticator_totp_stage_list.go +++ b/model_paginated_authenticator_totp_stage_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedAuthenticatorTOTPStageList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedAuthenticatorTOTPStageList{} + // PaginatedAuthenticatorTOTPStageList struct for PaginatedAuthenticatorTOTPStageList type PaginatedAuthenticatorTOTPStageList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedAuthenticatorTOTPStageList) SetResults(v []AuthenticatorTOTPSt } func (o PaginatedAuthenticatorTOTPStageList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedAuthenticatorTOTPStageList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedAuthenticatorTOTPStageList struct { value *PaginatedAuthenticatorTOTPStageList isSet bool diff --git a/model_paginated_authenticator_validate_stage_list.go b/model_paginated_authenticator_validate_stage_list.go index acd309020..7a3206a41 100644 --- a/model_paginated_authenticator_validate_stage_list.go +++ b/model_paginated_authenticator_validate_stage_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedAuthenticatorValidateStageList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedAuthenticatorValidateStageList{} + // PaginatedAuthenticatorValidateStageList struct for PaginatedAuthenticatorValidateStageList type PaginatedAuthenticatorValidateStageList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedAuthenticatorValidateStageList) SetResults(v []AuthenticatorVa } func (o PaginatedAuthenticatorValidateStageList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedAuthenticatorValidateStageList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedAuthenticatorValidateStageList struct { value *PaginatedAuthenticatorValidateStageList isSet bool diff --git a/model_paginated_blueprint_instance_list.go b/model_paginated_blueprint_instance_list.go index 655a20ace..18a4e9600 100644 --- a/model_paginated_blueprint_instance_list.go +++ b/model_paginated_blueprint_instance_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedBlueprintInstanceList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedBlueprintInstanceList{} + // PaginatedBlueprintInstanceList struct for PaginatedBlueprintInstanceList type PaginatedBlueprintInstanceList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedBlueprintInstanceList) SetResults(v []BlueprintInstance) { } func (o PaginatedBlueprintInstanceList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedBlueprintInstanceList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedBlueprintInstanceList struct { value *PaginatedBlueprintInstanceList isSet bool diff --git a/model_paginated_captcha_stage_list.go b/model_paginated_captcha_stage_list.go index eaff88e78..dae9f3db6 100644 --- a/model_paginated_captcha_stage_list.go +++ b/model_paginated_captcha_stage_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedCaptchaStageList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedCaptchaStageList{} + // PaginatedCaptchaStageList struct for PaginatedCaptchaStageList type PaginatedCaptchaStageList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedCaptchaStageList) SetResults(v []CaptchaStage) { } func (o PaginatedCaptchaStageList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedCaptchaStageList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedCaptchaStageList struct { value *PaginatedCaptchaStageList isSet bool diff --git a/model_paginated_certificate_key_pair_list.go b/model_paginated_certificate_key_pair_list.go index 559b6c8b3..e534b62fa 100644 --- a/model_paginated_certificate_key_pair_list.go +++ b/model_paginated_certificate_key_pair_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedCertificateKeyPairList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedCertificateKeyPairList{} + // PaginatedCertificateKeyPairList struct for PaginatedCertificateKeyPairList type PaginatedCertificateKeyPairList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedCertificateKeyPairList) SetResults(v []CertificateKeyPair) { } func (o PaginatedCertificateKeyPairList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedCertificateKeyPairList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedCertificateKeyPairList struct { value *PaginatedCertificateKeyPairList isSet bool diff --git a/model_paginated_consent_stage_list.go b/model_paginated_consent_stage_list.go index a280be302..380815665 100644 --- a/model_paginated_consent_stage_list.go +++ b/model_paginated_consent_stage_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedConsentStageList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedConsentStageList{} + // PaginatedConsentStageList struct for PaginatedConsentStageList type PaginatedConsentStageList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedConsentStageList) SetResults(v []ConsentStage) { } func (o PaginatedConsentStageList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedConsentStageList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedConsentStageList struct { value *PaginatedConsentStageList isSet bool diff --git a/model_paginated_deny_stage_list.go b/model_paginated_deny_stage_list.go index 5a29d80e4..5b41fa743 100644 --- a/model_paginated_deny_stage_list.go +++ b/model_paginated_deny_stage_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedDenyStageList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedDenyStageList{} + // PaginatedDenyStageList struct for PaginatedDenyStageList type PaginatedDenyStageList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedDenyStageList) SetResults(v []DenyStage) { } func (o PaginatedDenyStageList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedDenyStageList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedDenyStageList struct { value *PaginatedDenyStageList isSet bool diff --git a/model_paginated_docker_service_connection_list.go b/model_paginated_docker_service_connection_list.go index 6f2ebcfd2..888f16a7a 100644 --- a/model_paginated_docker_service_connection_list.go +++ b/model_paginated_docker_service_connection_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedDockerServiceConnectionList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedDockerServiceConnectionList{} + // PaginatedDockerServiceConnectionList struct for PaginatedDockerServiceConnectionList type PaginatedDockerServiceConnectionList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedDockerServiceConnectionList) SetResults(v []DockerServiceConne } func (o PaginatedDockerServiceConnectionList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedDockerServiceConnectionList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedDockerServiceConnectionList struct { value *PaginatedDockerServiceConnectionList isSet bool diff --git a/model_paginated_dummy_policy_list.go b/model_paginated_dummy_policy_list.go index f7f99540e..93e362aed 100644 --- a/model_paginated_dummy_policy_list.go +++ b/model_paginated_dummy_policy_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedDummyPolicyList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedDummyPolicyList{} + // PaginatedDummyPolicyList struct for PaginatedDummyPolicyList type PaginatedDummyPolicyList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedDummyPolicyList) SetResults(v []DummyPolicy) { } func (o PaginatedDummyPolicyList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedDummyPolicyList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedDummyPolicyList struct { value *PaginatedDummyPolicyList isSet bool diff --git a/model_paginated_dummy_stage_list.go b/model_paginated_dummy_stage_list.go index 5330de085..01b7d88b5 100644 --- a/model_paginated_dummy_stage_list.go +++ b/model_paginated_dummy_stage_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedDummyStageList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedDummyStageList{} + // PaginatedDummyStageList struct for PaginatedDummyStageList type PaginatedDummyStageList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedDummyStageList) SetResults(v []DummyStage) { } func (o PaginatedDummyStageList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedDummyStageList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedDummyStageList struct { value *PaginatedDummyStageList isSet bool diff --git a/model_paginated_duo_device_list.go b/model_paginated_duo_device_list.go index f25b52c05..148ddf8eb 100644 --- a/model_paginated_duo_device_list.go +++ b/model_paginated_duo_device_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedDuoDeviceList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedDuoDeviceList{} + // PaginatedDuoDeviceList struct for PaginatedDuoDeviceList type PaginatedDuoDeviceList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedDuoDeviceList) SetResults(v []DuoDevice) { } func (o PaginatedDuoDeviceList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedDuoDeviceList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedDuoDeviceList struct { value *PaginatedDuoDeviceList isSet bool diff --git a/model_paginated_email_stage_list.go b/model_paginated_email_stage_list.go index 0495e1335..e34b2af7e 100644 --- a/model_paginated_email_stage_list.go +++ b/model_paginated_email_stage_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedEmailStageList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedEmailStageList{} + // PaginatedEmailStageList struct for PaginatedEmailStageList type PaginatedEmailStageList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedEmailStageList) SetResults(v []EmailStage) { } func (o PaginatedEmailStageList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedEmailStageList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedEmailStageList struct { value *PaginatedEmailStageList isSet bool diff --git a/model_paginated_event_list.go b/model_paginated_event_list.go index 27761ac53..9135eef82 100644 --- a/model_paginated_event_list.go +++ b/model_paginated_event_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedEventList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedEventList{} + // PaginatedEventList struct for PaginatedEventList type PaginatedEventList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedEventList) SetResults(v []Event) { } func (o PaginatedEventList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedEventList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedEventList struct { value *PaginatedEventList isSet bool diff --git a/model_paginated_event_matcher_policy_list.go b/model_paginated_event_matcher_policy_list.go index 5fa03ad03..5faf78afc 100644 --- a/model_paginated_event_matcher_policy_list.go +++ b/model_paginated_event_matcher_policy_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedEventMatcherPolicyList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedEventMatcherPolicyList{} + // PaginatedEventMatcherPolicyList struct for PaginatedEventMatcherPolicyList type PaginatedEventMatcherPolicyList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedEventMatcherPolicyList) SetResults(v []EventMatcherPolicy) { } func (o PaginatedEventMatcherPolicyList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedEventMatcherPolicyList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedEventMatcherPolicyList struct { value *PaginatedEventMatcherPolicyList isSet bool diff --git a/model_paginated_expiring_base_grant_model_list.go b/model_paginated_expiring_base_grant_model_list.go index 36ef3c995..120ad18ac 100644 --- a/model_paginated_expiring_base_grant_model_list.go +++ b/model_paginated_expiring_base_grant_model_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedExpiringBaseGrantModelList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedExpiringBaseGrantModelList{} + // PaginatedExpiringBaseGrantModelList struct for PaginatedExpiringBaseGrantModelList type PaginatedExpiringBaseGrantModelList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedExpiringBaseGrantModelList) SetResults(v []ExpiringBaseGrantMo } func (o PaginatedExpiringBaseGrantModelList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedExpiringBaseGrantModelList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedExpiringBaseGrantModelList struct { value *PaginatedExpiringBaseGrantModelList isSet bool diff --git a/model_paginated_expression_policy_list.go b/model_paginated_expression_policy_list.go index e45b80ee6..d0e700c67 100644 --- a/model_paginated_expression_policy_list.go +++ b/model_paginated_expression_policy_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedExpressionPolicyList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedExpressionPolicyList{} + // PaginatedExpressionPolicyList struct for PaginatedExpressionPolicyList type PaginatedExpressionPolicyList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedExpressionPolicyList) SetResults(v []ExpressionPolicy) { } func (o PaginatedExpressionPolicyList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedExpressionPolicyList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedExpressionPolicyList struct { value *PaginatedExpressionPolicyList isSet bool diff --git a/model_paginated_flow_list.go b/model_paginated_flow_list.go index c986297c6..91273918d 100644 --- a/model_paginated_flow_list.go +++ b/model_paginated_flow_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedFlowList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedFlowList{} + // PaginatedFlowList struct for PaginatedFlowList type PaginatedFlowList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedFlowList) SetResults(v []Flow) { } func (o PaginatedFlowList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedFlowList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedFlowList struct { value *PaginatedFlowList isSet bool diff --git a/model_paginated_flow_stage_binding_list.go b/model_paginated_flow_stage_binding_list.go index 503223a17..72fd62e91 100644 --- a/model_paginated_flow_stage_binding_list.go +++ b/model_paginated_flow_stage_binding_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedFlowStageBindingList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedFlowStageBindingList{} + // PaginatedFlowStageBindingList struct for PaginatedFlowStageBindingList type PaginatedFlowStageBindingList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedFlowStageBindingList) SetResults(v []FlowStageBinding) { } func (o PaginatedFlowStageBindingList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedFlowStageBindingList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedFlowStageBindingList struct { value *PaginatedFlowStageBindingList isSet bool diff --git a/model_paginated_group_list.go b/model_paginated_group_list.go index 3939909ad..569672c25 100644 --- a/model_paginated_group_list.go +++ b/model_paginated_group_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedGroupList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedGroupList{} + // PaginatedGroupList struct for PaginatedGroupList type PaginatedGroupList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedGroupList) SetResults(v []Group) { } func (o PaginatedGroupList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedGroupList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedGroupList struct { value *PaginatedGroupList isSet bool diff --git a/model_paginated_identification_stage_list.go b/model_paginated_identification_stage_list.go index 41f596fec..d6fc73bdb 100644 --- a/model_paginated_identification_stage_list.go +++ b/model_paginated_identification_stage_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedIdentificationStageList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedIdentificationStageList{} + // PaginatedIdentificationStageList struct for PaginatedIdentificationStageList type PaginatedIdentificationStageList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedIdentificationStageList) SetResults(v []IdentificationStage) { } func (o PaginatedIdentificationStageList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedIdentificationStageList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedIdentificationStageList struct { value *PaginatedIdentificationStageList isSet bool diff --git a/model_paginated_invitation_list.go b/model_paginated_invitation_list.go index 5b0c6efe9..be584a3da 100644 --- a/model_paginated_invitation_list.go +++ b/model_paginated_invitation_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedInvitationList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedInvitationList{} + // PaginatedInvitationList struct for PaginatedInvitationList type PaginatedInvitationList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedInvitationList) SetResults(v []Invitation) { } func (o PaginatedInvitationList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedInvitationList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedInvitationList struct { value *PaginatedInvitationList isSet bool diff --git a/model_paginated_invitation_stage_list.go b/model_paginated_invitation_stage_list.go index f866310ea..d2d79eb68 100644 --- a/model_paginated_invitation_stage_list.go +++ b/model_paginated_invitation_stage_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedInvitationStageList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedInvitationStageList{} + // PaginatedInvitationStageList struct for PaginatedInvitationStageList type PaginatedInvitationStageList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedInvitationStageList) SetResults(v []InvitationStage) { } func (o PaginatedInvitationStageList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedInvitationStageList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedInvitationStageList struct { value *PaginatedInvitationStageList isSet bool diff --git a/model_paginated_kubernetes_service_connection_list.go b/model_paginated_kubernetes_service_connection_list.go index d8c517cf1..ca90fbc63 100644 --- a/model_paginated_kubernetes_service_connection_list.go +++ b/model_paginated_kubernetes_service_connection_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedKubernetesServiceConnectionList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedKubernetesServiceConnectionList{} + // PaginatedKubernetesServiceConnectionList struct for PaginatedKubernetesServiceConnectionList type PaginatedKubernetesServiceConnectionList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedKubernetesServiceConnectionList) SetResults(v []KubernetesServ } func (o PaginatedKubernetesServiceConnectionList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedKubernetesServiceConnectionList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedKubernetesServiceConnectionList struct { value *PaginatedKubernetesServiceConnectionList isSet bool diff --git a/model_paginated_ldap_outpost_config_list.go b/model_paginated_ldap_outpost_config_list.go index 77e872e45..1a8763c43 100644 --- a/model_paginated_ldap_outpost_config_list.go +++ b/model_paginated_ldap_outpost_config_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedLDAPOutpostConfigList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedLDAPOutpostConfigList{} + // PaginatedLDAPOutpostConfigList struct for PaginatedLDAPOutpostConfigList type PaginatedLDAPOutpostConfigList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedLDAPOutpostConfigList) SetResults(v []LDAPOutpostConfig) { } func (o PaginatedLDAPOutpostConfigList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedLDAPOutpostConfigList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedLDAPOutpostConfigList struct { value *PaginatedLDAPOutpostConfigList isSet bool diff --git a/model_paginated_ldap_property_mapping_list.go b/model_paginated_ldap_property_mapping_list.go index 31dcb6286..670feef94 100644 --- a/model_paginated_ldap_property_mapping_list.go +++ b/model_paginated_ldap_property_mapping_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedLDAPPropertyMappingList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedLDAPPropertyMappingList{} + // PaginatedLDAPPropertyMappingList struct for PaginatedLDAPPropertyMappingList type PaginatedLDAPPropertyMappingList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedLDAPPropertyMappingList) SetResults(v []LDAPPropertyMapping) { } func (o PaginatedLDAPPropertyMappingList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedLDAPPropertyMappingList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedLDAPPropertyMappingList struct { value *PaginatedLDAPPropertyMappingList isSet bool diff --git a/model_paginated_ldap_provider_list.go b/model_paginated_ldap_provider_list.go index ccba45c34..1402cf9e7 100644 --- a/model_paginated_ldap_provider_list.go +++ b/model_paginated_ldap_provider_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedLDAPProviderList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedLDAPProviderList{} + // PaginatedLDAPProviderList struct for PaginatedLDAPProviderList type PaginatedLDAPProviderList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedLDAPProviderList) SetResults(v []LDAPProvider) { } func (o PaginatedLDAPProviderList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedLDAPProviderList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedLDAPProviderList struct { value *PaginatedLDAPProviderList isSet bool diff --git a/model_paginated_ldap_source_list.go b/model_paginated_ldap_source_list.go index 6ffb691db..7b3635145 100644 --- a/model_paginated_ldap_source_list.go +++ b/model_paginated_ldap_source_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedLDAPSourceList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedLDAPSourceList{} + // PaginatedLDAPSourceList struct for PaginatedLDAPSourceList type PaginatedLDAPSourceList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedLDAPSourceList) SetResults(v []LDAPSource) { } func (o PaginatedLDAPSourceList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedLDAPSourceList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedLDAPSourceList struct { value *PaginatedLDAPSourceList isSet bool diff --git a/model_paginated_notification_list.go b/model_paginated_notification_list.go index 8dfaa2f0b..ed781a2de 100644 --- a/model_paginated_notification_list.go +++ b/model_paginated_notification_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedNotificationList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedNotificationList{} + // PaginatedNotificationList struct for PaginatedNotificationList type PaginatedNotificationList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedNotificationList) SetResults(v []Notification) { } func (o PaginatedNotificationList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedNotificationList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedNotificationList struct { value *PaginatedNotificationList isSet bool diff --git a/model_paginated_notification_rule_list.go b/model_paginated_notification_rule_list.go index 79948efdd..ea2982a82 100644 --- a/model_paginated_notification_rule_list.go +++ b/model_paginated_notification_rule_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedNotificationRuleList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedNotificationRuleList{} + // PaginatedNotificationRuleList struct for PaginatedNotificationRuleList type PaginatedNotificationRuleList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedNotificationRuleList) SetResults(v []NotificationRule) { } func (o PaginatedNotificationRuleList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedNotificationRuleList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedNotificationRuleList struct { value *PaginatedNotificationRuleList isSet bool diff --git a/model_paginated_notification_transport_list.go b/model_paginated_notification_transport_list.go index 3ff0c3619..f644a90ca 100644 --- a/model_paginated_notification_transport_list.go +++ b/model_paginated_notification_transport_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedNotificationTransportList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedNotificationTransportList{} + // PaginatedNotificationTransportList struct for PaginatedNotificationTransportList type PaginatedNotificationTransportList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedNotificationTransportList) SetResults(v []NotificationTranspor } func (o PaginatedNotificationTransportList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedNotificationTransportList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedNotificationTransportList struct { value *PaginatedNotificationTransportList isSet bool diff --git a/model_paginated_notification_webhook_mapping_list.go b/model_paginated_notification_webhook_mapping_list.go index 6c4c318c2..d932fb2e1 100644 --- a/model_paginated_notification_webhook_mapping_list.go +++ b/model_paginated_notification_webhook_mapping_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedNotificationWebhookMappingList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedNotificationWebhookMappingList{} + // PaginatedNotificationWebhookMappingList struct for PaginatedNotificationWebhookMappingList type PaginatedNotificationWebhookMappingList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedNotificationWebhookMappingList) SetResults(v []NotificationWeb } func (o PaginatedNotificationWebhookMappingList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedNotificationWebhookMappingList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedNotificationWebhookMappingList struct { value *PaginatedNotificationWebhookMappingList isSet bool diff --git a/model_paginated_o_auth2_provider_list.go b/model_paginated_o_auth2_provider_list.go index b71e6687b..8385b5004 100644 --- a/model_paginated_o_auth2_provider_list.go +++ b/model_paginated_o_auth2_provider_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedOAuth2ProviderList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedOAuth2ProviderList{} + // PaginatedOAuth2ProviderList struct for PaginatedOAuth2ProviderList type PaginatedOAuth2ProviderList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedOAuth2ProviderList) SetResults(v []OAuth2Provider) { } func (o PaginatedOAuth2ProviderList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedOAuth2ProviderList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedOAuth2ProviderList struct { value *PaginatedOAuth2ProviderList isSet bool diff --git a/model_paginated_o_auth_source_list.go b/model_paginated_o_auth_source_list.go index 3a4692b3d..d60b50a6a 100644 --- a/model_paginated_o_auth_source_list.go +++ b/model_paginated_o_auth_source_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedOAuthSourceList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedOAuthSourceList{} + // PaginatedOAuthSourceList struct for PaginatedOAuthSourceList type PaginatedOAuthSourceList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedOAuthSourceList) SetResults(v []OAuthSource) { } func (o PaginatedOAuthSourceList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedOAuthSourceList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedOAuthSourceList struct { value *PaginatedOAuthSourceList isSet bool diff --git a/model_paginated_outpost_list.go b/model_paginated_outpost_list.go index ffb2ffde0..0a55362c3 100644 --- a/model_paginated_outpost_list.go +++ b/model_paginated_outpost_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedOutpostList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedOutpostList{} + // PaginatedOutpostList struct for PaginatedOutpostList type PaginatedOutpostList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedOutpostList) SetResults(v []Outpost) { } func (o PaginatedOutpostList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedOutpostList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedOutpostList struct { value *PaginatedOutpostList isSet bool diff --git a/model_paginated_password_expiry_policy_list.go b/model_paginated_password_expiry_policy_list.go index ef4b35894..0763d71bf 100644 --- a/model_paginated_password_expiry_policy_list.go +++ b/model_paginated_password_expiry_policy_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedPasswordExpiryPolicyList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedPasswordExpiryPolicyList{} + // PaginatedPasswordExpiryPolicyList struct for PaginatedPasswordExpiryPolicyList type PaginatedPasswordExpiryPolicyList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedPasswordExpiryPolicyList) SetResults(v []PasswordExpiryPolicy) } func (o PaginatedPasswordExpiryPolicyList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedPasswordExpiryPolicyList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedPasswordExpiryPolicyList struct { value *PaginatedPasswordExpiryPolicyList isSet bool diff --git a/model_paginated_password_policy_list.go b/model_paginated_password_policy_list.go index 71c2ad745..0c506bb19 100644 --- a/model_paginated_password_policy_list.go +++ b/model_paginated_password_policy_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedPasswordPolicyList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedPasswordPolicyList{} + // PaginatedPasswordPolicyList struct for PaginatedPasswordPolicyList type PaginatedPasswordPolicyList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedPasswordPolicyList) SetResults(v []PasswordPolicy) { } func (o PaginatedPasswordPolicyList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedPasswordPolicyList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedPasswordPolicyList struct { value *PaginatedPasswordPolicyList isSet bool diff --git a/model_paginated_password_stage_list.go b/model_paginated_password_stage_list.go index 48d3e4751..9ba84b8c8 100644 --- a/model_paginated_password_stage_list.go +++ b/model_paginated_password_stage_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedPasswordStageList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedPasswordStageList{} + // PaginatedPasswordStageList struct for PaginatedPasswordStageList type PaginatedPasswordStageList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedPasswordStageList) SetResults(v []PasswordStage) { } func (o PaginatedPasswordStageList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedPasswordStageList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedPasswordStageList struct { value *PaginatedPasswordStageList isSet bool diff --git a/model_paginated_plex_source_connection_list.go b/model_paginated_plex_source_connection_list.go index f11c08f20..694c8f2b6 100644 --- a/model_paginated_plex_source_connection_list.go +++ b/model_paginated_plex_source_connection_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedPlexSourceConnectionList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedPlexSourceConnectionList{} + // PaginatedPlexSourceConnectionList struct for PaginatedPlexSourceConnectionList type PaginatedPlexSourceConnectionList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedPlexSourceConnectionList) SetResults(v []PlexSourceConnection) } func (o PaginatedPlexSourceConnectionList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedPlexSourceConnectionList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedPlexSourceConnectionList struct { value *PaginatedPlexSourceConnectionList isSet bool diff --git a/model_paginated_plex_source_list.go b/model_paginated_plex_source_list.go index 63aa3a4c6..384430be7 100644 --- a/model_paginated_plex_source_list.go +++ b/model_paginated_plex_source_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedPlexSourceList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedPlexSourceList{} + // PaginatedPlexSourceList struct for PaginatedPlexSourceList type PaginatedPlexSourceList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedPlexSourceList) SetResults(v []PlexSource) { } func (o PaginatedPlexSourceList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedPlexSourceList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedPlexSourceList struct { value *PaginatedPlexSourceList isSet bool diff --git a/model_paginated_policy_binding_list.go b/model_paginated_policy_binding_list.go index 81f93f165..519d26162 100644 --- a/model_paginated_policy_binding_list.go +++ b/model_paginated_policy_binding_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedPolicyBindingList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedPolicyBindingList{} + // PaginatedPolicyBindingList struct for PaginatedPolicyBindingList type PaginatedPolicyBindingList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedPolicyBindingList) SetResults(v []PolicyBinding) { } func (o PaginatedPolicyBindingList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedPolicyBindingList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedPolicyBindingList struct { value *PaginatedPolicyBindingList isSet bool diff --git a/model_paginated_policy_list.go b/model_paginated_policy_list.go index e5ba1f253..19a81abff 100644 --- a/model_paginated_policy_list.go +++ b/model_paginated_policy_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedPolicyList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedPolicyList{} + // PaginatedPolicyList struct for PaginatedPolicyList type PaginatedPolicyList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedPolicyList) SetResults(v []Policy) { } func (o PaginatedPolicyList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedPolicyList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedPolicyList struct { value *PaginatedPolicyList isSet bool diff --git a/model_paginated_prompt_list.go b/model_paginated_prompt_list.go index 55f8a4fc0..159e53911 100644 --- a/model_paginated_prompt_list.go +++ b/model_paginated_prompt_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedPromptList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedPromptList{} + // PaginatedPromptList struct for PaginatedPromptList type PaginatedPromptList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedPromptList) SetResults(v []Prompt) { } func (o PaginatedPromptList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedPromptList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedPromptList struct { value *PaginatedPromptList isSet bool diff --git a/model_paginated_prompt_stage_list.go b/model_paginated_prompt_stage_list.go index a8975abff..2b6824180 100644 --- a/model_paginated_prompt_stage_list.go +++ b/model_paginated_prompt_stage_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedPromptStageList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedPromptStageList{} + // PaginatedPromptStageList struct for PaginatedPromptStageList type PaginatedPromptStageList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedPromptStageList) SetResults(v []PromptStage) { } func (o PaginatedPromptStageList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedPromptStageList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedPromptStageList struct { value *PaginatedPromptStageList isSet bool diff --git a/model_paginated_property_mapping_list.go b/model_paginated_property_mapping_list.go index ae87dee6f..7c6df8cf1 100644 --- a/model_paginated_property_mapping_list.go +++ b/model_paginated_property_mapping_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedPropertyMappingList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedPropertyMappingList{} + // PaginatedPropertyMappingList struct for PaginatedPropertyMappingList type PaginatedPropertyMappingList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedPropertyMappingList) SetResults(v []PropertyMapping) { } func (o PaginatedPropertyMappingList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedPropertyMappingList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedPropertyMappingList struct { value *PaginatedPropertyMappingList isSet bool diff --git a/model_paginated_provider_list.go b/model_paginated_provider_list.go index de29c53fd..7e88993c6 100644 --- a/model_paginated_provider_list.go +++ b/model_paginated_provider_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedProviderList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedProviderList{} + // PaginatedProviderList struct for PaginatedProviderList type PaginatedProviderList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedProviderList) SetResults(v []Provider) { } func (o PaginatedProviderList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedProviderList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedProviderList struct { value *PaginatedProviderList isSet bool diff --git a/model_paginated_proxy_outpost_config_list.go b/model_paginated_proxy_outpost_config_list.go index 573f963c6..2f1b7459e 100644 --- a/model_paginated_proxy_outpost_config_list.go +++ b/model_paginated_proxy_outpost_config_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedProxyOutpostConfigList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedProxyOutpostConfigList{} + // PaginatedProxyOutpostConfigList struct for PaginatedProxyOutpostConfigList type PaginatedProxyOutpostConfigList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedProxyOutpostConfigList) SetResults(v []ProxyOutpostConfig) { } func (o PaginatedProxyOutpostConfigList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedProxyOutpostConfigList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedProxyOutpostConfigList struct { value *PaginatedProxyOutpostConfigList isSet bool diff --git a/model_paginated_proxy_provider_list.go b/model_paginated_proxy_provider_list.go index 0badb3802..bc35095dc 100644 --- a/model_paginated_proxy_provider_list.go +++ b/model_paginated_proxy_provider_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedProxyProviderList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedProxyProviderList{} + // PaginatedProxyProviderList struct for PaginatedProxyProviderList type PaginatedProxyProviderList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedProxyProviderList) SetResults(v []ProxyProvider) { } func (o PaginatedProxyProviderList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedProxyProviderList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedProxyProviderList struct { value *PaginatedProxyProviderList isSet bool diff --git a/model_paginated_radius_outpost_config_list.go b/model_paginated_radius_outpost_config_list.go index 763a8f6d9..9bbc08546 100644 --- a/model_paginated_radius_outpost_config_list.go +++ b/model_paginated_radius_outpost_config_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedRadiusOutpostConfigList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedRadiusOutpostConfigList{} + // PaginatedRadiusOutpostConfigList struct for PaginatedRadiusOutpostConfigList type PaginatedRadiusOutpostConfigList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedRadiusOutpostConfigList) SetResults(v []RadiusOutpostConfig) { } func (o PaginatedRadiusOutpostConfigList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedRadiusOutpostConfigList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedRadiusOutpostConfigList struct { value *PaginatedRadiusOutpostConfigList isSet bool diff --git a/model_paginated_radius_provider_list.go b/model_paginated_radius_provider_list.go index b492c6e47..aa91031bb 100644 --- a/model_paginated_radius_provider_list.go +++ b/model_paginated_radius_provider_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedRadiusProviderList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedRadiusProviderList{} + // PaginatedRadiusProviderList struct for PaginatedRadiusProviderList type PaginatedRadiusProviderList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedRadiusProviderList) SetResults(v []RadiusProvider) { } func (o PaginatedRadiusProviderList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedRadiusProviderList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedRadiusProviderList struct { value *PaginatedRadiusProviderList isSet bool diff --git a/model_paginated_reputation_list.go b/model_paginated_reputation_list.go index 05488fb9b..fbaa2f023 100644 --- a/model_paginated_reputation_list.go +++ b/model_paginated_reputation_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedReputationList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedReputationList{} + // PaginatedReputationList struct for PaginatedReputationList type PaginatedReputationList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedReputationList) SetResults(v []Reputation) { } func (o PaginatedReputationList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedReputationList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedReputationList struct { value *PaginatedReputationList isSet bool diff --git a/model_paginated_reputation_policy_list.go b/model_paginated_reputation_policy_list.go index a13877828..3508ca3e2 100644 --- a/model_paginated_reputation_policy_list.go +++ b/model_paginated_reputation_policy_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedReputationPolicyList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedReputationPolicyList{} + // PaginatedReputationPolicyList struct for PaginatedReputationPolicyList type PaginatedReputationPolicyList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedReputationPolicyList) SetResults(v []ReputationPolicy) { } func (o PaginatedReputationPolicyList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedReputationPolicyList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedReputationPolicyList struct { value *PaginatedReputationPolicyList isSet bool diff --git a/model_paginated_saml_property_mapping_list.go b/model_paginated_saml_property_mapping_list.go index 28791876e..128722bee 100644 --- a/model_paginated_saml_property_mapping_list.go +++ b/model_paginated_saml_property_mapping_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedSAMLPropertyMappingList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedSAMLPropertyMappingList{} + // PaginatedSAMLPropertyMappingList struct for PaginatedSAMLPropertyMappingList type PaginatedSAMLPropertyMappingList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedSAMLPropertyMappingList) SetResults(v []SAMLPropertyMapping) { } func (o PaginatedSAMLPropertyMappingList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedSAMLPropertyMappingList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedSAMLPropertyMappingList struct { value *PaginatedSAMLPropertyMappingList isSet bool diff --git a/model_paginated_saml_provider_list.go b/model_paginated_saml_provider_list.go index 910d97ee9..4f67f266b 100644 --- a/model_paginated_saml_provider_list.go +++ b/model_paginated_saml_provider_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedSAMLProviderList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedSAMLProviderList{} + // PaginatedSAMLProviderList struct for PaginatedSAMLProviderList type PaginatedSAMLProviderList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedSAMLProviderList) SetResults(v []SAMLProvider) { } func (o PaginatedSAMLProviderList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedSAMLProviderList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedSAMLProviderList struct { value *PaginatedSAMLProviderList isSet bool diff --git a/model_paginated_saml_source_list.go b/model_paginated_saml_source_list.go index 9a76b0609..795b1362f 100644 --- a/model_paginated_saml_source_list.go +++ b/model_paginated_saml_source_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedSAMLSourceList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedSAMLSourceList{} + // PaginatedSAMLSourceList struct for PaginatedSAMLSourceList type PaginatedSAMLSourceList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedSAMLSourceList) SetResults(v []SAMLSource) { } func (o PaginatedSAMLSourceList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedSAMLSourceList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedSAMLSourceList struct { value *PaginatedSAMLSourceList isSet bool diff --git a/model_paginated_scim_mapping_list.go b/model_paginated_scim_mapping_list.go index 06c5eb978..aad568c79 100644 --- a/model_paginated_scim_mapping_list.go +++ b/model_paginated_scim_mapping_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedSCIMMappingList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedSCIMMappingList{} + // PaginatedSCIMMappingList struct for PaginatedSCIMMappingList type PaginatedSCIMMappingList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedSCIMMappingList) SetResults(v []SCIMMapping) { } func (o PaginatedSCIMMappingList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedSCIMMappingList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedSCIMMappingList struct { value *PaginatedSCIMMappingList isSet bool diff --git a/model_paginated_scim_provider_list.go b/model_paginated_scim_provider_list.go index 4e35b0edd..e08471987 100644 --- a/model_paginated_scim_provider_list.go +++ b/model_paginated_scim_provider_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedSCIMProviderList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedSCIMProviderList{} + // PaginatedSCIMProviderList struct for PaginatedSCIMProviderList type PaginatedSCIMProviderList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedSCIMProviderList) SetResults(v []SCIMProvider) { } func (o PaginatedSCIMProviderList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedSCIMProviderList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedSCIMProviderList struct { value *PaginatedSCIMProviderList isSet bool diff --git a/model_paginated_scope_mapping_list.go b/model_paginated_scope_mapping_list.go index 6ef2422b4..f13496bf4 100644 --- a/model_paginated_scope_mapping_list.go +++ b/model_paginated_scope_mapping_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedScopeMappingList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedScopeMappingList{} + // PaginatedScopeMappingList struct for PaginatedScopeMappingList type PaginatedScopeMappingList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedScopeMappingList) SetResults(v []ScopeMapping) { } func (o PaginatedScopeMappingList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedScopeMappingList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedScopeMappingList struct { value *PaginatedScopeMappingList isSet bool diff --git a/model_paginated_service_connection_list.go b/model_paginated_service_connection_list.go index e27b33e0b..ca9dc4024 100644 --- a/model_paginated_service_connection_list.go +++ b/model_paginated_service_connection_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedServiceConnectionList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedServiceConnectionList{} + // PaginatedServiceConnectionList struct for PaginatedServiceConnectionList type PaginatedServiceConnectionList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedServiceConnectionList) SetResults(v []ServiceConnection) { } func (o PaginatedServiceConnectionList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedServiceConnectionList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedServiceConnectionList struct { value *PaginatedServiceConnectionList isSet bool diff --git a/model_paginated_sms_device_list.go b/model_paginated_sms_device_list.go index 38f46f53e..045cc6278 100644 --- a/model_paginated_sms_device_list.go +++ b/model_paginated_sms_device_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedSMSDeviceList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedSMSDeviceList{} + // PaginatedSMSDeviceList struct for PaginatedSMSDeviceList type PaginatedSMSDeviceList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedSMSDeviceList) SetResults(v []SMSDevice) { } func (o PaginatedSMSDeviceList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedSMSDeviceList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedSMSDeviceList struct { value *PaginatedSMSDeviceList isSet bool diff --git a/model_paginated_source_list.go b/model_paginated_source_list.go index 7b116d5dd..535adde4b 100644 --- a/model_paginated_source_list.go +++ b/model_paginated_source_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedSourceList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedSourceList{} + // PaginatedSourceList struct for PaginatedSourceList type PaginatedSourceList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedSourceList) SetResults(v []Source) { } func (o PaginatedSourceList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedSourceList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedSourceList struct { value *PaginatedSourceList isSet bool diff --git a/model_paginated_stage_list.go b/model_paginated_stage_list.go index df5af95c0..30651ba62 100644 --- a/model_paginated_stage_list.go +++ b/model_paginated_stage_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedStageList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedStageList{} + // PaginatedStageList struct for PaginatedStageList type PaginatedStageList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedStageList) SetResults(v []Stage) { } func (o PaginatedStageList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedStageList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedStageList struct { value *PaginatedStageList isSet bool diff --git a/model_paginated_static_device_list.go b/model_paginated_static_device_list.go index 7c40331a5..179f4bee2 100644 --- a/model_paginated_static_device_list.go +++ b/model_paginated_static_device_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedStaticDeviceList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedStaticDeviceList{} + // PaginatedStaticDeviceList struct for PaginatedStaticDeviceList type PaginatedStaticDeviceList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedStaticDeviceList) SetResults(v []StaticDevice) { } func (o PaginatedStaticDeviceList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedStaticDeviceList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedStaticDeviceList struct { value *PaginatedStaticDeviceList isSet bool diff --git a/model_paginated_tenant_list.go b/model_paginated_tenant_list.go index 6fb4c81f5..a9fe24144 100644 --- a/model_paginated_tenant_list.go +++ b/model_paginated_tenant_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedTenantList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedTenantList{} + // PaginatedTenantList struct for PaginatedTenantList type PaginatedTenantList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedTenantList) SetResults(v []Tenant) { } func (o PaginatedTenantList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedTenantList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedTenantList struct { value *PaginatedTenantList isSet bool diff --git a/model_paginated_token_list.go b/model_paginated_token_list.go index 7c8af38cb..191adc5e0 100644 --- a/model_paginated_token_list.go +++ b/model_paginated_token_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedTokenList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedTokenList{} + // PaginatedTokenList struct for PaginatedTokenList type PaginatedTokenList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedTokenList) SetResults(v []Token) { } func (o PaginatedTokenList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedTokenList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedTokenList struct { value *PaginatedTokenList isSet bool diff --git a/model_paginated_token_model_list.go b/model_paginated_token_model_list.go index 4070e2c35..447ae3d73 100644 --- a/model_paginated_token_model_list.go +++ b/model_paginated_token_model_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedTokenModelList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedTokenModelList{} + // PaginatedTokenModelList struct for PaginatedTokenModelList type PaginatedTokenModelList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedTokenModelList) SetResults(v []TokenModel) { } func (o PaginatedTokenModelList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedTokenModelList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedTokenModelList struct { value *PaginatedTokenModelList isSet bool diff --git a/model_paginated_totp_device_list.go b/model_paginated_totp_device_list.go index 1aa63a582..b9125429e 100644 --- a/model_paginated_totp_device_list.go +++ b/model_paginated_totp_device_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedTOTPDeviceList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedTOTPDeviceList{} + // PaginatedTOTPDeviceList struct for PaginatedTOTPDeviceList type PaginatedTOTPDeviceList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedTOTPDeviceList) SetResults(v []TOTPDevice) { } func (o PaginatedTOTPDeviceList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedTOTPDeviceList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedTOTPDeviceList struct { value *PaginatedTOTPDeviceList isSet bool diff --git a/model_paginated_user_consent_list.go b/model_paginated_user_consent_list.go index 6f98ac5e7..a2a439f14 100644 --- a/model_paginated_user_consent_list.go +++ b/model_paginated_user_consent_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedUserConsentList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedUserConsentList{} + // PaginatedUserConsentList struct for PaginatedUserConsentList type PaginatedUserConsentList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedUserConsentList) SetResults(v []UserConsent) { } func (o PaginatedUserConsentList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedUserConsentList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedUserConsentList struct { value *PaginatedUserConsentList isSet bool diff --git a/model_paginated_user_delete_stage_list.go b/model_paginated_user_delete_stage_list.go index d31c0e9f4..f9dd40fda 100644 --- a/model_paginated_user_delete_stage_list.go +++ b/model_paginated_user_delete_stage_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedUserDeleteStageList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedUserDeleteStageList{} + // PaginatedUserDeleteStageList struct for PaginatedUserDeleteStageList type PaginatedUserDeleteStageList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedUserDeleteStageList) SetResults(v []UserDeleteStage) { } func (o PaginatedUserDeleteStageList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedUserDeleteStageList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedUserDeleteStageList struct { value *PaginatedUserDeleteStageList isSet bool diff --git a/model_paginated_user_list.go b/model_paginated_user_list.go index fb45f60eb..6a490bea6 100644 --- a/model_paginated_user_list.go +++ b/model_paginated_user_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedUserList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedUserList{} + // PaginatedUserList struct for PaginatedUserList type PaginatedUserList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedUserList) SetResults(v []User) { } func (o PaginatedUserList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedUserList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedUserList struct { value *PaginatedUserList isSet bool diff --git a/model_paginated_user_login_stage_list.go b/model_paginated_user_login_stage_list.go index 0db078106..9b5ec7426 100644 --- a/model_paginated_user_login_stage_list.go +++ b/model_paginated_user_login_stage_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedUserLoginStageList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedUserLoginStageList{} + // PaginatedUserLoginStageList struct for PaginatedUserLoginStageList type PaginatedUserLoginStageList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedUserLoginStageList) SetResults(v []UserLoginStage) { } func (o PaginatedUserLoginStageList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedUserLoginStageList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedUserLoginStageList struct { value *PaginatedUserLoginStageList isSet bool diff --git a/model_paginated_user_logout_stage_list.go b/model_paginated_user_logout_stage_list.go index f6b57d787..e4046b8fe 100644 --- a/model_paginated_user_logout_stage_list.go +++ b/model_paginated_user_logout_stage_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedUserLogoutStageList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedUserLogoutStageList{} + // PaginatedUserLogoutStageList struct for PaginatedUserLogoutStageList type PaginatedUserLogoutStageList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedUserLogoutStageList) SetResults(v []UserLogoutStage) { } func (o PaginatedUserLogoutStageList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedUserLogoutStageList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedUserLogoutStageList struct { value *PaginatedUserLogoutStageList isSet bool diff --git a/model_paginated_user_o_auth_source_connection_list.go b/model_paginated_user_o_auth_source_connection_list.go index e327e4d2d..0e1eb7a77 100644 --- a/model_paginated_user_o_auth_source_connection_list.go +++ b/model_paginated_user_o_auth_source_connection_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedUserOAuthSourceConnectionList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedUserOAuthSourceConnectionList{} + // PaginatedUserOAuthSourceConnectionList struct for PaginatedUserOAuthSourceConnectionList type PaginatedUserOAuthSourceConnectionList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedUserOAuthSourceConnectionList) SetResults(v []UserOAuthSourceC } func (o PaginatedUserOAuthSourceConnectionList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedUserOAuthSourceConnectionList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedUserOAuthSourceConnectionList struct { value *PaginatedUserOAuthSourceConnectionList isSet bool diff --git a/model_paginated_user_saml_source_connection_list.go b/model_paginated_user_saml_source_connection_list.go index dacf02fdc..1cf7a6cce 100644 --- a/model_paginated_user_saml_source_connection_list.go +++ b/model_paginated_user_saml_source_connection_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedUserSAMLSourceConnectionList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedUserSAMLSourceConnectionList{} + // PaginatedUserSAMLSourceConnectionList struct for PaginatedUserSAMLSourceConnectionList type PaginatedUserSAMLSourceConnectionList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedUserSAMLSourceConnectionList) SetResults(v []UserSAMLSourceCon } func (o PaginatedUserSAMLSourceConnectionList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedUserSAMLSourceConnectionList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedUserSAMLSourceConnectionList struct { value *PaginatedUserSAMLSourceConnectionList isSet bool diff --git a/model_paginated_user_source_connection_list.go b/model_paginated_user_source_connection_list.go index b10acd37a..ddd0a6c38 100644 --- a/model_paginated_user_source_connection_list.go +++ b/model_paginated_user_source_connection_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedUserSourceConnectionList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedUserSourceConnectionList{} + // PaginatedUserSourceConnectionList struct for PaginatedUserSourceConnectionList type PaginatedUserSourceConnectionList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedUserSourceConnectionList) SetResults(v []UserSourceConnection) } func (o PaginatedUserSourceConnectionList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedUserSourceConnectionList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedUserSourceConnectionList struct { value *PaginatedUserSourceConnectionList isSet bool diff --git a/model_paginated_user_write_stage_list.go b/model_paginated_user_write_stage_list.go index bcf74a580..0513a2954 100644 --- a/model_paginated_user_write_stage_list.go +++ b/model_paginated_user_write_stage_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedUserWriteStageList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedUserWriteStageList{} + // PaginatedUserWriteStageList struct for PaginatedUserWriteStageList type PaginatedUserWriteStageList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedUserWriteStageList) SetResults(v []UserWriteStage) { } func (o PaginatedUserWriteStageList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedUserWriteStageList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedUserWriteStageList struct { value *PaginatedUserWriteStageList isSet bool diff --git a/model_paginated_web_authn_device_list.go b/model_paginated_web_authn_device_list.go index 01e4b8e02..28a135038 100644 --- a/model_paginated_web_authn_device_list.go +++ b/model_paginated_web_authn_device_list.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaginatedWebAuthnDeviceList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedWebAuthnDeviceList{} + // PaginatedWebAuthnDeviceList struct for PaginatedWebAuthnDeviceList type PaginatedWebAuthnDeviceList struct { Pagination PaginatedApplicationListPagination `json:"pagination"` @@ -89,16 +92,20 @@ func (o *PaginatedWebAuthnDeviceList) SetResults(v []WebAuthnDevice) { } func (o PaginatedWebAuthnDeviceList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pagination"] = o.Pagination - } - if true { - toSerialize["results"] = o.Results + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PaginatedWebAuthnDeviceList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["results"] = o.Results + return toSerialize, nil +} + type NullablePaginatedWebAuthnDeviceList struct { value *PaginatedWebAuthnDeviceList isSet bool diff --git a/model_password_challenge.go b/model_password_challenge.go index b89bd57fe..96deea397 100644 --- a/model_password_challenge.go +++ b/model_password_challenge.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PasswordChallenge type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PasswordChallenge{} + // PasswordChallenge Password challenge UI fields type PasswordChallenge struct { Type ChallengeChoices `json:"type"` @@ -76,7 +79,7 @@ func (o *PasswordChallenge) SetType(v ChallengeChoices) { // GetFlowInfo returns the FlowInfo field value if set, zero value otherwise. func (o *PasswordChallenge) GetFlowInfo() ContextualFlowInfo { - if o == nil || o.FlowInfo == nil { + if o == nil || IsNil(o.FlowInfo) { var ret ContextualFlowInfo return ret } @@ -86,7 +89,7 @@ func (o *PasswordChallenge) GetFlowInfo() ContextualFlowInfo { // GetFlowInfoOk returns a tuple with the FlowInfo field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PasswordChallenge) GetFlowInfoOk() (*ContextualFlowInfo, bool) { - if o == nil || o.FlowInfo == nil { + if o == nil || IsNil(o.FlowInfo) { return nil, false } return o.FlowInfo, true @@ -94,7 +97,7 @@ func (o *PasswordChallenge) GetFlowInfoOk() (*ContextualFlowInfo, bool) { // HasFlowInfo returns a boolean if a field has been set. func (o *PasswordChallenge) HasFlowInfo() bool { - if o != nil && o.FlowInfo != nil { + if o != nil && !IsNil(o.FlowInfo) { return true } @@ -108,7 +111,7 @@ func (o *PasswordChallenge) SetFlowInfo(v ContextualFlowInfo) { // GetComponent returns the Component field value if set, zero value otherwise. func (o *PasswordChallenge) GetComponent() string { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { var ret string return ret } @@ -118,7 +121,7 @@ func (o *PasswordChallenge) GetComponent() string { // GetComponentOk returns a tuple with the Component field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PasswordChallenge) GetComponentOk() (*string, bool) { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { return nil, false } return o.Component, true @@ -126,7 +129,7 @@ func (o *PasswordChallenge) GetComponentOk() (*string, bool) { // HasComponent returns a boolean if a field has been set. func (o *PasswordChallenge) HasComponent() bool { - if o != nil && o.Component != nil { + if o != nil && !IsNil(o.Component) { return true } @@ -140,7 +143,7 @@ func (o *PasswordChallenge) SetComponent(v string) { // GetResponseErrors returns the ResponseErrors field value if set, zero value otherwise. func (o *PasswordChallenge) GetResponseErrors() map[string][]ErrorDetail { - if o == nil || o.ResponseErrors == nil { + if o == nil || IsNil(o.ResponseErrors) { var ret map[string][]ErrorDetail return ret } @@ -150,7 +153,7 @@ func (o *PasswordChallenge) GetResponseErrors() map[string][]ErrorDetail { // GetResponseErrorsOk returns a tuple with the ResponseErrors field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PasswordChallenge) GetResponseErrorsOk() (*map[string][]ErrorDetail, bool) { - if o == nil || o.ResponseErrors == nil { + if o == nil || IsNil(o.ResponseErrors) { return nil, false } return o.ResponseErrors, true @@ -158,7 +161,7 @@ func (o *PasswordChallenge) GetResponseErrorsOk() (*map[string][]ErrorDetail, bo // HasResponseErrors returns a boolean if a field has been set. func (o *PasswordChallenge) HasResponseErrors() bool { - if o != nil && o.ResponseErrors != nil { + if o != nil && !IsNil(o.ResponseErrors) { return true } @@ -220,7 +223,7 @@ func (o *PasswordChallenge) SetPendingUserAvatar(v string) { // GetRecoveryUrl returns the RecoveryUrl field value if set, zero value otherwise. func (o *PasswordChallenge) GetRecoveryUrl() string { - if o == nil || o.RecoveryUrl == nil { + if o == nil || IsNil(o.RecoveryUrl) { var ret string return ret } @@ -230,7 +233,7 @@ func (o *PasswordChallenge) GetRecoveryUrl() string { // GetRecoveryUrlOk returns a tuple with the RecoveryUrl field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PasswordChallenge) GetRecoveryUrlOk() (*string, bool) { - if o == nil || o.RecoveryUrl == nil { + if o == nil || IsNil(o.RecoveryUrl) { return nil, false } return o.RecoveryUrl, true @@ -238,7 +241,7 @@ func (o *PasswordChallenge) GetRecoveryUrlOk() (*string, bool) { // HasRecoveryUrl returns a boolean if a field has been set. func (o *PasswordChallenge) HasRecoveryUrl() bool { - if o != nil && o.RecoveryUrl != nil { + if o != nil && !IsNil(o.RecoveryUrl) { return true } @@ -251,29 +254,31 @@ func (o *PasswordChallenge) SetRecoveryUrl(v string) { } func (o PasswordChallenge) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["type"] = o.Type + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.FlowInfo != nil { + return json.Marshal(toSerialize) +} + +func (o PasswordChallenge) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + if !IsNil(o.FlowInfo) { toSerialize["flow_info"] = o.FlowInfo } - if o.Component != nil { + if !IsNil(o.Component) { toSerialize["component"] = o.Component } - if o.ResponseErrors != nil { + if !IsNil(o.ResponseErrors) { toSerialize["response_errors"] = o.ResponseErrors } - if true { - toSerialize["pending_user"] = o.PendingUser - } - if true { - toSerialize["pending_user_avatar"] = o.PendingUserAvatar - } - if o.RecoveryUrl != nil { + toSerialize["pending_user"] = o.PendingUser + toSerialize["pending_user_avatar"] = o.PendingUserAvatar + if !IsNil(o.RecoveryUrl) { toSerialize["recovery_url"] = o.RecoveryUrl } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePasswordChallenge struct { diff --git a/model_password_challenge_response_request.go b/model_password_challenge_response_request.go index f19f459b1..55244950f 100644 --- a/model_password_challenge_response_request.go +++ b/model_password_challenge_response_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PasswordChallengeResponseRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PasswordChallengeResponseRequest{} + // PasswordChallengeResponseRequest Password challenge response type PasswordChallengeResponseRequest struct { Component *string `json:"component,omitempty"` @@ -45,7 +48,7 @@ func NewPasswordChallengeResponseRequestWithDefaults() *PasswordChallengeRespons // GetComponent returns the Component field value if set, zero value otherwise. func (o *PasswordChallengeResponseRequest) GetComponent() string { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { var ret string return ret } @@ -55,7 +58,7 @@ func (o *PasswordChallengeResponseRequest) GetComponent() string { // GetComponentOk returns a tuple with the Component field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PasswordChallengeResponseRequest) GetComponentOk() (*string, bool) { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { return nil, false } return o.Component, true @@ -63,7 +66,7 @@ func (o *PasswordChallengeResponseRequest) GetComponentOk() (*string, bool) { // HasComponent returns a boolean if a field has been set. func (o *PasswordChallengeResponseRequest) HasComponent() bool { - if o != nil && o.Component != nil { + if o != nil && !IsNil(o.Component) { return true } @@ -100,14 +103,20 @@ func (o *PasswordChallengeResponseRequest) SetPassword(v string) { } func (o PasswordChallengeResponseRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PasswordChallengeResponseRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Component != nil { + if !IsNil(o.Component) { toSerialize["component"] = o.Component } - if true { - toSerialize["password"] = o.Password - } - return json.Marshal(toSerialize) + toSerialize["password"] = o.Password + return toSerialize, nil } type NullablePasswordChallengeResponseRequest struct { diff --git a/model_password_expiry_policy.go b/model_password_expiry_policy.go index cba186ea5..615b5d25f 100644 --- a/model_password_expiry_policy.go +++ b/model_password_expiry_policy.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PasswordExpiryPolicy type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PasswordExpiryPolicy{} + // PasswordExpiryPolicy Password Expiry Policy Serializer type PasswordExpiryPolicy struct { Pk string `json:"pk"` @@ -110,7 +113,7 @@ func (o *PasswordExpiryPolicy) SetName(v string) { // GetExecutionLogging returns the ExecutionLogging field value if set, zero value otherwise. func (o *PasswordExpiryPolicy) GetExecutionLogging() bool { - if o == nil || o.ExecutionLogging == nil { + if o == nil || IsNil(o.ExecutionLogging) { var ret bool return ret } @@ -120,7 +123,7 @@ func (o *PasswordExpiryPolicy) GetExecutionLogging() bool { // GetExecutionLoggingOk returns a tuple with the ExecutionLogging field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PasswordExpiryPolicy) GetExecutionLoggingOk() (*bool, bool) { - if o == nil || o.ExecutionLogging == nil { + if o == nil || IsNil(o.ExecutionLogging) { return nil, false } return o.ExecutionLogging, true @@ -128,7 +131,7 @@ func (o *PasswordExpiryPolicy) GetExecutionLoggingOk() (*bool, bool) { // HasExecutionLogging returns a boolean if a field has been set. func (o *PasswordExpiryPolicy) HasExecutionLogging() bool { - if o != nil && o.ExecutionLogging != nil { + if o != nil && !IsNil(o.ExecutionLogging) { return true } @@ -286,7 +289,7 @@ func (o *PasswordExpiryPolicy) SetDays(v int32) { // GetDenyOnly returns the DenyOnly field value if set, zero value otherwise. func (o *PasswordExpiryPolicy) GetDenyOnly() bool { - if o == nil || o.DenyOnly == nil { + if o == nil || IsNil(o.DenyOnly) { var ret bool return ret } @@ -296,7 +299,7 @@ func (o *PasswordExpiryPolicy) GetDenyOnly() bool { // GetDenyOnlyOk returns a tuple with the DenyOnly field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PasswordExpiryPolicy) GetDenyOnlyOk() (*bool, bool) { - if o == nil || o.DenyOnly == nil { + if o == nil || IsNil(o.DenyOnly) { return nil, false } return o.DenyOnly, true @@ -304,7 +307,7 @@ func (o *PasswordExpiryPolicy) GetDenyOnlyOk() (*bool, bool) { // HasDenyOnly returns a boolean if a field has been set. func (o *PasswordExpiryPolicy) HasDenyOnly() bool { - if o != nil && o.DenyOnly != nil { + if o != nil && !IsNil(o.DenyOnly) { return true } @@ -317,38 +320,30 @@ func (o *PasswordExpiryPolicy) SetDenyOnly(v bool) { } func (o PasswordExpiryPolicy) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if true { - toSerialize["name"] = o.Name - } - if o.ExecutionLogging != nil { + return json.Marshal(toSerialize) +} + +func (o PasswordExpiryPolicy) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name + if !IsNil(o.ExecutionLogging) { toSerialize["execution_logging"] = o.ExecutionLogging } - if true { - toSerialize["component"] = o.Component - } - if true { - toSerialize["verbose_name"] = o.VerboseName - } - if true { - toSerialize["verbose_name_plural"] = o.VerboseNamePlural - } - if true { - toSerialize["meta_model_name"] = o.MetaModelName - } - if true { - toSerialize["bound_to"] = o.BoundTo - } - if true { - toSerialize["days"] = o.Days - } - if o.DenyOnly != nil { + // skip: component is readOnly + // skip: verbose_name is readOnly + // skip: verbose_name_plural is readOnly + // skip: meta_model_name is readOnly + // skip: bound_to is readOnly + toSerialize["days"] = o.Days + if !IsNil(o.DenyOnly) { toSerialize["deny_only"] = o.DenyOnly } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePasswordExpiryPolicy struct { diff --git a/model_password_expiry_policy_request.go b/model_password_expiry_policy_request.go index 6c2d9c968..338fa8324 100644 --- a/model_password_expiry_policy_request.go +++ b/model_password_expiry_policy_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PasswordExpiryPolicyRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PasswordExpiryPolicyRequest{} + // PasswordExpiryPolicyRequest Password Expiry Policy Serializer type PasswordExpiryPolicyRequest struct { Name string `json:"name"` @@ -69,7 +72,7 @@ func (o *PasswordExpiryPolicyRequest) SetName(v string) { // GetExecutionLogging returns the ExecutionLogging field value if set, zero value otherwise. func (o *PasswordExpiryPolicyRequest) GetExecutionLogging() bool { - if o == nil || o.ExecutionLogging == nil { + if o == nil || IsNil(o.ExecutionLogging) { var ret bool return ret } @@ -79,7 +82,7 @@ func (o *PasswordExpiryPolicyRequest) GetExecutionLogging() bool { // GetExecutionLoggingOk returns a tuple with the ExecutionLogging field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PasswordExpiryPolicyRequest) GetExecutionLoggingOk() (*bool, bool) { - if o == nil || o.ExecutionLogging == nil { + if o == nil || IsNil(o.ExecutionLogging) { return nil, false } return o.ExecutionLogging, true @@ -87,7 +90,7 @@ func (o *PasswordExpiryPolicyRequest) GetExecutionLoggingOk() (*bool, bool) { // HasExecutionLogging returns a boolean if a field has been set. func (o *PasswordExpiryPolicyRequest) HasExecutionLogging() bool { - if o != nil && o.ExecutionLogging != nil { + if o != nil && !IsNil(o.ExecutionLogging) { return true } @@ -125,7 +128,7 @@ func (o *PasswordExpiryPolicyRequest) SetDays(v int32) { // GetDenyOnly returns the DenyOnly field value if set, zero value otherwise. func (o *PasswordExpiryPolicyRequest) GetDenyOnly() bool { - if o == nil || o.DenyOnly == nil { + if o == nil || IsNil(o.DenyOnly) { var ret bool return ret } @@ -135,7 +138,7 @@ func (o *PasswordExpiryPolicyRequest) GetDenyOnly() bool { // GetDenyOnlyOk returns a tuple with the DenyOnly field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PasswordExpiryPolicyRequest) GetDenyOnlyOk() (*bool, bool) { - if o == nil || o.DenyOnly == nil { + if o == nil || IsNil(o.DenyOnly) { return nil, false } return o.DenyOnly, true @@ -143,7 +146,7 @@ func (o *PasswordExpiryPolicyRequest) GetDenyOnlyOk() (*bool, bool) { // HasDenyOnly returns a boolean if a field has been set. func (o *PasswordExpiryPolicyRequest) HasDenyOnly() bool { - if o != nil && o.DenyOnly != nil { + if o != nil && !IsNil(o.DenyOnly) { return true } @@ -156,20 +159,24 @@ func (o *PasswordExpiryPolicyRequest) SetDenyOnly(v bool) { } func (o PasswordExpiryPolicyRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.ExecutionLogging != nil { + return json.Marshal(toSerialize) +} + +func (o PasswordExpiryPolicyRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.ExecutionLogging) { toSerialize["execution_logging"] = o.ExecutionLogging } - if true { - toSerialize["days"] = o.Days - } - if o.DenyOnly != nil { + toSerialize["days"] = o.Days + if !IsNil(o.DenyOnly) { toSerialize["deny_only"] = o.DenyOnly } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePasswordExpiryPolicyRequest struct { diff --git a/model_password_policy.go b/model_password_policy.go index 15a793eaa..e0078d8b4 100644 --- a/model_password_policy.go +++ b/model_password_policy.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PasswordPolicy type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PasswordPolicy{} + // PasswordPolicy Password Policy Serializer type PasswordPolicy struct { Pk string `json:"pk"` @@ -123,7 +126,7 @@ func (o *PasswordPolicy) SetName(v string) { // GetExecutionLogging returns the ExecutionLogging field value if set, zero value otherwise. func (o *PasswordPolicy) GetExecutionLogging() bool { - if o == nil || o.ExecutionLogging == nil { + if o == nil || IsNil(o.ExecutionLogging) { var ret bool return ret } @@ -133,7 +136,7 @@ func (o *PasswordPolicy) GetExecutionLogging() bool { // GetExecutionLoggingOk returns a tuple with the ExecutionLogging field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PasswordPolicy) GetExecutionLoggingOk() (*bool, bool) { - if o == nil || o.ExecutionLogging == nil { + if o == nil || IsNil(o.ExecutionLogging) { return nil, false } return o.ExecutionLogging, true @@ -141,7 +144,7 @@ func (o *PasswordPolicy) GetExecutionLoggingOk() (*bool, bool) { // HasExecutionLogging returns a boolean if a field has been set. func (o *PasswordPolicy) HasExecutionLogging() bool { - if o != nil && o.ExecutionLogging != nil { + if o != nil && !IsNil(o.ExecutionLogging) { return true } @@ -275,7 +278,7 @@ func (o *PasswordPolicy) SetBoundTo(v int32) { // GetPasswordField returns the PasswordField field value if set, zero value otherwise. func (o *PasswordPolicy) GetPasswordField() string { - if o == nil || o.PasswordField == nil { + if o == nil || IsNil(o.PasswordField) { var ret string return ret } @@ -285,7 +288,7 @@ func (o *PasswordPolicy) GetPasswordField() string { // GetPasswordFieldOk returns a tuple with the PasswordField field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PasswordPolicy) GetPasswordFieldOk() (*string, bool) { - if o == nil || o.PasswordField == nil { + if o == nil || IsNil(o.PasswordField) { return nil, false } return o.PasswordField, true @@ -293,7 +296,7 @@ func (o *PasswordPolicy) GetPasswordFieldOk() (*string, bool) { // HasPasswordField returns a boolean if a field has been set. func (o *PasswordPolicy) HasPasswordField() bool { - if o != nil && o.PasswordField != nil { + if o != nil && !IsNil(o.PasswordField) { return true } @@ -307,7 +310,7 @@ func (o *PasswordPolicy) SetPasswordField(v string) { // GetAmountDigits returns the AmountDigits field value if set, zero value otherwise. func (o *PasswordPolicy) GetAmountDigits() int32 { - if o == nil || o.AmountDigits == nil { + if o == nil || IsNil(o.AmountDigits) { var ret int32 return ret } @@ -317,7 +320,7 @@ func (o *PasswordPolicy) GetAmountDigits() int32 { // GetAmountDigitsOk returns a tuple with the AmountDigits field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PasswordPolicy) GetAmountDigitsOk() (*int32, bool) { - if o == nil || o.AmountDigits == nil { + if o == nil || IsNil(o.AmountDigits) { return nil, false } return o.AmountDigits, true @@ -325,7 +328,7 @@ func (o *PasswordPolicy) GetAmountDigitsOk() (*int32, bool) { // HasAmountDigits returns a boolean if a field has been set. func (o *PasswordPolicy) HasAmountDigits() bool { - if o != nil && o.AmountDigits != nil { + if o != nil && !IsNil(o.AmountDigits) { return true } @@ -339,7 +342,7 @@ func (o *PasswordPolicy) SetAmountDigits(v int32) { // GetAmountUppercase returns the AmountUppercase field value if set, zero value otherwise. func (o *PasswordPolicy) GetAmountUppercase() int32 { - if o == nil || o.AmountUppercase == nil { + if o == nil || IsNil(o.AmountUppercase) { var ret int32 return ret } @@ -349,7 +352,7 @@ func (o *PasswordPolicy) GetAmountUppercase() int32 { // GetAmountUppercaseOk returns a tuple with the AmountUppercase field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PasswordPolicy) GetAmountUppercaseOk() (*int32, bool) { - if o == nil || o.AmountUppercase == nil { + if o == nil || IsNil(o.AmountUppercase) { return nil, false } return o.AmountUppercase, true @@ -357,7 +360,7 @@ func (o *PasswordPolicy) GetAmountUppercaseOk() (*int32, bool) { // HasAmountUppercase returns a boolean if a field has been set. func (o *PasswordPolicy) HasAmountUppercase() bool { - if o != nil && o.AmountUppercase != nil { + if o != nil && !IsNil(o.AmountUppercase) { return true } @@ -371,7 +374,7 @@ func (o *PasswordPolicy) SetAmountUppercase(v int32) { // GetAmountLowercase returns the AmountLowercase field value if set, zero value otherwise. func (o *PasswordPolicy) GetAmountLowercase() int32 { - if o == nil || o.AmountLowercase == nil { + if o == nil || IsNil(o.AmountLowercase) { var ret int32 return ret } @@ -381,7 +384,7 @@ func (o *PasswordPolicy) GetAmountLowercase() int32 { // GetAmountLowercaseOk returns a tuple with the AmountLowercase field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PasswordPolicy) GetAmountLowercaseOk() (*int32, bool) { - if o == nil || o.AmountLowercase == nil { + if o == nil || IsNil(o.AmountLowercase) { return nil, false } return o.AmountLowercase, true @@ -389,7 +392,7 @@ func (o *PasswordPolicy) GetAmountLowercaseOk() (*int32, bool) { // HasAmountLowercase returns a boolean if a field has been set. func (o *PasswordPolicy) HasAmountLowercase() bool { - if o != nil && o.AmountLowercase != nil { + if o != nil && !IsNil(o.AmountLowercase) { return true } @@ -403,7 +406,7 @@ func (o *PasswordPolicy) SetAmountLowercase(v int32) { // GetAmountSymbols returns the AmountSymbols field value if set, zero value otherwise. func (o *PasswordPolicy) GetAmountSymbols() int32 { - if o == nil || o.AmountSymbols == nil { + if o == nil || IsNil(o.AmountSymbols) { var ret int32 return ret } @@ -413,7 +416,7 @@ func (o *PasswordPolicy) GetAmountSymbols() int32 { // GetAmountSymbolsOk returns a tuple with the AmountSymbols field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PasswordPolicy) GetAmountSymbolsOk() (*int32, bool) { - if o == nil || o.AmountSymbols == nil { + if o == nil || IsNil(o.AmountSymbols) { return nil, false } return o.AmountSymbols, true @@ -421,7 +424,7 @@ func (o *PasswordPolicy) GetAmountSymbolsOk() (*int32, bool) { // HasAmountSymbols returns a boolean if a field has been set. func (o *PasswordPolicy) HasAmountSymbols() bool { - if o != nil && o.AmountSymbols != nil { + if o != nil && !IsNil(o.AmountSymbols) { return true } @@ -435,7 +438,7 @@ func (o *PasswordPolicy) SetAmountSymbols(v int32) { // GetLengthMin returns the LengthMin field value if set, zero value otherwise. func (o *PasswordPolicy) GetLengthMin() int32 { - if o == nil || o.LengthMin == nil { + if o == nil || IsNil(o.LengthMin) { var ret int32 return ret } @@ -445,7 +448,7 @@ func (o *PasswordPolicy) GetLengthMin() int32 { // GetLengthMinOk returns a tuple with the LengthMin field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PasswordPolicy) GetLengthMinOk() (*int32, bool) { - if o == nil || o.LengthMin == nil { + if o == nil || IsNil(o.LengthMin) { return nil, false } return o.LengthMin, true @@ -453,7 +456,7 @@ func (o *PasswordPolicy) GetLengthMinOk() (*int32, bool) { // HasLengthMin returns a boolean if a field has been set. func (o *PasswordPolicy) HasLengthMin() bool { - if o != nil && o.LengthMin != nil { + if o != nil && !IsNil(o.LengthMin) { return true } @@ -467,7 +470,7 @@ func (o *PasswordPolicy) SetLengthMin(v int32) { // GetSymbolCharset returns the SymbolCharset field value if set, zero value otherwise. func (o *PasswordPolicy) GetSymbolCharset() string { - if o == nil || o.SymbolCharset == nil { + if o == nil || IsNil(o.SymbolCharset) { var ret string return ret } @@ -477,7 +480,7 @@ func (o *PasswordPolicy) GetSymbolCharset() string { // GetSymbolCharsetOk returns a tuple with the SymbolCharset field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PasswordPolicy) GetSymbolCharsetOk() (*string, bool) { - if o == nil || o.SymbolCharset == nil { + if o == nil || IsNil(o.SymbolCharset) { return nil, false } return o.SymbolCharset, true @@ -485,7 +488,7 @@ func (o *PasswordPolicy) GetSymbolCharsetOk() (*string, bool) { // HasSymbolCharset returns a boolean if a field has been set. func (o *PasswordPolicy) HasSymbolCharset() bool { - if o != nil && o.SymbolCharset != nil { + if o != nil && !IsNil(o.SymbolCharset) { return true } @@ -499,7 +502,7 @@ func (o *PasswordPolicy) SetSymbolCharset(v string) { // GetErrorMessage returns the ErrorMessage field value if set, zero value otherwise. func (o *PasswordPolicy) GetErrorMessage() string { - if o == nil || o.ErrorMessage == nil { + if o == nil || IsNil(o.ErrorMessage) { var ret string return ret } @@ -509,7 +512,7 @@ func (o *PasswordPolicy) GetErrorMessage() string { // GetErrorMessageOk returns a tuple with the ErrorMessage field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PasswordPolicy) GetErrorMessageOk() (*string, bool) { - if o == nil || o.ErrorMessage == nil { + if o == nil || IsNil(o.ErrorMessage) { return nil, false } return o.ErrorMessage, true @@ -517,7 +520,7 @@ func (o *PasswordPolicy) GetErrorMessageOk() (*string, bool) { // HasErrorMessage returns a boolean if a field has been set. func (o *PasswordPolicy) HasErrorMessage() bool { - if o != nil && o.ErrorMessage != nil { + if o != nil && !IsNil(o.ErrorMessage) { return true } @@ -531,7 +534,7 @@ func (o *PasswordPolicy) SetErrorMessage(v string) { // GetCheckStaticRules returns the CheckStaticRules field value if set, zero value otherwise. func (o *PasswordPolicy) GetCheckStaticRules() bool { - if o == nil || o.CheckStaticRules == nil { + if o == nil || IsNil(o.CheckStaticRules) { var ret bool return ret } @@ -541,7 +544,7 @@ func (o *PasswordPolicy) GetCheckStaticRules() bool { // GetCheckStaticRulesOk returns a tuple with the CheckStaticRules field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PasswordPolicy) GetCheckStaticRulesOk() (*bool, bool) { - if o == nil || o.CheckStaticRules == nil { + if o == nil || IsNil(o.CheckStaticRules) { return nil, false } return o.CheckStaticRules, true @@ -549,7 +552,7 @@ func (o *PasswordPolicy) GetCheckStaticRulesOk() (*bool, bool) { // HasCheckStaticRules returns a boolean if a field has been set. func (o *PasswordPolicy) HasCheckStaticRules() bool { - if o != nil && o.CheckStaticRules != nil { + if o != nil && !IsNil(o.CheckStaticRules) { return true } @@ -563,7 +566,7 @@ func (o *PasswordPolicy) SetCheckStaticRules(v bool) { // GetCheckHaveIBeenPwned returns the CheckHaveIBeenPwned field value if set, zero value otherwise. func (o *PasswordPolicy) GetCheckHaveIBeenPwned() bool { - if o == nil || o.CheckHaveIBeenPwned == nil { + if o == nil || IsNil(o.CheckHaveIBeenPwned) { var ret bool return ret } @@ -573,7 +576,7 @@ func (o *PasswordPolicy) GetCheckHaveIBeenPwned() bool { // GetCheckHaveIBeenPwnedOk returns a tuple with the CheckHaveIBeenPwned field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PasswordPolicy) GetCheckHaveIBeenPwnedOk() (*bool, bool) { - if o == nil || o.CheckHaveIBeenPwned == nil { + if o == nil || IsNil(o.CheckHaveIBeenPwned) { return nil, false } return o.CheckHaveIBeenPwned, true @@ -581,7 +584,7 @@ func (o *PasswordPolicy) GetCheckHaveIBeenPwnedOk() (*bool, bool) { // HasCheckHaveIBeenPwned returns a boolean if a field has been set. func (o *PasswordPolicy) HasCheckHaveIBeenPwned() bool { - if o != nil && o.CheckHaveIBeenPwned != nil { + if o != nil && !IsNil(o.CheckHaveIBeenPwned) { return true } @@ -595,7 +598,7 @@ func (o *PasswordPolicy) SetCheckHaveIBeenPwned(v bool) { // GetCheckZxcvbn returns the CheckZxcvbn field value if set, zero value otherwise. func (o *PasswordPolicy) GetCheckZxcvbn() bool { - if o == nil || o.CheckZxcvbn == nil { + if o == nil || IsNil(o.CheckZxcvbn) { var ret bool return ret } @@ -605,7 +608,7 @@ func (o *PasswordPolicy) GetCheckZxcvbn() bool { // GetCheckZxcvbnOk returns a tuple with the CheckZxcvbn field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PasswordPolicy) GetCheckZxcvbnOk() (*bool, bool) { - if o == nil || o.CheckZxcvbn == nil { + if o == nil || IsNil(o.CheckZxcvbn) { return nil, false } return o.CheckZxcvbn, true @@ -613,7 +616,7 @@ func (o *PasswordPolicy) GetCheckZxcvbnOk() (*bool, bool) { // HasCheckZxcvbn returns a boolean if a field has been set. func (o *PasswordPolicy) HasCheckZxcvbn() bool { - if o != nil && o.CheckZxcvbn != nil { + if o != nil && !IsNil(o.CheckZxcvbn) { return true } @@ -627,7 +630,7 @@ func (o *PasswordPolicy) SetCheckZxcvbn(v bool) { // GetHibpAllowedCount returns the HibpAllowedCount field value if set, zero value otherwise. func (o *PasswordPolicy) GetHibpAllowedCount() int32 { - if o == nil || o.HibpAllowedCount == nil { + if o == nil || IsNil(o.HibpAllowedCount) { var ret int32 return ret } @@ -637,7 +640,7 @@ func (o *PasswordPolicy) GetHibpAllowedCount() int32 { // GetHibpAllowedCountOk returns a tuple with the HibpAllowedCount field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PasswordPolicy) GetHibpAllowedCountOk() (*int32, bool) { - if o == nil || o.HibpAllowedCount == nil { + if o == nil || IsNil(o.HibpAllowedCount) { return nil, false } return o.HibpAllowedCount, true @@ -645,7 +648,7 @@ func (o *PasswordPolicy) GetHibpAllowedCountOk() (*int32, bool) { // HasHibpAllowedCount returns a boolean if a field has been set. func (o *PasswordPolicy) HasHibpAllowedCount() bool { - if o != nil && o.HibpAllowedCount != nil { + if o != nil && !IsNil(o.HibpAllowedCount) { return true } @@ -659,7 +662,7 @@ func (o *PasswordPolicy) SetHibpAllowedCount(v int32) { // GetZxcvbnScoreThreshold returns the ZxcvbnScoreThreshold field value if set, zero value otherwise. func (o *PasswordPolicy) GetZxcvbnScoreThreshold() int32 { - if o == nil || o.ZxcvbnScoreThreshold == nil { + if o == nil || IsNil(o.ZxcvbnScoreThreshold) { var ret int32 return ret } @@ -669,7 +672,7 @@ func (o *PasswordPolicy) GetZxcvbnScoreThreshold() int32 { // GetZxcvbnScoreThresholdOk returns a tuple with the ZxcvbnScoreThreshold field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PasswordPolicy) GetZxcvbnScoreThresholdOk() (*int32, bool) { - if o == nil || o.ZxcvbnScoreThreshold == nil { + if o == nil || IsNil(o.ZxcvbnScoreThreshold) { return nil, false } return o.ZxcvbnScoreThreshold, true @@ -677,7 +680,7 @@ func (o *PasswordPolicy) GetZxcvbnScoreThresholdOk() (*int32, bool) { // HasZxcvbnScoreThreshold returns a boolean if a field has been set. func (o *PasswordPolicy) HasZxcvbnScoreThreshold() bool { - if o != nil && o.ZxcvbnScoreThreshold != nil { + if o != nil && !IsNil(o.ZxcvbnScoreThreshold) { return true } @@ -690,71 +693,65 @@ func (o *PasswordPolicy) SetZxcvbnScoreThreshold(v int32) { } func (o PasswordPolicy) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if true { - toSerialize["name"] = o.Name - } - if o.ExecutionLogging != nil { + return json.Marshal(toSerialize) +} + +func (o PasswordPolicy) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name + if !IsNil(o.ExecutionLogging) { toSerialize["execution_logging"] = o.ExecutionLogging } - if true { - toSerialize["component"] = o.Component - } - if true { - toSerialize["verbose_name"] = o.VerboseName - } - if true { - toSerialize["verbose_name_plural"] = o.VerboseNamePlural - } - if true { - toSerialize["meta_model_name"] = o.MetaModelName - } - if true { - toSerialize["bound_to"] = o.BoundTo - } - if o.PasswordField != nil { + // skip: component is readOnly + // skip: verbose_name is readOnly + // skip: verbose_name_plural is readOnly + // skip: meta_model_name is readOnly + // skip: bound_to is readOnly + if !IsNil(o.PasswordField) { toSerialize["password_field"] = o.PasswordField } - if o.AmountDigits != nil { + if !IsNil(o.AmountDigits) { toSerialize["amount_digits"] = o.AmountDigits } - if o.AmountUppercase != nil { + if !IsNil(o.AmountUppercase) { toSerialize["amount_uppercase"] = o.AmountUppercase } - if o.AmountLowercase != nil { + if !IsNil(o.AmountLowercase) { toSerialize["amount_lowercase"] = o.AmountLowercase } - if o.AmountSymbols != nil { + if !IsNil(o.AmountSymbols) { toSerialize["amount_symbols"] = o.AmountSymbols } - if o.LengthMin != nil { + if !IsNil(o.LengthMin) { toSerialize["length_min"] = o.LengthMin } - if o.SymbolCharset != nil { + if !IsNil(o.SymbolCharset) { toSerialize["symbol_charset"] = o.SymbolCharset } - if o.ErrorMessage != nil { + if !IsNil(o.ErrorMessage) { toSerialize["error_message"] = o.ErrorMessage } - if o.CheckStaticRules != nil { + if !IsNil(o.CheckStaticRules) { toSerialize["check_static_rules"] = o.CheckStaticRules } - if o.CheckHaveIBeenPwned != nil { + if !IsNil(o.CheckHaveIBeenPwned) { toSerialize["check_have_i_been_pwned"] = o.CheckHaveIBeenPwned } - if o.CheckZxcvbn != nil { + if !IsNil(o.CheckZxcvbn) { toSerialize["check_zxcvbn"] = o.CheckZxcvbn } - if o.HibpAllowedCount != nil { + if !IsNil(o.HibpAllowedCount) { toSerialize["hibp_allowed_count"] = o.HibpAllowedCount } - if o.ZxcvbnScoreThreshold != nil { + if !IsNil(o.ZxcvbnScoreThreshold) { toSerialize["zxcvbn_score_threshold"] = o.ZxcvbnScoreThreshold } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePasswordPolicy struct { diff --git a/model_password_policy_request.go b/model_password_policy_request.go index 4824df5ae..48f0038f4 100644 --- a/model_password_policy_request.go +++ b/model_password_policy_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PasswordPolicyRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PasswordPolicyRequest{} + // PasswordPolicyRequest Password Policy Serializer type PasswordPolicyRequest struct { Name string `json:"name"` @@ -82,7 +85,7 @@ func (o *PasswordPolicyRequest) SetName(v string) { // GetExecutionLogging returns the ExecutionLogging field value if set, zero value otherwise. func (o *PasswordPolicyRequest) GetExecutionLogging() bool { - if o == nil || o.ExecutionLogging == nil { + if o == nil || IsNil(o.ExecutionLogging) { var ret bool return ret } @@ -92,7 +95,7 @@ func (o *PasswordPolicyRequest) GetExecutionLogging() bool { // GetExecutionLoggingOk returns a tuple with the ExecutionLogging field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PasswordPolicyRequest) GetExecutionLoggingOk() (*bool, bool) { - if o == nil || o.ExecutionLogging == nil { + if o == nil || IsNil(o.ExecutionLogging) { return nil, false } return o.ExecutionLogging, true @@ -100,7 +103,7 @@ func (o *PasswordPolicyRequest) GetExecutionLoggingOk() (*bool, bool) { // HasExecutionLogging returns a boolean if a field has been set. func (o *PasswordPolicyRequest) HasExecutionLogging() bool { - if o != nil && o.ExecutionLogging != nil { + if o != nil && !IsNil(o.ExecutionLogging) { return true } @@ -114,7 +117,7 @@ func (o *PasswordPolicyRequest) SetExecutionLogging(v bool) { // GetPasswordField returns the PasswordField field value if set, zero value otherwise. func (o *PasswordPolicyRequest) GetPasswordField() string { - if o == nil || o.PasswordField == nil { + if o == nil || IsNil(o.PasswordField) { var ret string return ret } @@ -124,7 +127,7 @@ func (o *PasswordPolicyRequest) GetPasswordField() string { // GetPasswordFieldOk returns a tuple with the PasswordField field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PasswordPolicyRequest) GetPasswordFieldOk() (*string, bool) { - if o == nil || o.PasswordField == nil { + if o == nil || IsNil(o.PasswordField) { return nil, false } return o.PasswordField, true @@ -132,7 +135,7 @@ func (o *PasswordPolicyRequest) GetPasswordFieldOk() (*string, bool) { // HasPasswordField returns a boolean if a field has been set. func (o *PasswordPolicyRequest) HasPasswordField() bool { - if o != nil && o.PasswordField != nil { + if o != nil && !IsNil(o.PasswordField) { return true } @@ -146,7 +149,7 @@ func (o *PasswordPolicyRequest) SetPasswordField(v string) { // GetAmountDigits returns the AmountDigits field value if set, zero value otherwise. func (o *PasswordPolicyRequest) GetAmountDigits() int32 { - if o == nil || o.AmountDigits == nil { + if o == nil || IsNil(o.AmountDigits) { var ret int32 return ret } @@ -156,7 +159,7 @@ func (o *PasswordPolicyRequest) GetAmountDigits() int32 { // GetAmountDigitsOk returns a tuple with the AmountDigits field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PasswordPolicyRequest) GetAmountDigitsOk() (*int32, bool) { - if o == nil || o.AmountDigits == nil { + if o == nil || IsNil(o.AmountDigits) { return nil, false } return o.AmountDigits, true @@ -164,7 +167,7 @@ func (o *PasswordPolicyRequest) GetAmountDigitsOk() (*int32, bool) { // HasAmountDigits returns a boolean if a field has been set. func (o *PasswordPolicyRequest) HasAmountDigits() bool { - if o != nil && o.AmountDigits != nil { + if o != nil && !IsNil(o.AmountDigits) { return true } @@ -178,7 +181,7 @@ func (o *PasswordPolicyRequest) SetAmountDigits(v int32) { // GetAmountUppercase returns the AmountUppercase field value if set, zero value otherwise. func (o *PasswordPolicyRequest) GetAmountUppercase() int32 { - if o == nil || o.AmountUppercase == nil { + if o == nil || IsNil(o.AmountUppercase) { var ret int32 return ret } @@ -188,7 +191,7 @@ func (o *PasswordPolicyRequest) GetAmountUppercase() int32 { // GetAmountUppercaseOk returns a tuple with the AmountUppercase field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PasswordPolicyRequest) GetAmountUppercaseOk() (*int32, bool) { - if o == nil || o.AmountUppercase == nil { + if o == nil || IsNil(o.AmountUppercase) { return nil, false } return o.AmountUppercase, true @@ -196,7 +199,7 @@ func (o *PasswordPolicyRequest) GetAmountUppercaseOk() (*int32, bool) { // HasAmountUppercase returns a boolean if a field has been set. func (o *PasswordPolicyRequest) HasAmountUppercase() bool { - if o != nil && o.AmountUppercase != nil { + if o != nil && !IsNil(o.AmountUppercase) { return true } @@ -210,7 +213,7 @@ func (o *PasswordPolicyRequest) SetAmountUppercase(v int32) { // GetAmountLowercase returns the AmountLowercase field value if set, zero value otherwise. func (o *PasswordPolicyRequest) GetAmountLowercase() int32 { - if o == nil || o.AmountLowercase == nil { + if o == nil || IsNil(o.AmountLowercase) { var ret int32 return ret } @@ -220,7 +223,7 @@ func (o *PasswordPolicyRequest) GetAmountLowercase() int32 { // GetAmountLowercaseOk returns a tuple with the AmountLowercase field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PasswordPolicyRequest) GetAmountLowercaseOk() (*int32, bool) { - if o == nil || o.AmountLowercase == nil { + if o == nil || IsNil(o.AmountLowercase) { return nil, false } return o.AmountLowercase, true @@ -228,7 +231,7 @@ func (o *PasswordPolicyRequest) GetAmountLowercaseOk() (*int32, bool) { // HasAmountLowercase returns a boolean if a field has been set. func (o *PasswordPolicyRequest) HasAmountLowercase() bool { - if o != nil && o.AmountLowercase != nil { + if o != nil && !IsNil(o.AmountLowercase) { return true } @@ -242,7 +245,7 @@ func (o *PasswordPolicyRequest) SetAmountLowercase(v int32) { // GetAmountSymbols returns the AmountSymbols field value if set, zero value otherwise. func (o *PasswordPolicyRequest) GetAmountSymbols() int32 { - if o == nil || o.AmountSymbols == nil { + if o == nil || IsNil(o.AmountSymbols) { var ret int32 return ret } @@ -252,7 +255,7 @@ func (o *PasswordPolicyRequest) GetAmountSymbols() int32 { // GetAmountSymbolsOk returns a tuple with the AmountSymbols field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PasswordPolicyRequest) GetAmountSymbolsOk() (*int32, bool) { - if o == nil || o.AmountSymbols == nil { + if o == nil || IsNil(o.AmountSymbols) { return nil, false } return o.AmountSymbols, true @@ -260,7 +263,7 @@ func (o *PasswordPolicyRequest) GetAmountSymbolsOk() (*int32, bool) { // HasAmountSymbols returns a boolean if a field has been set. func (o *PasswordPolicyRequest) HasAmountSymbols() bool { - if o != nil && o.AmountSymbols != nil { + if o != nil && !IsNil(o.AmountSymbols) { return true } @@ -274,7 +277,7 @@ func (o *PasswordPolicyRequest) SetAmountSymbols(v int32) { // GetLengthMin returns the LengthMin field value if set, zero value otherwise. func (o *PasswordPolicyRequest) GetLengthMin() int32 { - if o == nil || o.LengthMin == nil { + if o == nil || IsNil(o.LengthMin) { var ret int32 return ret } @@ -284,7 +287,7 @@ func (o *PasswordPolicyRequest) GetLengthMin() int32 { // GetLengthMinOk returns a tuple with the LengthMin field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PasswordPolicyRequest) GetLengthMinOk() (*int32, bool) { - if o == nil || o.LengthMin == nil { + if o == nil || IsNil(o.LengthMin) { return nil, false } return o.LengthMin, true @@ -292,7 +295,7 @@ func (o *PasswordPolicyRequest) GetLengthMinOk() (*int32, bool) { // HasLengthMin returns a boolean if a field has been set. func (o *PasswordPolicyRequest) HasLengthMin() bool { - if o != nil && o.LengthMin != nil { + if o != nil && !IsNil(o.LengthMin) { return true } @@ -306,7 +309,7 @@ func (o *PasswordPolicyRequest) SetLengthMin(v int32) { // GetSymbolCharset returns the SymbolCharset field value if set, zero value otherwise. func (o *PasswordPolicyRequest) GetSymbolCharset() string { - if o == nil || o.SymbolCharset == nil { + if o == nil || IsNil(o.SymbolCharset) { var ret string return ret } @@ -316,7 +319,7 @@ func (o *PasswordPolicyRequest) GetSymbolCharset() string { // GetSymbolCharsetOk returns a tuple with the SymbolCharset field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PasswordPolicyRequest) GetSymbolCharsetOk() (*string, bool) { - if o == nil || o.SymbolCharset == nil { + if o == nil || IsNil(o.SymbolCharset) { return nil, false } return o.SymbolCharset, true @@ -324,7 +327,7 @@ func (o *PasswordPolicyRequest) GetSymbolCharsetOk() (*string, bool) { // HasSymbolCharset returns a boolean if a field has been set. func (o *PasswordPolicyRequest) HasSymbolCharset() bool { - if o != nil && o.SymbolCharset != nil { + if o != nil && !IsNil(o.SymbolCharset) { return true } @@ -338,7 +341,7 @@ func (o *PasswordPolicyRequest) SetSymbolCharset(v string) { // GetErrorMessage returns the ErrorMessage field value if set, zero value otherwise. func (o *PasswordPolicyRequest) GetErrorMessage() string { - if o == nil || o.ErrorMessage == nil { + if o == nil || IsNil(o.ErrorMessage) { var ret string return ret } @@ -348,7 +351,7 @@ func (o *PasswordPolicyRequest) GetErrorMessage() string { // GetErrorMessageOk returns a tuple with the ErrorMessage field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PasswordPolicyRequest) GetErrorMessageOk() (*string, bool) { - if o == nil || o.ErrorMessage == nil { + if o == nil || IsNil(o.ErrorMessage) { return nil, false } return o.ErrorMessage, true @@ -356,7 +359,7 @@ func (o *PasswordPolicyRequest) GetErrorMessageOk() (*string, bool) { // HasErrorMessage returns a boolean if a field has been set. func (o *PasswordPolicyRequest) HasErrorMessage() bool { - if o != nil && o.ErrorMessage != nil { + if o != nil && !IsNil(o.ErrorMessage) { return true } @@ -370,7 +373,7 @@ func (o *PasswordPolicyRequest) SetErrorMessage(v string) { // GetCheckStaticRules returns the CheckStaticRules field value if set, zero value otherwise. func (o *PasswordPolicyRequest) GetCheckStaticRules() bool { - if o == nil || o.CheckStaticRules == nil { + if o == nil || IsNil(o.CheckStaticRules) { var ret bool return ret } @@ -380,7 +383,7 @@ func (o *PasswordPolicyRequest) GetCheckStaticRules() bool { // GetCheckStaticRulesOk returns a tuple with the CheckStaticRules field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PasswordPolicyRequest) GetCheckStaticRulesOk() (*bool, bool) { - if o == nil || o.CheckStaticRules == nil { + if o == nil || IsNil(o.CheckStaticRules) { return nil, false } return o.CheckStaticRules, true @@ -388,7 +391,7 @@ func (o *PasswordPolicyRequest) GetCheckStaticRulesOk() (*bool, bool) { // HasCheckStaticRules returns a boolean if a field has been set. func (o *PasswordPolicyRequest) HasCheckStaticRules() bool { - if o != nil && o.CheckStaticRules != nil { + if o != nil && !IsNil(o.CheckStaticRules) { return true } @@ -402,7 +405,7 @@ func (o *PasswordPolicyRequest) SetCheckStaticRules(v bool) { // GetCheckHaveIBeenPwned returns the CheckHaveIBeenPwned field value if set, zero value otherwise. func (o *PasswordPolicyRequest) GetCheckHaveIBeenPwned() bool { - if o == nil || o.CheckHaveIBeenPwned == nil { + if o == nil || IsNil(o.CheckHaveIBeenPwned) { var ret bool return ret } @@ -412,7 +415,7 @@ func (o *PasswordPolicyRequest) GetCheckHaveIBeenPwned() bool { // GetCheckHaveIBeenPwnedOk returns a tuple with the CheckHaveIBeenPwned field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PasswordPolicyRequest) GetCheckHaveIBeenPwnedOk() (*bool, bool) { - if o == nil || o.CheckHaveIBeenPwned == nil { + if o == nil || IsNil(o.CheckHaveIBeenPwned) { return nil, false } return o.CheckHaveIBeenPwned, true @@ -420,7 +423,7 @@ func (o *PasswordPolicyRequest) GetCheckHaveIBeenPwnedOk() (*bool, bool) { // HasCheckHaveIBeenPwned returns a boolean if a field has been set. func (o *PasswordPolicyRequest) HasCheckHaveIBeenPwned() bool { - if o != nil && o.CheckHaveIBeenPwned != nil { + if o != nil && !IsNil(o.CheckHaveIBeenPwned) { return true } @@ -434,7 +437,7 @@ func (o *PasswordPolicyRequest) SetCheckHaveIBeenPwned(v bool) { // GetCheckZxcvbn returns the CheckZxcvbn field value if set, zero value otherwise. func (o *PasswordPolicyRequest) GetCheckZxcvbn() bool { - if o == nil || o.CheckZxcvbn == nil { + if o == nil || IsNil(o.CheckZxcvbn) { var ret bool return ret } @@ -444,7 +447,7 @@ func (o *PasswordPolicyRequest) GetCheckZxcvbn() bool { // GetCheckZxcvbnOk returns a tuple with the CheckZxcvbn field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PasswordPolicyRequest) GetCheckZxcvbnOk() (*bool, bool) { - if o == nil || o.CheckZxcvbn == nil { + if o == nil || IsNil(o.CheckZxcvbn) { return nil, false } return o.CheckZxcvbn, true @@ -452,7 +455,7 @@ func (o *PasswordPolicyRequest) GetCheckZxcvbnOk() (*bool, bool) { // HasCheckZxcvbn returns a boolean if a field has been set. func (o *PasswordPolicyRequest) HasCheckZxcvbn() bool { - if o != nil && o.CheckZxcvbn != nil { + if o != nil && !IsNil(o.CheckZxcvbn) { return true } @@ -466,7 +469,7 @@ func (o *PasswordPolicyRequest) SetCheckZxcvbn(v bool) { // GetHibpAllowedCount returns the HibpAllowedCount field value if set, zero value otherwise. func (o *PasswordPolicyRequest) GetHibpAllowedCount() int32 { - if o == nil || o.HibpAllowedCount == nil { + if o == nil || IsNil(o.HibpAllowedCount) { var ret int32 return ret } @@ -476,7 +479,7 @@ func (o *PasswordPolicyRequest) GetHibpAllowedCount() int32 { // GetHibpAllowedCountOk returns a tuple with the HibpAllowedCount field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PasswordPolicyRequest) GetHibpAllowedCountOk() (*int32, bool) { - if o == nil || o.HibpAllowedCount == nil { + if o == nil || IsNil(o.HibpAllowedCount) { return nil, false } return o.HibpAllowedCount, true @@ -484,7 +487,7 @@ func (o *PasswordPolicyRequest) GetHibpAllowedCountOk() (*int32, bool) { // HasHibpAllowedCount returns a boolean if a field has been set. func (o *PasswordPolicyRequest) HasHibpAllowedCount() bool { - if o != nil && o.HibpAllowedCount != nil { + if o != nil && !IsNil(o.HibpAllowedCount) { return true } @@ -498,7 +501,7 @@ func (o *PasswordPolicyRequest) SetHibpAllowedCount(v int32) { // GetZxcvbnScoreThreshold returns the ZxcvbnScoreThreshold field value if set, zero value otherwise. func (o *PasswordPolicyRequest) GetZxcvbnScoreThreshold() int32 { - if o == nil || o.ZxcvbnScoreThreshold == nil { + if o == nil || IsNil(o.ZxcvbnScoreThreshold) { var ret int32 return ret } @@ -508,7 +511,7 @@ func (o *PasswordPolicyRequest) GetZxcvbnScoreThreshold() int32 { // GetZxcvbnScoreThresholdOk returns a tuple with the ZxcvbnScoreThreshold field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PasswordPolicyRequest) GetZxcvbnScoreThresholdOk() (*int32, bool) { - if o == nil || o.ZxcvbnScoreThreshold == nil { + if o == nil || IsNil(o.ZxcvbnScoreThreshold) { return nil, false } return o.ZxcvbnScoreThreshold, true @@ -516,7 +519,7 @@ func (o *PasswordPolicyRequest) GetZxcvbnScoreThresholdOk() (*int32, bool) { // HasZxcvbnScoreThreshold returns a boolean if a field has been set. func (o *PasswordPolicyRequest) HasZxcvbnScoreThreshold() bool { - if o != nil && o.ZxcvbnScoreThreshold != nil { + if o != nil && !IsNil(o.ZxcvbnScoreThreshold) { return true } @@ -529,53 +532,59 @@ func (o *PasswordPolicyRequest) SetZxcvbnScoreThreshold(v int32) { } func (o PasswordPolicyRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.ExecutionLogging != nil { + return json.Marshal(toSerialize) +} + +func (o PasswordPolicyRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.ExecutionLogging) { toSerialize["execution_logging"] = o.ExecutionLogging } - if o.PasswordField != nil { + if !IsNil(o.PasswordField) { toSerialize["password_field"] = o.PasswordField } - if o.AmountDigits != nil { + if !IsNil(o.AmountDigits) { toSerialize["amount_digits"] = o.AmountDigits } - if o.AmountUppercase != nil { + if !IsNil(o.AmountUppercase) { toSerialize["amount_uppercase"] = o.AmountUppercase } - if o.AmountLowercase != nil { + if !IsNil(o.AmountLowercase) { toSerialize["amount_lowercase"] = o.AmountLowercase } - if o.AmountSymbols != nil { + if !IsNil(o.AmountSymbols) { toSerialize["amount_symbols"] = o.AmountSymbols } - if o.LengthMin != nil { + if !IsNil(o.LengthMin) { toSerialize["length_min"] = o.LengthMin } - if o.SymbolCharset != nil { + if !IsNil(o.SymbolCharset) { toSerialize["symbol_charset"] = o.SymbolCharset } - if o.ErrorMessage != nil { + if !IsNil(o.ErrorMessage) { toSerialize["error_message"] = o.ErrorMessage } - if o.CheckStaticRules != nil { + if !IsNil(o.CheckStaticRules) { toSerialize["check_static_rules"] = o.CheckStaticRules } - if o.CheckHaveIBeenPwned != nil { + if !IsNil(o.CheckHaveIBeenPwned) { toSerialize["check_have_i_been_pwned"] = o.CheckHaveIBeenPwned } - if o.CheckZxcvbn != nil { + if !IsNil(o.CheckZxcvbn) { toSerialize["check_zxcvbn"] = o.CheckZxcvbn } - if o.HibpAllowedCount != nil { + if !IsNil(o.HibpAllowedCount) { toSerialize["hibp_allowed_count"] = o.HibpAllowedCount } - if o.ZxcvbnScoreThreshold != nil { + if !IsNil(o.ZxcvbnScoreThreshold) { toSerialize["zxcvbn_score_threshold"] = o.ZxcvbnScoreThreshold } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePasswordPolicyRequest struct { diff --git a/model_password_stage.go b/model_password_stage.go index b41e7ed9a..7e21b1bae 100644 --- a/model_password_stage.go +++ b/model_password_stage.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PasswordStage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PasswordStage{} + // PasswordStage PasswordStage Serializer type PasswordStage struct { Pk string `json:"pk"` @@ -206,7 +209,7 @@ func (o *PasswordStage) SetMetaModelName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *PasswordStage) GetFlowSet() []FlowSet { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSet return ret } @@ -216,7 +219,7 @@ func (o *PasswordStage) GetFlowSet() []FlowSet { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PasswordStage) GetFlowSetOk() ([]FlowSet, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -224,7 +227,7 @@ func (o *PasswordStage) GetFlowSetOk() ([]FlowSet, bool) { // HasFlowSet returns a boolean if a field has been set. func (o *PasswordStage) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -262,7 +265,7 @@ func (o *PasswordStage) SetBackends(v []BackendsEnum) { // GetConfigureFlow returns the ConfigureFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PasswordStage) GetConfigureFlow() string { - if o == nil || o.ConfigureFlow.Get() == nil { + if o == nil || IsNil(o.ConfigureFlow.Get()) { var ret string return ret } @@ -305,7 +308,7 @@ func (o *PasswordStage) UnsetConfigureFlow() { // GetFailedAttemptsBeforeCancel returns the FailedAttemptsBeforeCancel field value if set, zero value otherwise. func (o *PasswordStage) GetFailedAttemptsBeforeCancel() int32 { - if o == nil || o.FailedAttemptsBeforeCancel == nil { + if o == nil || IsNil(o.FailedAttemptsBeforeCancel) { var ret int32 return ret } @@ -315,7 +318,7 @@ func (o *PasswordStage) GetFailedAttemptsBeforeCancel() int32 { // GetFailedAttemptsBeforeCancelOk returns a tuple with the FailedAttemptsBeforeCancel field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PasswordStage) GetFailedAttemptsBeforeCancelOk() (*int32, bool) { - if o == nil || o.FailedAttemptsBeforeCancel == nil { + if o == nil || IsNil(o.FailedAttemptsBeforeCancel) { return nil, false } return o.FailedAttemptsBeforeCancel, true @@ -323,7 +326,7 @@ func (o *PasswordStage) GetFailedAttemptsBeforeCancelOk() (*int32, bool) { // HasFailedAttemptsBeforeCancel returns a boolean if a field has been set. func (o *PasswordStage) HasFailedAttemptsBeforeCancel() bool { - if o != nil && o.FailedAttemptsBeforeCancel != nil { + if o != nil && !IsNil(o.FailedAttemptsBeforeCancel) { return true } @@ -336,38 +339,32 @@ func (o *PasswordStage) SetFailedAttemptsBeforeCancel(v int32) { } func (o PasswordStage) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["component"] = o.Component - } - if true { - toSerialize["verbose_name"] = o.VerboseName - } - if true { - toSerialize["verbose_name_plural"] = o.VerboseNamePlural - } - if true { - toSerialize["meta_model_name"] = o.MetaModelName + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.FlowSet != nil { + return json.Marshal(toSerialize) +} + +func (o PasswordStage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name + // skip: component is readOnly + // skip: verbose_name is readOnly + // skip: verbose_name_plural is readOnly + // skip: meta_model_name is readOnly + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } - if true { - toSerialize["backends"] = o.Backends - } + toSerialize["backends"] = o.Backends if o.ConfigureFlow.IsSet() { toSerialize["configure_flow"] = o.ConfigureFlow.Get() } - if o.FailedAttemptsBeforeCancel != nil { + if !IsNil(o.FailedAttemptsBeforeCancel) { toSerialize["failed_attempts_before_cancel"] = o.FailedAttemptsBeforeCancel } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePasswordStage struct { diff --git a/model_password_stage_request.go b/model_password_stage_request.go index ecd04baa2..fbe928ac9 100644 --- a/model_password_stage_request.go +++ b/model_password_stage_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PasswordStageRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PasswordStageRequest{} + // PasswordStageRequest PasswordStage Serializer type PasswordStageRequest struct { Name string `json:"name"` @@ -72,7 +75,7 @@ func (o *PasswordStageRequest) SetName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *PasswordStageRequest) GetFlowSet() []FlowSetRequest { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSetRequest return ret } @@ -82,7 +85,7 @@ func (o *PasswordStageRequest) GetFlowSet() []FlowSetRequest { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PasswordStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -90,7 +93,7 @@ func (o *PasswordStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { // HasFlowSet returns a boolean if a field has been set. func (o *PasswordStageRequest) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -128,7 +131,7 @@ func (o *PasswordStageRequest) SetBackends(v []BackendsEnum) { // GetConfigureFlow returns the ConfigureFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PasswordStageRequest) GetConfigureFlow() string { - if o == nil || o.ConfigureFlow.Get() == nil { + if o == nil || IsNil(o.ConfigureFlow.Get()) { var ret string return ret } @@ -171,7 +174,7 @@ func (o *PasswordStageRequest) UnsetConfigureFlow() { // GetFailedAttemptsBeforeCancel returns the FailedAttemptsBeforeCancel field value if set, zero value otherwise. func (o *PasswordStageRequest) GetFailedAttemptsBeforeCancel() int32 { - if o == nil || o.FailedAttemptsBeforeCancel == nil { + if o == nil || IsNil(o.FailedAttemptsBeforeCancel) { var ret int32 return ret } @@ -181,7 +184,7 @@ func (o *PasswordStageRequest) GetFailedAttemptsBeforeCancel() int32 { // GetFailedAttemptsBeforeCancelOk returns a tuple with the FailedAttemptsBeforeCancel field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PasswordStageRequest) GetFailedAttemptsBeforeCancelOk() (*int32, bool) { - if o == nil || o.FailedAttemptsBeforeCancel == nil { + if o == nil || IsNil(o.FailedAttemptsBeforeCancel) { return nil, false } return o.FailedAttemptsBeforeCancel, true @@ -189,7 +192,7 @@ func (o *PasswordStageRequest) GetFailedAttemptsBeforeCancelOk() (*int32, bool) // HasFailedAttemptsBeforeCancel returns a boolean if a field has been set. func (o *PasswordStageRequest) HasFailedAttemptsBeforeCancel() bool { - if o != nil && o.FailedAttemptsBeforeCancel != nil { + if o != nil && !IsNil(o.FailedAttemptsBeforeCancel) { return true } @@ -202,23 +205,27 @@ func (o *PasswordStageRequest) SetFailedAttemptsBeforeCancel(v int32) { } func (o PasswordStageRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.FlowSet != nil { + return json.Marshal(toSerialize) +} + +func (o PasswordStageRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } - if true { - toSerialize["backends"] = o.Backends - } + toSerialize["backends"] = o.Backends if o.ConfigureFlow.IsSet() { toSerialize["configure_flow"] = o.ConfigureFlow.Get() } - if o.FailedAttemptsBeforeCancel != nil { + if !IsNil(o.FailedAttemptsBeforeCancel) { toSerialize["failed_attempts_before_cancel"] = o.FailedAttemptsBeforeCancel } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePasswordStageRequest struct { diff --git a/model_patched_application_request.go b/model_patched_application_request.go index fce1655e6..8283313b5 100644 --- a/model_patched_application_request.go +++ b/model_patched_application_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedApplicationRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedApplicationRequest{} + // PatchedApplicationRequest Application Serializer type PatchedApplicationRequest struct { // Application's display Name. @@ -50,7 +53,7 @@ func NewPatchedApplicationRequestWithDefaults() *PatchedApplicationRequest { // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedApplicationRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -60,7 +63,7 @@ func (o *PatchedApplicationRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedApplicationRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -68,7 +71,7 @@ func (o *PatchedApplicationRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedApplicationRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -82,7 +85,7 @@ func (o *PatchedApplicationRequest) SetName(v string) { // GetSlug returns the Slug field value if set, zero value otherwise. func (o *PatchedApplicationRequest) GetSlug() string { - if o == nil || o.Slug == nil { + if o == nil || IsNil(o.Slug) { var ret string return ret } @@ -92,7 +95,7 @@ func (o *PatchedApplicationRequest) GetSlug() string { // GetSlugOk returns a tuple with the Slug field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedApplicationRequest) GetSlugOk() (*string, bool) { - if o == nil || o.Slug == nil { + if o == nil || IsNil(o.Slug) { return nil, false } return o.Slug, true @@ -100,7 +103,7 @@ func (o *PatchedApplicationRequest) GetSlugOk() (*string, bool) { // HasSlug returns a boolean if a field has been set. func (o *PatchedApplicationRequest) HasSlug() bool { - if o != nil && o.Slug != nil { + if o != nil && !IsNil(o.Slug) { return true } @@ -114,7 +117,7 @@ func (o *PatchedApplicationRequest) SetSlug(v string) { // GetProvider returns the Provider field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedApplicationRequest) GetProvider() int32 { - if o == nil || o.Provider.Get() == nil { + if o == nil || IsNil(o.Provider.Get()) { var ret int32 return ret } @@ -157,7 +160,7 @@ func (o *PatchedApplicationRequest) UnsetProvider() { // GetOpenInNewTab returns the OpenInNewTab field value if set, zero value otherwise. func (o *PatchedApplicationRequest) GetOpenInNewTab() bool { - if o == nil || o.OpenInNewTab == nil { + if o == nil || IsNil(o.OpenInNewTab) { var ret bool return ret } @@ -167,7 +170,7 @@ func (o *PatchedApplicationRequest) GetOpenInNewTab() bool { // GetOpenInNewTabOk returns a tuple with the OpenInNewTab field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedApplicationRequest) GetOpenInNewTabOk() (*bool, bool) { - if o == nil || o.OpenInNewTab == nil { + if o == nil || IsNil(o.OpenInNewTab) { return nil, false } return o.OpenInNewTab, true @@ -175,7 +178,7 @@ func (o *PatchedApplicationRequest) GetOpenInNewTabOk() (*bool, bool) { // HasOpenInNewTab returns a boolean if a field has been set. func (o *PatchedApplicationRequest) HasOpenInNewTab() bool { - if o != nil && o.OpenInNewTab != nil { + if o != nil && !IsNil(o.OpenInNewTab) { return true } @@ -189,7 +192,7 @@ func (o *PatchedApplicationRequest) SetOpenInNewTab(v bool) { // GetMetaLaunchUrl returns the MetaLaunchUrl field value if set, zero value otherwise. func (o *PatchedApplicationRequest) GetMetaLaunchUrl() string { - if o == nil || o.MetaLaunchUrl == nil { + if o == nil || IsNil(o.MetaLaunchUrl) { var ret string return ret } @@ -199,7 +202,7 @@ func (o *PatchedApplicationRequest) GetMetaLaunchUrl() string { // GetMetaLaunchUrlOk returns a tuple with the MetaLaunchUrl field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedApplicationRequest) GetMetaLaunchUrlOk() (*string, bool) { - if o == nil || o.MetaLaunchUrl == nil { + if o == nil || IsNil(o.MetaLaunchUrl) { return nil, false } return o.MetaLaunchUrl, true @@ -207,7 +210,7 @@ func (o *PatchedApplicationRequest) GetMetaLaunchUrlOk() (*string, bool) { // HasMetaLaunchUrl returns a boolean if a field has been set. func (o *PatchedApplicationRequest) HasMetaLaunchUrl() bool { - if o != nil && o.MetaLaunchUrl != nil { + if o != nil && !IsNil(o.MetaLaunchUrl) { return true } @@ -221,7 +224,7 @@ func (o *PatchedApplicationRequest) SetMetaLaunchUrl(v string) { // GetMetaDescription returns the MetaDescription field value if set, zero value otherwise. func (o *PatchedApplicationRequest) GetMetaDescription() string { - if o == nil || o.MetaDescription == nil { + if o == nil || IsNil(o.MetaDescription) { var ret string return ret } @@ -231,7 +234,7 @@ func (o *PatchedApplicationRequest) GetMetaDescription() string { // GetMetaDescriptionOk returns a tuple with the MetaDescription field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedApplicationRequest) GetMetaDescriptionOk() (*string, bool) { - if o == nil || o.MetaDescription == nil { + if o == nil || IsNil(o.MetaDescription) { return nil, false } return o.MetaDescription, true @@ -239,7 +242,7 @@ func (o *PatchedApplicationRequest) GetMetaDescriptionOk() (*string, bool) { // HasMetaDescription returns a boolean if a field has been set. func (o *PatchedApplicationRequest) HasMetaDescription() bool { - if o != nil && o.MetaDescription != nil { + if o != nil && !IsNil(o.MetaDescription) { return true } @@ -253,7 +256,7 @@ func (o *PatchedApplicationRequest) SetMetaDescription(v string) { // GetMetaPublisher returns the MetaPublisher field value if set, zero value otherwise. func (o *PatchedApplicationRequest) GetMetaPublisher() string { - if o == nil || o.MetaPublisher == nil { + if o == nil || IsNil(o.MetaPublisher) { var ret string return ret } @@ -263,7 +266,7 @@ func (o *PatchedApplicationRequest) GetMetaPublisher() string { // GetMetaPublisherOk returns a tuple with the MetaPublisher field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedApplicationRequest) GetMetaPublisherOk() (*string, bool) { - if o == nil || o.MetaPublisher == nil { + if o == nil || IsNil(o.MetaPublisher) { return nil, false } return o.MetaPublisher, true @@ -271,7 +274,7 @@ func (o *PatchedApplicationRequest) GetMetaPublisherOk() (*string, bool) { // HasMetaPublisher returns a boolean if a field has been set. func (o *PatchedApplicationRequest) HasMetaPublisher() bool { - if o != nil && o.MetaPublisher != nil { + if o != nil && !IsNil(o.MetaPublisher) { return true } @@ -285,7 +288,7 @@ func (o *PatchedApplicationRequest) SetMetaPublisher(v string) { // GetPolicyEngineMode returns the PolicyEngineMode field value if set, zero value otherwise. func (o *PatchedApplicationRequest) GetPolicyEngineMode() PolicyEngineMode { - if o == nil || o.PolicyEngineMode == nil { + if o == nil || IsNil(o.PolicyEngineMode) { var ret PolicyEngineMode return ret } @@ -295,7 +298,7 @@ func (o *PatchedApplicationRequest) GetPolicyEngineMode() PolicyEngineMode { // GetPolicyEngineModeOk returns a tuple with the PolicyEngineMode field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedApplicationRequest) GetPolicyEngineModeOk() (*PolicyEngineMode, bool) { - if o == nil || o.PolicyEngineMode == nil { + if o == nil || IsNil(o.PolicyEngineMode) { return nil, false } return o.PolicyEngineMode, true @@ -303,7 +306,7 @@ func (o *PatchedApplicationRequest) GetPolicyEngineModeOk() (*PolicyEngineMode, // HasPolicyEngineMode returns a boolean if a field has been set. func (o *PatchedApplicationRequest) HasPolicyEngineMode() bool { - if o != nil && o.PolicyEngineMode != nil { + if o != nil && !IsNil(o.PolicyEngineMode) { return true } @@ -317,7 +320,7 @@ func (o *PatchedApplicationRequest) SetPolicyEngineMode(v PolicyEngineMode) { // GetGroup returns the Group field value if set, zero value otherwise. func (o *PatchedApplicationRequest) GetGroup() string { - if o == nil || o.Group == nil { + if o == nil || IsNil(o.Group) { var ret string return ret } @@ -327,7 +330,7 @@ func (o *PatchedApplicationRequest) GetGroup() string { // GetGroupOk returns a tuple with the Group field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedApplicationRequest) GetGroupOk() (*string, bool) { - if o == nil || o.Group == nil { + if o == nil || IsNil(o.Group) { return nil, false } return o.Group, true @@ -335,7 +338,7 @@ func (o *PatchedApplicationRequest) GetGroupOk() (*string, bool) { // HasGroup returns a boolean if a field has been set. func (o *PatchedApplicationRequest) HasGroup() bool { - if o != nil && o.Group != nil { + if o != nil && !IsNil(o.Group) { return true } @@ -348,35 +351,43 @@ func (o *PatchedApplicationRequest) SetGroup(v string) { } func (o PatchedApplicationRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedApplicationRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.Slug != nil { + if !IsNil(o.Slug) { toSerialize["slug"] = o.Slug } if o.Provider.IsSet() { toSerialize["provider"] = o.Provider.Get() } - if o.OpenInNewTab != nil { + if !IsNil(o.OpenInNewTab) { toSerialize["open_in_new_tab"] = o.OpenInNewTab } - if o.MetaLaunchUrl != nil { + if !IsNil(o.MetaLaunchUrl) { toSerialize["meta_launch_url"] = o.MetaLaunchUrl } - if o.MetaDescription != nil { + if !IsNil(o.MetaDescription) { toSerialize["meta_description"] = o.MetaDescription } - if o.MetaPublisher != nil { + if !IsNil(o.MetaPublisher) { toSerialize["meta_publisher"] = o.MetaPublisher } - if o.PolicyEngineMode != nil { + if !IsNil(o.PolicyEngineMode) { toSerialize["policy_engine_mode"] = o.PolicyEngineMode } - if o.Group != nil { + if !IsNil(o.Group) { toSerialize["group"] = o.Group } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedApplicationRequest struct { diff --git a/model_patched_authenticate_web_authn_stage_request.go b/model_patched_authenticate_web_authn_stage_request.go index 36a794abb..40e826e36 100644 --- a/model_patched_authenticate_web_authn_stage_request.go +++ b/model_patched_authenticate_web_authn_stage_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedAuthenticateWebAuthnStageRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedAuthenticateWebAuthnStageRequest{} + // PatchedAuthenticateWebAuthnStageRequest AuthenticateWebAuthnStage Serializer type PatchedAuthenticateWebAuthnStageRequest struct { Name *string `json:"name,omitempty"` @@ -45,7 +48,7 @@ func NewPatchedAuthenticateWebAuthnStageRequestWithDefaults() *PatchedAuthentica // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedAuthenticateWebAuthnStageRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -55,7 +58,7 @@ func (o *PatchedAuthenticateWebAuthnStageRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedAuthenticateWebAuthnStageRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -63,7 +66,7 @@ func (o *PatchedAuthenticateWebAuthnStageRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedAuthenticateWebAuthnStageRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -77,7 +80,7 @@ func (o *PatchedAuthenticateWebAuthnStageRequest) SetName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *PatchedAuthenticateWebAuthnStageRequest) GetFlowSet() []FlowSetRequest { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSetRequest return ret } @@ -87,7 +90,7 @@ func (o *PatchedAuthenticateWebAuthnStageRequest) GetFlowSet() []FlowSetRequest // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedAuthenticateWebAuthnStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -95,7 +98,7 @@ func (o *PatchedAuthenticateWebAuthnStageRequest) GetFlowSetOk() ([]FlowSetReque // HasFlowSet returns a boolean if a field has been set. func (o *PatchedAuthenticateWebAuthnStageRequest) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -109,7 +112,7 @@ func (o *PatchedAuthenticateWebAuthnStageRequest) SetFlowSet(v []FlowSetRequest) // GetConfigureFlow returns the ConfigureFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedAuthenticateWebAuthnStageRequest) GetConfigureFlow() string { - if o == nil || o.ConfigureFlow.Get() == nil { + if o == nil || IsNil(o.ConfigureFlow.Get()) { var ret string return ret } @@ -152,7 +155,7 @@ func (o *PatchedAuthenticateWebAuthnStageRequest) UnsetConfigureFlow() { // GetUserVerification returns the UserVerification field value if set, zero value otherwise. func (o *PatchedAuthenticateWebAuthnStageRequest) GetUserVerification() UserVerificationEnum { - if o == nil || o.UserVerification == nil { + if o == nil || IsNil(o.UserVerification) { var ret UserVerificationEnum return ret } @@ -162,7 +165,7 @@ func (o *PatchedAuthenticateWebAuthnStageRequest) GetUserVerification() UserVeri // GetUserVerificationOk returns a tuple with the UserVerification field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedAuthenticateWebAuthnStageRequest) GetUserVerificationOk() (*UserVerificationEnum, bool) { - if o == nil || o.UserVerification == nil { + if o == nil || IsNil(o.UserVerification) { return nil, false } return o.UserVerification, true @@ -170,7 +173,7 @@ func (o *PatchedAuthenticateWebAuthnStageRequest) GetUserVerificationOk() (*User // HasUserVerification returns a boolean if a field has been set. func (o *PatchedAuthenticateWebAuthnStageRequest) HasUserVerification() bool { - if o != nil && o.UserVerification != nil { + if o != nil && !IsNil(o.UserVerification) { return true } @@ -184,7 +187,7 @@ func (o *PatchedAuthenticateWebAuthnStageRequest) SetUserVerification(v UserVeri // GetAuthenticatorAttachment returns the AuthenticatorAttachment field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedAuthenticateWebAuthnStageRequest) GetAuthenticatorAttachment() AuthenticatorAttachmentEnum { - if o == nil || o.AuthenticatorAttachment.Get() == nil { + if o == nil || IsNil(o.AuthenticatorAttachment.Get()) { var ret AuthenticatorAttachmentEnum return ret } @@ -227,7 +230,7 @@ func (o *PatchedAuthenticateWebAuthnStageRequest) UnsetAuthenticatorAttachment() // GetResidentKeyRequirement returns the ResidentKeyRequirement field value if set, zero value otherwise. func (o *PatchedAuthenticateWebAuthnStageRequest) GetResidentKeyRequirement() ResidentKeyRequirementEnum { - if o == nil || o.ResidentKeyRequirement == nil { + if o == nil || IsNil(o.ResidentKeyRequirement) { var ret ResidentKeyRequirementEnum return ret } @@ -237,7 +240,7 @@ func (o *PatchedAuthenticateWebAuthnStageRequest) GetResidentKeyRequirement() Re // GetResidentKeyRequirementOk returns a tuple with the ResidentKeyRequirement field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedAuthenticateWebAuthnStageRequest) GetResidentKeyRequirementOk() (*ResidentKeyRequirementEnum, bool) { - if o == nil || o.ResidentKeyRequirement == nil { + if o == nil || IsNil(o.ResidentKeyRequirement) { return nil, false } return o.ResidentKeyRequirement, true @@ -245,7 +248,7 @@ func (o *PatchedAuthenticateWebAuthnStageRequest) GetResidentKeyRequirementOk() // HasResidentKeyRequirement returns a boolean if a field has been set. func (o *PatchedAuthenticateWebAuthnStageRequest) HasResidentKeyRequirement() bool { - if o != nil && o.ResidentKeyRequirement != nil { + if o != nil && !IsNil(o.ResidentKeyRequirement) { return true } @@ -258,26 +261,34 @@ func (o *PatchedAuthenticateWebAuthnStageRequest) SetResidentKeyRequirement(v Re } func (o PatchedAuthenticateWebAuthnStageRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedAuthenticateWebAuthnStageRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.FlowSet != nil { + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } if o.ConfigureFlow.IsSet() { toSerialize["configure_flow"] = o.ConfigureFlow.Get() } - if o.UserVerification != nil { + if !IsNil(o.UserVerification) { toSerialize["user_verification"] = o.UserVerification } if o.AuthenticatorAttachment.IsSet() { toSerialize["authenticator_attachment"] = o.AuthenticatorAttachment.Get() } - if o.ResidentKeyRequirement != nil { + if !IsNil(o.ResidentKeyRequirement) { toSerialize["resident_key_requirement"] = o.ResidentKeyRequirement } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedAuthenticateWebAuthnStageRequest struct { diff --git a/model_patched_authenticator_duo_stage_request.go b/model_patched_authenticator_duo_stage_request.go index 5dc99a1aa..362cbed27 100644 --- a/model_patched_authenticator_duo_stage_request.go +++ b/model_patched_authenticator_duo_stage_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedAuthenticatorDuoStageRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedAuthenticatorDuoStageRequest{} + // PatchedAuthenticatorDuoStageRequest AuthenticatorDuoStage Serializer type PatchedAuthenticatorDuoStageRequest struct { Name *string `json:"name,omitempty"` @@ -47,7 +50,7 @@ func NewPatchedAuthenticatorDuoStageRequestWithDefaults() *PatchedAuthenticatorD // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedAuthenticatorDuoStageRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -57,7 +60,7 @@ func (o *PatchedAuthenticatorDuoStageRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedAuthenticatorDuoStageRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -65,7 +68,7 @@ func (o *PatchedAuthenticatorDuoStageRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedAuthenticatorDuoStageRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -79,7 +82,7 @@ func (o *PatchedAuthenticatorDuoStageRequest) SetName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *PatchedAuthenticatorDuoStageRequest) GetFlowSet() []FlowSetRequest { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSetRequest return ret } @@ -89,7 +92,7 @@ func (o *PatchedAuthenticatorDuoStageRequest) GetFlowSet() []FlowSetRequest { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedAuthenticatorDuoStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -97,7 +100,7 @@ func (o *PatchedAuthenticatorDuoStageRequest) GetFlowSetOk() ([]FlowSetRequest, // HasFlowSet returns a boolean if a field has been set. func (o *PatchedAuthenticatorDuoStageRequest) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -111,7 +114,7 @@ func (o *PatchedAuthenticatorDuoStageRequest) SetFlowSet(v []FlowSetRequest) { // GetConfigureFlow returns the ConfigureFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedAuthenticatorDuoStageRequest) GetConfigureFlow() string { - if o == nil || o.ConfigureFlow.Get() == nil { + if o == nil || IsNil(o.ConfigureFlow.Get()) { var ret string return ret } @@ -154,7 +157,7 @@ func (o *PatchedAuthenticatorDuoStageRequest) UnsetConfigureFlow() { // GetClientId returns the ClientId field value if set, zero value otherwise. func (o *PatchedAuthenticatorDuoStageRequest) GetClientId() string { - if o == nil || o.ClientId == nil { + if o == nil || IsNil(o.ClientId) { var ret string return ret } @@ -164,7 +167,7 @@ func (o *PatchedAuthenticatorDuoStageRequest) GetClientId() string { // GetClientIdOk returns a tuple with the ClientId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedAuthenticatorDuoStageRequest) GetClientIdOk() (*string, bool) { - if o == nil || o.ClientId == nil { + if o == nil || IsNil(o.ClientId) { return nil, false } return o.ClientId, true @@ -172,7 +175,7 @@ func (o *PatchedAuthenticatorDuoStageRequest) GetClientIdOk() (*string, bool) { // HasClientId returns a boolean if a field has been set. func (o *PatchedAuthenticatorDuoStageRequest) HasClientId() bool { - if o != nil && o.ClientId != nil { + if o != nil && !IsNil(o.ClientId) { return true } @@ -186,7 +189,7 @@ func (o *PatchedAuthenticatorDuoStageRequest) SetClientId(v string) { // GetClientSecret returns the ClientSecret field value if set, zero value otherwise. func (o *PatchedAuthenticatorDuoStageRequest) GetClientSecret() string { - if o == nil || o.ClientSecret == nil { + if o == nil || IsNil(o.ClientSecret) { var ret string return ret } @@ -196,7 +199,7 @@ func (o *PatchedAuthenticatorDuoStageRequest) GetClientSecret() string { // GetClientSecretOk returns a tuple with the ClientSecret field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedAuthenticatorDuoStageRequest) GetClientSecretOk() (*string, bool) { - if o == nil || o.ClientSecret == nil { + if o == nil || IsNil(o.ClientSecret) { return nil, false } return o.ClientSecret, true @@ -204,7 +207,7 @@ func (o *PatchedAuthenticatorDuoStageRequest) GetClientSecretOk() (*string, bool // HasClientSecret returns a boolean if a field has been set. func (o *PatchedAuthenticatorDuoStageRequest) HasClientSecret() bool { - if o != nil && o.ClientSecret != nil { + if o != nil && !IsNil(o.ClientSecret) { return true } @@ -218,7 +221,7 @@ func (o *PatchedAuthenticatorDuoStageRequest) SetClientSecret(v string) { // GetApiHostname returns the ApiHostname field value if set, zero value otherwise. func (o *PatchedAuthenticatorDuoStageRequest) GetApiHostname() string { - if o == nil || o.ApiHostname == nil { + if o == nil || IsNil(o.ApiHostname) { var ret string return ret } @@ -228,7 +231,7 @@ func (o *PatchedAuthenticatorDuoStageRequest) GetApiHostname() string { // GetApiHostnameOk returns a tuple with the ApiHostname field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedAuthenticatorDuoStageRequest) GetApiHostnameOk() (*string, bool) { - if o == nil || o.ApiHostname == nil { + if o == nil || IsNil(o.ApiHostname) { return nil, false } return o.ApiHostname, true @@ -236,7 +239,7 @@ func (o *PatchedAuthenticatorDuoStageRequest) GetApiHostnameOk() (*string, bool) // HasApiHostname returns a boolean if a field has been set. func (o *PatchedAuthenticatorDuoStageRequest) HasApiHostname() bool { - if o != nil && o.ApiHostname != nil { + if o != nil && !IsNil(o.ApiHostname) { return true } @@ -250,7 +253,7 @@ func (o *PatchedAuthenticatorDuoStageRequest) SetApiHostname(v string) { // GetAdminIntegrationKey returns the AdminIntegrationKey field value if set, zero value otherwise. func (o *PatchedAuthenticatorDuoStageRequest) GetAdminIntegrationKey() string { - if o == nil || o.AdminIntegrationKey == nil { + if o == nil || IsNil(o.AdminIntegrationKey) { var ret string return ret } @@ -260,7 +263,7 @@ func (o *PatchedAuthenticatorDuoStageRequest) GetAdminIntegrationKey() string { // GetAdminIntegrationKeyOk returns a tuple with the AdminIntegrationKey field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedAuthenticatorDuoStageRequest) GetAdminIntegrationKeyOk() (*string, bool) { - if o == nil || o.AdminIntegrationKey == nil { + if o == nil || IsNil(o.AdminIntegrationKey) { return nil, false } return o.AdminIntegrationKey, true @@ -268,7 +271,7 @@ func (o *PatchedAuthenticatorDuoStageRequest) GetAdminIntegrationKeyOk() (*strin // HasAdminIntegrationKey returns a boolean if a field has been set. func (o *PatchedAuthenticatorDuoStageRequest) HasAdminIntegrationKey() bool { - if o != nil && o.AdminIntegrationKey != nil { + if o != nil && !IsNil(o.AdminIntegrationKey) { return true } @@ -282,7 +285,7 @@ func (o *PatchedAuthenticatorDuoStageRequest) SetAdminIntegrationKey(v string) { // GetAdminSecretKey returns the AdminSecretKey field value if set, zero value otherwise. func (o *PatchedAuthenticatorDuoStageRequest) GetAdminSecretKey() string { - if o == nil || o.AdminSecretKey == nil { + if o == nil || IsNil(o.AdminSecretKey) { var ret string return ret } @@ -292,7 +295,7 @@ func (o *PatchedAuthenticatorDuoStageRequest) GetAdminSecretKey() string { // GetAdminSecretKeyOk returns a tuple with the AdminSecretKey field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedAuthenticatorDuoStageRequest) GetAdminSecretKeyOk() (*string, bool) { - if o == nil || o.AdminSecretKey == nil { + if o == nil || IsNil(o.AdminSecretKey) { return nil, false } return o.AdminSecretKey, true @@ -300,7 +303,7 @@ func (o *PatchedAuthenticatorDuoStageRequest) GetAdminSecretKeyOk() (*string, bo // HasAdminSecretKey returns a boolean if a field has been set. func (o *PatchedAuthenticatorDuoStageRequest) HasAdminSecretKey() bool { - if o != nil && o.AdminSecretKey != nil { + if o != nil && !IsNil(o.AdminSecretKey) { return true } @@ -313,32 +316,40 @@ func (o *PatchedAuthenticatorDuoStageRequest) SetAdminSecretKey(v string) { } func (o PatchedAuthenticatorDuoStageRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedAuthenticatorDuoStageRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.FlowSet != nil { + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } if o.ConfigureFlow.IsSet() { toSerialize["configure_flow"] = o.ConfigureFlow.Get() } - if o.ClientId != nil { + if !IsNil(o.ClientId) { toSerialize["client_id"] = o.ClientId } - if o.ClientSecret != nil { + if !IsNil(o.ClientSecret) { toSerialize["client_secret"] = o.ClientSecret } - if o.ApiHostname != nil { + if !IsNil(o.ApiHostname) { toSerialize["api_hostname"] = o.ApiHostname } - if o.AdminIntegrationKey != nil { + if !IsNil(o.AdminIntegrationKey) { toSerialize["admin_integration_key"] = o.AdminIntegrationKey } - if o.AdminSecretKey != nil { + if !IsNil(o.AdminSecretKey) { toSerialize["admin_secret_key"] = o.AdminSecretKey } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedAuthenticatorDuoStageRequest struct { diff --git a/model_patched_authenticator_sms_stage_request.go b/model_patched_authenticator_sms_stage_request.go index 2a6a443f1..6ee057bc3 100644 --- a/model_patched_authenticator_sms_stage_request.go +++ b/model_patched_authenticator_sms_stage_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedAuthenticatorSMSStageRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedAuthenticatorSMSStageRequest{} + // PatchedAuthenticatorSMSStageRequest AuthenticatorSMSStage Serializer type PatchedAuthenticatorSMSStageRequest struct { Name *string `json:"name,omitempty"` @@ -52,7 +55,7 @@ func NewPatchedAuthenticatorSMSStageRequestWithDefaults() *PatchedAuthenticatorS // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedAuthenticatorSMSStageRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -62,7 +65,7 @@ func (o *PatchedAuthenticatorSMSStageRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedAuthenticatorSMSStageRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -70,7 +73,7 @@ func (o *PatchedAuthenticatorSMSStageRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedAuthenticatorSMSStageRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -84,7 +87,7 @@ func (o *PatchedAuthenticatorSMSStageRequest) SetName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *PatchedAuthenticatorSMSStageRequest) GetFlowSet() []FlowSetRequest { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSetRequest return ret } @@ -94,7 +97,7 @@ func (o *PatchedAuthenticatorSMSStageRequest) GetFlowSet() []FlowSetRequest { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedAuthenticatorSMSStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -102,7 +105,7 @@ func (o *PatchedAuthenticatorSMSStageRequest) GetFlowSetOk() ([]FlowSetRequest, // HasFlowSet returns a boolean if a field has been set. func (o *PatchedAuthenticatorSMSStageRequest) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -116,7 +119,7 @@ func (o *PatchedAuthenticatorSMSStageRequest) SetFlowSet(v []FlowSetRequest) { // GetConfigureFlow returns the ConfigureFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedAuthenticatorSMSStageRequest) GetConfigureFlow() string { - if o == nil || o.ConfigureFlow.Get() == nil { + if o == nil || IsNil(o.ConfigureFlow.Get()) { var ret string return ret } @@ -159,7 +162,7 @@ func (o *PatchedAuthenticatorSMSStageRequest) UnsetConfigureFlow() { // GetProvider returns the Provider field value if set, zero value otherwise. func (o *PatchedAuthenticatorSMSStageRequest) GetProvider() ProviderEnum { - if o == nil || o.Provider == nil { + if o == nil || IsNil(o.Provider) { var ret ProviderEnum return ret } @@ -169,7 +172,7 @@ func (o *PatchedAuthenticatorSMSStageRequest) GetProvider() ProviderEnum { // GetProviderOk returns a tuple with the Provider field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedAuthenticatorSMSStageRequest) GetProviderOk() (*ProviderEnum, bool) { - if o == nil || o.Provider == nil { + if o == nil || IsNil(o.Provider) { return nil, false } return o.Provider, true @@ -177,7 +180,7 @@ func (o *PatchedAuthenticatorSMSStageRequest) GetProviderOk() (*ProviderEnum, bo // HasProvider returns a boolean if a field has been set. func (o *PatchedAuthenticatorSMSStageRequest) HasProvider() bool { - if o != nil && o.Provider != nil { + if o != nil && !IsNil(o.Provider) { return true } @@ -191,7 +194,7 @@ func (o *PatchedAuthenticatorSMSStageRequest) SetProvider(v ProviderEnum) { // GetFromNumber returns the FromNumber field value if set, zero value otherwise. func (o *PatchedAuthenticatorSMSStageRequest) GetFromNumber() string { - if o == nil || o.FromNumber == nil { + if o == nil || IsNil(o.FromNumber) { var ret string return ret } @@ -201,7 +204,7 @@ func (o *PatchedAuthenticatorSMSStageRequest) GetFromNumber() string { // GetFromNumberOk returns a tuple with the FromNumber field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedAuthenticatorSMSStageRequest) GetFromNumberOk() (*string, bool) { - if o == nil || o.FromNumber == nil { + if o == nil || IsNil(o.FromNumber) { return nil, false } return o.FromNumber, true @@ -209,7 +212,7 @@ func (o *PatchedAuthenticatorSMSStageRequest) GetFromNumberOk() (*string, bool) // HasFromNumber returns a boolean if a field has been set. func (o *PatchedAuthenticatorSMSStageRequest) HasFromNumber() bool { - if o != nil && o.FromNumber != nil { + if o != nil && !IsNil(o.FromNumber) { return true } @@ -223,7 +226,7 @@ func (o *PatchedAuthenticatorSMSStageRequest) SetFromNumber(v string) { // GetAccountSid returns the AccountSid field value if set, zero value otherwise. func (o *PatchedAuthenticatorSMSStageRequest) GetAccountSid() string { - if o == nil || o.AccountSid == nil { + if o == nil || IsNil(o.AccountSid) { var ret string return ret } @@ -233,7 +236,7 @@ func (o *PatchedAuthenticatorSMSStageRequest) GetAccountSid() string { // GetAccountSidOk returns a tuple with the AccountSid field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedAuthenticatorSMSStageRequest) GetAccountSidOk() (*string, bool) { - if o == nil || o.AccountSid == nil { + if o == nil || IsNil(o.AccountSid) { return nil, false } return o.AccountSid, true @@ -241,7 +244,7 @@ func (o *PatchedAuthenticatorSMSStageRequest) GetAccountSidOk() (*string, bool) // HasAccountSid returns a boolean if a field has been set. func (o *PatchedAuthenticatorSMSStageRequest) HasAccountSid() bool { - if o != nil && o.AccountSid != nil { + if o != nil && !IsNil(o.AccountSid) { return true } @@ -255,7 +258,7 @@ func (o *PatchedAuthenticatorSMSStageRequest) SetAccountSid(v string) { // GetAuth returns the Auth field value if set, zero value otherwise. func (o *PatchedAuthenticatorSMSStageRequest) GetAuth() string { - if o == nil || o.Auth == nil { + if o == nil || IsNil(o.Auth) { var ret string return ret } @@ -265,7 +268,7 @@ func (o *PatchedAuthenticatorSMSStageRequest) GetAuth() string { // GetAuthOk returns a tuple with the Auth field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedAuthenticatorSMSStageRequest) GetAuthOk() (*string, bool) { - if o == nil || o.Auth == nil { + if o == nil || IsNil(o.Auth) { return nil, false } return o.Auth, true @@ -273,7 +276,7 @@ func (o *PatchedAuthenticatorSMSStageRequest) GetAuthOk() (*string, bool) { // HasAuth returns a boolean if a field has been set. func (o *PatchedAuthenticatorSMSStageRequest) HasAuth() bool { - if o != nil && o.Auth != nil { + if o != nil && !IsNil(o.Auth) { return true } @@ -287,7 +290,7 @@ func (o *PatchedAuthenticatorSMSStageRequest) SetAuth(v string) { // GetAuthPassword returns the AuthPassword field value if set, zero value otherwise. func (o *PatchedAuthenticatorSMSStageRequest) GetAuthPassword() string { - if o == nil || o.AuthPassword == nil { + if o == nil || IsNil(o.AuthPassword) { var ret string return ret } @@ -297,7 +300,7 @@ func (o *PatchedAuthenticatorSMSStageRequest) GetAuthPassword() string { // GetAuthPasswordOk returns a tuple with the AuthPassword field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedAuthenticatorSMSStageRequest) GetAuthPasswordOk() (*string, bool) { - if o == nil || o.AuthPassword == nil { + if o == nil || IsNil(o.AuthPassword) { return nil, false } return o.AuthPassword, true @@ -305,7 +308,7 @@ func (o *PatchedAuthenticatorSMSStageRequest) GetAuthPasswordOk() (*string, bool // HasAuthPassword returns a boolean if a field has been set. func (o *PatchedAuthenticatorSMSStageRequest) HasAuthPassword() bool { - if o != nil && o.AuthPassword != nil { + if o != nil && !IsNil(o.AuthPassword) { return true } @@ -319,7 +322,7 @@ func (o *PatchedAuthenticatorSMSStageRequest) SetAuthPassword(v string) { // GetAuthType returns the AuthType field value if set, zero value otherwise. func (o *PatchedAuthenticatorSMSStageRequest) GetAuthType() AuthTypeEnum { - if o == nil || o.AuthType == nil { + if o == nil || IsNil(o.AuthType) { var ret AuthTypeEnum return ret } @@ -329,7 +332,7 @@ func (o *PatchedAuthenticatorSMSStageRequest) GetAuthType() AuthTypeEnum { // GetAuthTypeOk returns a tuple with the AuthType field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedAuthenticatorSMSStageRequest) GetAuthTypeOk() (*AuthTypeEnum, bool) { - if o == nil || o.AuthType == nil { + if o == nil || IsNil(o.AuthType) { return nil, false } return o.AuthType, true @@ -337,7 +340,7 @@ func (o *PatchedAuthenticatorSMSStageRequest) GetAuthTypeOk() (*AuthTypeEnum, bo // HasAuthType returns a boolean if a field has been set. func (o *PatchedAuthenticatorSMSStageRequest) HasAuthType() bool { - if o != nil && o.AuthType != nil { + if o != nil && !IsNil(o.AuthType) { return true } @@ -351,7 +354,7 @@ func (o *PatchedAuthenticatorSMSStageRequest) SetAuthType(v AuthTypeEnum) { // GetVerifyOnly returns the VerifyOnly field value if set, zero value otherwise. func (o *PatchedAuthenticatorSMSStageRequest) GetVerifyOnly() bool { - if o == nil || o.VerifyOnly == nil { + if o == nil || IsNil(o.VerifyOnly) { var ret bool return ret } @@ -361,7 +364,7 @@ func (o *PatchedAuthenticatorSMSStageRequest) GetVerifyOnly() bool { // GetVerifyOnlyOk returns a tuple with the VerifyOnly field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedAuthenticatorSMSStageRequest) GetVerifyOnlyOk() (*bool, bool) { - if o == nil || o.VerifyOnly == nil { + if o == nil || IsNil(o.VerifyOnly) { return nil, false } return o.VerifyOnly, true @@ -369,7 +372,7 @@ func (o *PatchedAuthenticatorSMSStageRequest) GetVerifyOnlyOk() (*bool, bool) { // HasVerifyOnly returns a boolean if a field has been set. func (o *PatchedAuthenticatorSMSStageRequest) HasVerifyOnly() bool { - if o != nil && o.VerifyOnly != nil { + if o != nil && !IsNil(o.VerifyOnly) { return true } @@ -383,7 +386,7 @@ func (o *PatchedAuthenticatorSMSStageRequest) SetVerifyOnly(v bool) { // GetMapping returns the Mapping field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedAuthenticatorSMSStageRequest) GetMapping() string { - if o == nil || o.Mapping.Get() == nil { + if o == nil || IsNil(o.Mapping.Get()) { var ret string return ret } @@ -425,41 +428,49 @@ func (o *PatchedAuthenticatorSMSStageRequest) UnsetMapping() { } func (o PatchedAuthenticatorSMSStageRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedAuthenticatorSMSStageRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.FlowSet != nil { + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } if o.ConfigureFlow.IsSet() { toSerialize["configure_flow"] = o.ConfigureFlow.Get() } - if o.Provider != nil { + if !IsNil(o.Provider) { toSerialize["provider"] = o.Provider } - if o.FromNumber != nil { + if !IsNil(o.FromNumber) { toSerialize["from_number"] = o.FromNumber } - if o.AccountSid != nil { + if !IsNil(o.AccountSid) { toSerialize["account_sid"] = o.AccountSid } - if o.Auth != nil { + if !IsNil(o.Auth) { toSerialize["auth"] = o.Auth } - if o.AuthPassword != nil { + if !IsNil(o.AuthPassword) { toSerialize["auth_password"] = o.AuthPassword } - if o.AuthType != nil { + if !IsNil(o.AuthType) { toSerialize["auth_type"] = o.AuthType } - if o.VerifyOnly != nil { + if !IsNil(o.VerifyOnly) { toSerialize["verify_only"] = o.VerifyOnly } if o.Mapping.IsSet() { toSerialize["mapping"] = o.Mapping.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedAuthenticatorSMSStageRequest struct { diff --git a/model_patched_authenticator_static_stage_request.go b/model_patched_authenticator_static_stage_request.go index 9b6fbfa22..28e64d8cd 100644 --- a/model_patched_authenticator_static_stage_request.go +++ b/model_patched_authenticator_static_stage_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedAuthenticatorStaticStageRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedAuthenticatorStaticStageRequest{} + // PatchedAuthenticatorStaticStageRequest AuthenticatorStaticStage Serializer type PatchedAuthenticatorStaticStageRequest struct { Name *string `json:"name,omitempty"` @@ -43,7 +46,7 @@ func NewPatchedAuthenticatorStaticStageRequestWithDefaults() *PatchedAuthenticat // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedAuthenticatorStaticStageRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -53,7 +56,7 @@ func (o *PatchedAuthenticatorStaticStageRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedAuthenticatorStaticStageRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -61,7 +64,7 @@ func (o *PatchedAuthenticatorStaticStageRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedAuthenticatorStaticStageRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -75,7 +78,7 @@ func (o *PatchedAuthenticatorStaticStageRequest) SetName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *PatchedAuthenticatorStaticStageRequest) GetFlowSet() []FlowSetRequest { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSetRequest return ret } @@ -85,7 +88,7 @@ func (o *PatchedAuthenticatorStaticStageRequest) GetFlowSet() []FlowSetRequest { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedAuthenticatorStaticStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -93,7 +96,7 @@ func (o *PatchedAuthenticatorStaticStageRequest) GetFlowSetOk() ([]FlowSetReques // HasFlowSet returns a boolean if a field has been set. func (o *PatchedAuthenticatorStaticStageRequest) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -107,7 +110,7 @@ func (o *PatchedAuthenticatorStaticStageRequest) SetFlowSet(v []FlowSetRequest) // GetConfigureFlow returns the ConfigureFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedAuthenticatorStaticStageRequest) GetConfigureFlow() string { - if o == nil || o.ConfigureFlow.Get() == nil { + if o == nil || IsNil(o.ConfigureFlow.Get()) { var ret string return ret } @@ -150,7 +153,7 @@ func (o *PatchedAuthenticatorStaticStageRequest) UnsetConfigureFlow() { // GetTokenCount returns the TokenCount field value if set, zero value otherwise. func (o *PatchedAuthenticatorStaticStageRequest) GetTokenCount() int32 { - if o == nil || o.TokenCount == nil { + if o == nil || IsNil(o.TokenCount) { var ret int32 return ret } @@ -160,7 +163,7 @@ func (o *PatchedAuthenticatorStaticStageRequest) GetTokenCount() int32 { // GetTokenCountOk returns a tuple with the TokenCount field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedAuthenticatorStaticStageRequest) GetTokenCountOk() (*int32, bool) { - if o == nil || o.TokenCount == nil { + if o == nil || IsNil(o.TokenCount) { return nil, false } return o.TokenCount, true @@ -168,7 +171,7 @@ func (o *PatchedAuthenticatorStaticStageRequest) GetTokenCountOk() (*int32, bool // HasTokenCount returns a boolean if a field has been set. func (o *PatchedAuthenticatorStaticStageRequest) HasTokenCount() bool { - if o != nil && o.TokenCount != nil { + if o != nil && !IsNil(o.TokenCount) { return true } @@ -181,20 +184,28 @@ func (o *PatchedAuthenticatorStaticStageRequest) SetTokenCount(v int32) { } func (o PatchedAuthenticatorStaticStageRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedAuthenticatorStaticStageRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.FlowSet != nil { + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } if o.ConfigureFlow.IsSet() { toSerialize["configure_flow"] = o.ConfigureFlow.Get() } - if o.TokenCount != nil { + if !IsNil(o.TokenCount) { toSerialize["token_count"] = o.TokenCount } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedAuthenticatorStaticStageRequest struct { diff --git a/model_patched_authenticator_totp_stage_request.go b/model_patched_authenticator_totp_stage_request.go index fa37f429d..2e162b553 100644 --- a/model_patched_authenticator_totp_stage_request.go +++ b/model_patched_authenticator_totp_stage_request.go @@ -15,13 +15,16 @@ import ( "encoding/json" ) +// checks if the PatchedAuthenticatorTOTPStageRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedAuthenticatorTOTPStageRequest{} + // PatchedAuthenticatorTOTPStageRequest AuthenticatorTOTPStage Serializer type PatchedAuthenticatorTOTPStageRequest struct { Name *string `json:"name,omitempty"` FlowSet []FlowSetRequest `json:"flow_set,omitempty"` // Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. - ConfigureFlow NullableString `json:"configure_flow,omitempty"` - Digits NullableDigitsEnum `json:"digits,omitempty"` + ConfigureFlow NullableString `json:"configure_flow,omitempty"` + Digits *DigitsEnum `json:"digits,omitempty"` } // NewPatchedAuthenticatorTOTPStageRequest instantiates a new PatchedAuthenticatorTOTPStageRequest object @@ -43,7 +46,7 @@ func NewPatchedAuthenticatorTOTPStageRequestWithDefaults() *PatchedAuthenticator // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedAuthenticatorTOTPStageRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -53,7 +56,7 @@ func (o *PatchedAuthenticatorTOTPStageRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedAuthenticatorTOTPStageRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -61,7 +64,7 @@ func (o *PatchedAuthenticatorTOTPStageRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedAuthenticatorTOTPStageRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -75,7 +78,7 @@ func (o *PatchedAuthenticatorTOTPStageRequest) SetName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *PatchedAuthenticatorTOTPStageRequest) GetFlowSet() []FlowSetRequest { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSetRequest return ret } @@ -85,7 +88,7 @@ func (o *PatchedAuthenticatorTOTPStageRequest) GetFlowSet() []FlowSetRequest { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedAuthenticatorTOTPStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -93,7 +96,7 @@ func (o *PatchedAuthenticatorTOTPStageRequest) GetFlowSetOk() ([]FlowSetRequest, // HasFlowSet returns a boolean if a field has been set. func (o *PatchedAuthenticatorTOTPStageRequest) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -107,7 +110,7 @@ func (o *PatchedAuthenticatorTOTPStageRequest) SetFlowSet(v []FlowSetRequest) { // GetConfigureFlow returns the ConfigureFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedAuthenticatorTOTPStageRequest) GetConfigureFlow() string { - if o == nil || o.ConfigureFlow.Get() == nil { + if o == nil || IsNil(o.ConfigureFlow.Get()) { var ret string return ret } @@ -148,64 +151,61 @@ func (o *PatchedAuthenticatorTOTPStageRequest) UnsetConfigureFlow() { o.ConfigureFlow.Unset() } -// GetDigits returns the Digits field value if set, zero value otherwise (both if not set or set to explicit null). +// GetDigits returns the Digits field value if set, zero value otherwise. func (o *PatchedAuthenticatorTOTPStageRequest) GetDigits() DigitsEnum { - if o == nil || o.Digits.Get() == nil { + if o == nil || IsNil(o.Digits) { var ret DigitsEnum return ret } - return *o.Digits.Get() + return *o.Digits } // GetDigitsOk returns a tuple with the Digits field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PatchedAuthenticatorTOTPStageRequest) GetDigitsOk() (*DigitsEnum, bool) { - if o == nil { + if o == nil || IsNil(o.Digits) { return nil, false } - return o.Digits.Get(), o.Digits.IsSet() + return o.Digits, true } // HasDigits returns a boolean if a field has been set. func (o *PatchedAuthenticatorTOTPStageRequest) HasDigits() bool { - if o != nil && o.Digits.IsSet() { + if o != nil && !IsNil(o.Digits) { return true } return false } -// SetDigits gets a reference to the given NullableDigitsEnum and assigns it to the Digits field. +// SetDigits gets a reference to the given DigitsEnum and assigns it to the Digits field. func (o *PatchedAuthenticatorTOTPStageRequest) SetDigits(v DigitsEnum) { - o.Digits.Set(&v) -} - -// SetDigitsNil sets the value for Digits to be an explicit nil -func (o *PatchedAuthenticatorTOTPStageRequest) SetDigitsNil() { - o.Digits.Set(nil) + o.Digits = &v } -// UnsetDigits ensures that no value is present for Digits, not even an explicit nil -func (o *PatchedAuthenticatorTOTPStageRequest) UnsetDigits() { - o.Digits.Unset() +func (o PatchedAuthenticatorTOTPStageRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) } -func (o PatchedAuthenticatorTOTPStageRequest) MarshalJSON() ([]byte, error) { +func (o PatchedAuthenticatorTOTPStageRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.FlowSet != nil { + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } if o.ConfigureFlow.IsSet() { toSerialize["configure_flow"] = o.ConfigureFlow.Get() } - if o.Digits.IsSet() { - toSerialize["digits"] = o.Digits.Get() + if !IsNil(o.Digits) { + toSerialize["digits"] = o.Digits } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedAuthenticatorTOTPStageRequest struct { diff --git a/model_patched_authenticator_validate_stage_request.go b/model_patched_authenticator_validate_stage_request.go index ce337e60e..258f35ed9 100644 --- a/model_patched_authenticator_validate_stage_request.go +++ b/model_patched_authenticator_validate_stage_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedAuthenticatorValidateStageRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedAuthenticatorValidateStageRequest{} + // PatchedAuthenticatorValidateStageRequest AuthenticatorValidateStage Serializer type PatchedAuthenticatorValidateStageRequest struct { Name *string `json:"name,omitempty"` @@ -25,9 +28,8 @@ type PatchedAuthenticatorValidateStageRequest struct { // Stages used to configure Authenticator when user doesn't have any compatible devices. After this configuration Stage passes, the user is not prompted again. ConfigurationStages []string `json:"configuration_stages,omitempty"` // If any of the user's device has been used within this threshold, this stage will be skipped - LastAuthThreshold *string `json:"last_auth_threshold,omitempty"` - // Enforce user verification for WebAuthn devices. * `required` - Required * `preferred` - Preferred * `discouraged` - Discouraged - WebauthnUserVerification NullableUserVerificationEnum `json:"webauthn_user_verification,omitempty"` + LastAuthThreshold *string `json:"last_auth_threshold,omitempty"` + WebauthnUserVerification *UserVerificationEnum `json:"webauthn_user_verification,omitempty"` } // NewPatchedAuthenticatorValidateStageRequest instantiates a new PatchedAuthenticatorValidateStageRequest object @@ -49,7 +51,7 @@ func NewPatchedAuthenticatorValidateStageRequestWithDefaults() *PatchedAuthentic // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedAuthenticatorValidateStageRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -59,7 +61,7 @@ func (o *PatchedAuthenticatorValidateStageRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedAuthenticatorValidateStageRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -67,7 +69,7 @@ func (o *PatchedAuthenticatorValidateStageRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedAuthenticatorValidateStageRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -81,7 +83,7 @@ func (o *PatchedAuthenticatorValidateStageRequest) SetName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *PatchedAuthenticatorValidateStageRequest) GetFlowSet() []FlowSetRequest { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSetRequest return ret } @@ -91,7 +93,7 @@ func (o *PatchedAuthenticatorValidateStageRequest) GetFlowSet() []FlowSetRequest // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedAuthenticatorValidateStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -99,7 +101,7 @@ func (o *PatchedAuthenticatorValidateStageRequest) GetFlowSetOk() ([]FlowSetRequ // HasFlowSet returns a boolean if a field has been set. func (o *PatchedAuthenticatorValidateStageRequest) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -113,7 +115,7 @@ func (o *PatchedAuthenticatorValidateStageRequest) SetFlowSet(v []FlowSetRequest // GetNotConfiguredAction returns the NotConfiguredAction field value if set, zero value otherwise. func (o *PatchedAuthenticatorValidateStageRequest) GetNotConfiguredAction() NotConfiguredActionEnum { - if o == nil || o.NotConfiguredAction == nil { + if o == nil || IsNil(o.NotConfiguredAction) { var ret NotConfiguredActionEnum return ret } @@ -123,7 +125,7 @@ func (o *PatchedAuthenticatorValidateStageRequest) GetNotConfiguredAction() NotC // GetNotConfiguredActionOk returns a tuple with the NotConfiguredAction field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedAuthenticatorValidateStageRequest) GetNotConfiguredActionOk() (*NotConfiguredActionEnum, bool) { - if o == nil || o.NotConfiguredAction == nil { + if o == nil || IsNil(o.NotConfiguredAction) { return nil, false } return o.NotConfiguredAction, true @@ -131,7 +133,7 @@ func (o *PatchedAuthenticatorValidateStageRequest) GetNotConfiguredActionOk() (* // HasNotConfiguredAction returns a boolean if a field has been set. func (o *PatchedAuthenticatorValidateStageRequest) HasNotConfiguredAction() bool { - if o != nil && o.NotConfiguredAction != nil { + if o != nil && !IsNil(o.NotConfiguredAction) { return true } @@ -145,7 +147,7 @@ func (o *PatchedAuthenticatorValidateStageRequest) SetNotConfiguredAction(v NotC // GetDeviceClasses returns the DeviceClasses field value if set, zero value otherwise. func (o *PatchedAuthenticatorValidateStageRequest) GetDeviceClasses() []DeviceClassesEnum { - if o == nil || o.DeviceClasses == nil { + if o == nil || IsNil(o.DeviceClasses) { var ret []DeviceClassesEnum return ret } @@ -155,7 +157,7 @@ func (o *PatchedAuthenticatorValidateStageRequest) GetDeviceClasses() []DeviceCl // GetDeviceClassesOk returns a tuple with the DeviceClasses field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedAuthenticatorValidateStageRequest) GetDeviceClassesOk() ([]DeviceClassesEnum, bool) { - if o == nil || o.DeviceClasses == nil { + if o == nil || IsNil(o.DeviceClasses) { return nil, false } return o.DeviceClasses, true @@ -163,7 +165,7 @@ func (o *PatchedAuthenticatorValidateStageRequest) GetDeviceClassesOk() ([]Devic // HasDeviceClasses returns a boolean if a field has been set. func (o *PatchedAuthenticatorValidateStageRequest) HasDeviceClasses() bool { - if o != nil && o.DeviceClasses != nil { + if o != nil && !IsNil(o.DeviceClasses) { return true } @@ -177,7 +179,7 @@ func (o *PatchedAuthenticatorValidateStageRequest) SetDeviceClasses(v []DeviceCl // GetConfigurationStages returns the ConfigurationStages field value if set, zero value otherwise. func (o *PatchedAuthenticatorValidateStageRequest) GetConfigurationStages() []string { - if o == nil || o.ConfigurationStages == nil { + if o == nil || IsNil(o.ConfigurationStages) { var ret []string return ret } @@ -187,7 +189,7 @@ func (o *PatchedAuthenticatorValidateStageRequest) GetConfigurationStages() []st // GetConfigurationStagesOk returns a tuple with the ConfigurationStages field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedAuthenticatorValidateStageRequest) GetConfigurationStagesOk() ([]string, bool) { - if o == nil || o.ConfigurationStages == nil { + if o == nil || IsNil(o.ConfigurationStages) { return nil, false } return o.ConfigurationStages, true @@ -195,7 +197,7 @@ func (o *PatchedAuthenticatorValidateStageRequest) GetConfigurationStagesOk() ([ // HasConfigurationStages returns a boolean if a field has been set. func (o *PatchedAuthenticatorValidateStageRequest) HasConfigurationStages() bool { - if o != nil && o.ConfigurationStages != nil { + if o != nil && !IsNil(o.ConfigurationStages) { return true } @@ -209,7 +211,7 @@ func (o *PatchedAuthenticatorValidateStageRequest) SetConfigurationStages(v []st // GetLastAuthThreshold returns the LastAuthThreshold field value if set, zero value otherwise. func (o *PatchedAuthenticatorValidateStageRequest) GetLastAuthThreshold() string { - if o == nil || o.LastAuthThreshold == nil { + if o == nil || IsNil(o.LastAuthThreshold) { var ret string return ret } @@ -219,7 +221,7 @@ func (o *PatchedAuthenticatorValidateStageRequest) GetLastAuthThreshold() string // GetLastAuthThresholdOk returns a tuple with the LastAuthThreshold field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedAuthenticatorValidateStageRequest) GetLastAuthThresholdOk() (*string, bool) { - if o == nil || o.LastAuthThreshold == nil { + if o == nil || IsNil(o.LastAuthThreshold) { return nil, false } return o.LastAuthThreshold, true @@ -227,7 +229,7 @@ func (o *PatchedAuthenticatorValidateStageRequest) GetLastAuthThresholdOk() (*st // HasLastAuthThreshold returns a boolean if a field has been set. func (o *PatchedAuthenticatorValidateStageRequest) HasLastAuthThreshold() bool { - if o != nil && o.LastAuthThreshold != nil { + if o != nil && !IsNil(o.LastAuthThreshold) { return true } @@ -239,73 +241,70 @@ func (o *PatchedAuthenticatorValidateStageRequest) SetLastAuthThreshold(v string o.LastAuthThreshold = &v } -// GetWebauthnUserVerification returns the WebauthnUserVerification field value if set, zero value otherwise (both if not set or set to explicit null). +// GetWebauthnUserVerification returns the WebauthnUserVerification field value if set, zero value otherwise. func (o *PatchedAuthenticatorValidateStageRequest) GetWebauthnUserVerification() UserVerificationEnum { - if o == nil || o.WebauthnUserVerification.Get() == nil { + if o == nil || IsNil(o.WebauthnUserVerification) { var ret UserVerificationEnum return ret } - return *o.WebauthnUserVerification.Get() + return *o.WebauthnUserVerification } // GetWebauthnUserVerificationOk returns a tuple with the WebauthnUserVerification field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PatchedAuthenticatorValidateStageRequest) GetWebauthnUserVerificationOk() (*UserVerificationEnum, bool) { - if o == nil { + if o == nil || IsNil(o.WebauthnUserVerification) { return nil, false } - return o.WebauthnUserVerification.Get(), o.WebauthnUserVerification.IsSet() + return o.WebauthnUserVerification, true } // HasWebauthnUserVerification returns a boolean if a field has been set. func (o *PatchedAuthenticatorValidateStageRequest) HasWebauthnUserVerification() bool { - if o != nil && o.WebauthnUserVerification.IsSet() { + if o != nil && !IsNil(o.WebauthnUserVerification) { return true } return false } -// SetWebauthnUserVerification gets a reference to the given NullableUserVerificationEnum and assigns it to the WebauthnUserVerification field. +// SetWebauthnUserVerification gets a reference to the given UserVerificationEnum and assigns it to the WebauthnUserVerification field. func (o *PatchedAuthenticatorValidateStageRequest) SetWebauthnUserVerification(v UserVerificationEnum) { - o.WebauthnUserVerification.Set(&v) -} - -// SetWebauthnUserVerificationNil sets the value for WebauthnUserVerification to be an explicit nil -func (o *PatchedAuthenticatorValidateStageRequest) SetWebauthnUserVerificationNil() { - o.WebauthnUserVerification.Set(nil) + o.WebauthnUserVerification = &v } -// UnsetWebauthnUserVerification ensures that no value is present for WebauthnUserVerification, not even an explicit nil -func (o *PatchedAuthenticatorValidateStageRequest) UnsetWebauthnUserVerification() { - o.WebauthnUserVerification.Unset() +func (o PatchedAuthenticatorValidateStageRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) } -func (o PatchedAuthenticatorValidateStageRequest) MarshalJSON() ([]byte, error) { +func (o PatchedAuthenticatorValidateStageRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.FlowSet != nil { + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } - if o.NotConfiguredAction != nil { + if !IsNil(o.NotConfiguredAction) { toSerialize["not_configured_action"] = o.NotConfiguredAction } - if o.DeviceClasses != nil { + if !IsNil(o.DeviceClasses) { toSerialize["device_classes"] = o.DeviceClasses } - if o.ConfigurationStages != nil { + if !IsNil(o.ConfigurationStages) { toSerialize["configuration_stages"] = o.ConfigurationStages } - if o.LastAuthThreshold != nil { + if !IsNil(o.LastAuthThreshold) { toSerialize["last_auth_threshold"] = o.LastAuthThreshold } - if o.WebauthnUserVerification.IsSet() { - toSerialize["webauthn_user_verification"] = o.WebauthnUserVerification.Get() + if !IsNil(o.WebauthnUserVerification) { + toSerialize["webauthn_user_verification"] = o.WebauthnUserVerification } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedAuthenticatorValidateStageRequest struct { diff --git a/model_patched_blueprint_instance_request.go b/model_patched_blueprint_instance_request.go index 4a83a5137..3c49b2509 100644 --- a/model_patched_blueprint_instance_request.go +++ b/model_patched_blueprint_instance_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedBlueprintInstanceRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedBlueprintInstanceRequest{} + // PatchedBlueprintInstanceRequest Info about a single blueprint instance file type PatchedBlueprintInstanceRequest struct { Name *string `json:"name,omitempty"` @@ -47,7 +50,7 @@ func NewPatchedBlueprintInstanceRequestWithDefaults() *PatchedBlueprintInstanceR // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedBlueprintInstanceRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -57,7 +60,7 @@ func (o *PatchedBlueprintInstanceRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedBlueprintInstanceRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -65,7 +68,7 @@ func (o *PatchedBlueprintInstanceRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedBlueprintInstanceRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -79,7 +82,7 @@ func (o *PatchedBlueprintInstanceRequest) SetName(v string) { // GetPath returns the Path field value if set, zero value otherwise. func (o *PatchedBlueprintInstanceRequest) GetPath() string { - if o == nil || o.Path == nil { + if o == nil || IsNil(o.Path) { var ret string return ret } @@ -89,7 +92,7 @@ func (o *PatchedBlueprintInstanceRequest) GetPath() string { // GetPathOk returns a tuple with the Path field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedBlueprintInstanceRequest) GetPathOk() (*string, bool) { - if o == nil || o.Path == nil { + if o == nil || IsNil(o.Path) { return nil, false } return o.Path, true @@ -97,7 +100,7 @@ func (o *PatchedBlueprintInstanceRequest) GetPathOk() (*string, bool) { // HasPath returns a boolean if a field has been set. func (o *PatchedBlueprintInstanceRequest) HasPath() bool { - if o != nil && o.Path != nil { + if o != nil && !IsNil(o.Path) { return true } @@ -111,7 +114,7 @@ func (o *PatchedBlueprintInstanceRequest) SetPath(v string) { // GetContext returns the Context field value if set, zero value otherwise. func (o *PatchedBlueprintInstanceRequest) GetContext() map[string]interface{} { - if o == nil || o.Context == nil { + if o == nil || IsNil(o.Context) { var ret map[string]interface{} return ret } @@ -121,15 +124,15 @@ func (o *PatchedBlueprintInstanceRequest) GetContext() map[string]interface{} { // GetContextOk returns a tuple with the Context field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedBlueprintInstanceRequest) GetContextOk() (map[string]interface{}, bool) { - if o == nil || o.Context == nil { - return nil, false + if o == nil || IsNil(o.Context) { + return map[string]interface{}{}, false } return o.Context, true } // HasContext returns a boolean if a field has been set. func (o *PatchedBlueprintInstanceRequest) HasContext() bool { - if o != nil && o.Context != nil { + if o != nil && !IsNil(o.Context) { return true } @@ -143,7 +146,7 @@ func (o *PatchedBlueprintInstanceRequest) SetContext(v map[string]interface{}) { // GetEnabled returns the Enabled field value if set, zero value otherwise. func (o *PatchedBlueprintInstanceRequest) GetEnabled() bool { - if o == nil || o.Enabled == nil { + if o == nil || IsNil(o.Enabled) { var ret bool return ret } @@ -153,7 +156,7 @@ func (o *PatchedBlueprintInstanceRequest) GetEnabled() bool { // GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedBlueprintInstanceRequest) GetEnabledOk() (*bool, bool) { - if o == nil || o.Enabled == nil { + if o == nil || IsNil(o.Enabled) { return nil, false } return o.Enabled, true @@ -161,7 +164,7 @@ func (o *PatchedBlueprintInstanceRequest) GetEnabledOk() (*bool, bool) { // HasEnabled returns a boolean if a field has been set. func (o *PatchedBlueprintInstanceRequest) HasEnabled() bool { - if o != nil && o.Enabled != nil { + if o != nil && !IsNil(o.Enabled) { return true } @@ -175,7 +178,7 @@ func (o *PatchedBlueprintInstanceRequest) SetEnabled(v bool) { // GetContent returns the Content field value if set, zero value otherwise. func (o *PatchedBlueprintInstanceRequest) GetContent() string { - if o == nil || o.Content == nil { + if o == nil || IsNil(o.Content) { var ret string return ret } @@ -185,7 +188,7 @@ func (o *PatchedBlueprintInstanceRequest) GetContent() string { // GetContentOk returns a tuple with the Content field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedBlueprintInstanceRequest) GetContentOk() (*string, bool) { - if o == nil || o.Content == nil { + if o == nil || IsNil(o.Content) { return nil, false } return o.Content, true @@ -193,7 +196,7 @@ func (o *PatchedBlueprintInstanceRequest) GetContentOk() (*string, bool) { // HasContent returns a boolean if a field has been set. func (o *PatchedBlueprintInstanceRequest) HasContent() bool { - if o != nil && o.Content != nil { + if o != nil && !IsNil(o.Content) { return true } @@ -206,23 +209,31 @@ func (o *PatchedBlueprintInstanceRequest) SetContent(v string) { } func (o PatchedBlueprintInstanceRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedBlueprintInstanceRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.Path != nil { + if !IsNil(o.Path) { toSerialize["path"] = o.Path } - if o.Context != nil { + if !IsNil(o.Context) { toSerialize["context"] = o.Context } - if o.Enabled != nil { + if !IsNil(o.Enabled) { toSerialize["enabled"] = o.Enabled } - if o.Content != nil { + if !IsNil(o.Content) { toSerialize["content"] = o.Content } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedBlueprintInstanceRequest struct { diff --git a/model_patched_captcha_stage_request.go b/model_patched_captcha_stage_request.go index 0aad667b8..f3d53e01c 100644 --- a/model_patched_captcha_stage_request.go +++ b/model_patched_captcha_stage_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedCaptchaStageRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedCaptchaStageRequest{} + // PatchedCaptchaStageRequest CaptchaStage Serializer type PatchedCaptchaStageRequest struct { Name *string `json:"name,omitempty"` @@ -46,7 +49,7 @@ func NewPatchedCaptchaStageRequestWithDefaults() *PatchedCaptchaStageRequest { // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedCaptchaStageRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -56,7 +59,7 @@ func (o *PatchedCaptchaStageRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedCaptchaStageRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -64,7 +67,7 @@ func (o *PatchedCaptchaStageRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedCaptchaStageRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -78,7 +81,7 @@ func (o *PatchedCaptchaStageRequest) SetName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *PatchedCaptchaStageRequest) GetFlowSet() []FlowSetRequest { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSetRequest return ret } @@ -88,7 +91,7 @@ func (o *PatchedCaptchaStageRequest) GetFlowSet() []FlowSetRequest { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedCaptchaStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -96,7 +99,7 @@ func (o *PatchedCaptchaStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { // HasFlowSet returns a boolean if a field has been set. func (o *PatchedCaptchaStageRequest) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -110,7 +113,7 @@ func (o *PatchedCaptchaStageRequest) SetFlowSet(v []FlowSetRequest) { // GetPublicKey returns the PublicKey field value if set, zero value otherwise. func (o *PatchedCaptchaStageRequest) GetPublicKey() string { - if o == nil || o.PublicKey == nil { + if o == nil || IsNil(o.PublicKey) { var ret string return ret } @@ -120,7 +123,7 @@ func (o *PatchedCaptchaStageRequest) GetPublicKey() string { // GetPublicKeyOk returns a tuple with the PublicKey field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedCaptchaStageRequest) GetPublicKeyOk() (*string, bool) { - if o == nil || o.PublicKey == nil { + if o == nil || IsNil(o.PublicKey) { return nil, false } return o.PublicKey, true @@ -128,7 +131,7 @@ func (o *PatchedCaptchaStageRequest) GetPublicKeyOk() (*string, bool) { // HasPublicKey returns a boolean if a field has been set. func (o *PatchedCaptchaStageRequest) HasPublicKey() bool { - if o != nil && o.PublicKey != nil { + if o != nil && !IsNil(o.PublicKey) { return true } @@ -142,7 +145,7 @@ func (o *PatchedCaptchaStageRequest) SetPublicKey(v string) { // GetPrivateKey returns the PrivateKey field value if set, zero value otherwise. func (o *PatchedCaptchaStageRequest) GetPrivateKey() string { - if o == nil || o.PrivateKey == nil { + if o == nil || IsNil(o.PrivateKey) { var ret string return ret } @@ -152,7 +155,7 @@ func (o *PatchedCaptchaStageRequest) GetPrivateKey() string { // GetPrivateKeyOk returns a tuple with the PrivateKey field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedCaptchaStageRequest) GetPrivateKeyOk() (*string, bool) { - if o == nil || o.PrivateKey == nil { + if o == nil || IsNil(o.PrivateKey) { return nil, false } return o.PrivateKey, true @@ -160,7 +163,7 @@ func (o *PatchedCaptchaStageRequest) GetPrivateKeyOk() (*string, bool) { // HasPrivateKey returns a boolean if a field has been set. func (o *PatchedCaptchaStageRequest) HasPrivateKey() bool { - if o != nil && o.PrivateKey != nil { + if o != nil && !IsNil(o.PrivateKey) { return true } @@ -174,7 +177,7 @@ func (o *PatchedCaptchaStageRequest) SetPrivateKey(v string) { // GetJsUrl returns the JsUrl field value if set, zero value otherwise. func (o *PatchedCaptchaStageRequest) GetJsUrl() string { - if o == nil || o.JsUrl == nil { + if o == nil || IsNil(o.JsUrl) { var ret string return ret } @@ -184,7 +187,7 @@ func (o *PatchedCaptchaStageRequest) GetJsUrl() string { // GetJsUrlOk returns a tuple with the JsUrl field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedCaptchaStageRequest) GetJsUrlOk() (*string, bool) { - if o == nil || o.JsUrl == nil { + if o == nil || IsNil(o.JsUrl) { return nil, false } return o.JsUrl, true @@ -192,7 +195,7 @@ func (o *PatchedCaptchaStageRequest) GetJsUrlOk() (*string, bool) { // HasJsUrl returns a boolean if a field has been set. func (o *PatchedCaptchaStageRequest) HasJsUrl() bool { - if o != nil && o.JsUrl != nil { + if o != nil && !IsNil(o.JsUrl) { return true } @@ -206,7 +209,7 @@ func (o *PatchedCaptchaStageRequest) SetJsUrl(v string) { // GetApiUrl returns the ApiUrl field value if set, zero value otherwise. func (o *PatchedCaptchaStageRequest) GetApiUrl() string { - if o == nil || o.ApiUrl == nil { + if o == nil || IsNil(o.ApiUrl) { var ret string return ret } @@ -216,7 +219,7 @@ func (o *PatchedCaptchaStageRequest) GetApiUrl() string { // GetApiUrlOk returns a tuple with the ApiUrl field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedCaptchaStageRequest) GetApiUrlOk() (*string, bool) { - if o == nil || o.ApiUrl == nil { + if o == nil || IsNil(o.ApiUrl) { return nil, false } return o.ApiUrl, true @@ -224,7 +227,7 @@ func (o *PatchedCaptchaStageRequest) GetApiUrlOk() (*string, bool) { // HasApiUrl returns a boolean if a field has been set. func (o *PatchedCaptchaStageRequest) HasApiUrl() bool { - if o != nil && o.ApiUrl != nil { + if o != nil && !IsNil(o.ApiUrl) { return true } @@ -237,26 +240,34 @@ func (o *PatchedCaptchaStageRequest) SetApiUrl(v string) { } func (o PatchedCaptchaStageRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedCaptchaStageRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.FlowSet != nil { + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } - if o.PublicKey != nil { + if !IsNil(o.PublicKey) { toSerialize["public_key"] = o.PublicKey } - if o.PrivateKey != nil { + if !IsNil(o.PrivateKey) { toSerialize["private_key"] = o.PrivateKey } - if o.JsUrl != nil { + if !IsNil(o.JsUrl) { toSerialize["js_url"] = o.JsUrl } - if o.ApiUrl != nil { + if !IsNil(o.ApiUrl) { toSerialize["api_url"] = o.ApiUrl } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedCaptchaStageRequest struct { diff --git a/model_patched_certificate_key_pair_request.go b/model_patched_certificate_key_pair_request.go index 6e09cff17..c4a22b15e 100644 --- a/model_patched_certificate_key_pair_request.go +++ b/model_patched_certificate_key_pair_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedCertificateKeyPairRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedCertificateKeyPairRequest{} + // PatchedCertificateKeyPairRequest CertificateKeyPair Serializer type PatchedCertificateKeyPairRequest struct { Name *string `json:"name,omitempty"` @@ -45,7 +48,7 @@ func NewPatchedCertificateKeyPairRequestWithDefaults() *PatchedCertificateKeyPai // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedCertificateKeyPairRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -55,7 +58,7 @@ func (o *PatchedCertificateKeyPairRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedCertificateKeyPairRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -63,7 +66,7 @@ func (o *PatchedCertificateKeyPairRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedCertificateKeyPairRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -77,7 +80,7 @@ func (o *PatchedCertificateKeyPairRequest) SetName(v string) { // GetCertificateData returns the CertificateData field value if set, zero value otherwise. func (o *PatchedCertificateKeyPairRequest) GetCertificateData() string { - if o == nil || o.CertificateData == nil { + if o == nil || IsNil(o.CertificateData) { var ret string return ret } @@ -87,7 +90,7 @@ func (o *PatchedCertificateKeyPairRequest) GetCertificateData() string { // GetCertificateDataOk returns a tuple with the CertificateData field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedCertificateKeyPairRequest) GetCertificateDataOk() (*string, bool) { - if o == nil || o.CertificateData == nil { + if o == nil || IsNil(o.CertificateData) { return nil, false } return o.CertificateData, true @@ -95,7 +98,7 @@ func (o *PatchedCertificateKeyPairRequest) GetCertificateDataOk() (*string, bool // HasCertificateData returns a boolean if a field has been set. func (o *PatchedCertificateKeyPairRequest) HasCertificateData() bool { - if o != nil && o.CertificateData != nil { + if o != nil && !IsNil(o.CertificateData) { return true } @@ -109,7 +112,7 @@ func (o *PatchedCertificateKeyPairRequest) SetCertificateData(v string) { // GetKeyData returns the KeyData field value if set, zero value otherwise. func (o *PatchedCertificateKeyPairRequest) GetKeyData() string { - if o == nil || o.KeyData == nil { + if o == nil || IsNil(o.KeyData) { var ret string return ret } @@ -119,7 +122,7 @@ func (o *PatchedCertificateKeyPairRequest) GetKeyData() string { // GetKeyDataOk returns a tuple with the KeyData field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedCertificateKeyPairRequest) GetKeyDataOk() (*string, bool) { - if o == nil || o.KeyData == nil { + if o == nil || IsNil(o.KeyData) { return nil, false } return o.KeyData, true @@ -127,7 +130,7 @@ func (o *PatchedCertificateKeyPairRequest) GetKeyDataOk() (*string, bool) { // HasKeyData returns a boolean if a field has been set. func (o *PatchedCertificateKeyPairRequest) HasKeyData() bool { - if o != nil && o.KeyData != nil { + if o != nil && !IsNil(o.KeyData) { return true } @@ -141,7 +144,7 @@ func (o *PatchedCertificateKeyPairRequest) SetKeyData(v string) { // GetManaged returns the Managed field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedCertificateKeyPairRequest) GetManaged() string { - if o == nil || o.Managed.Get() == nil { + if o == nil || IsNil(o.Managed.Get()) { var ret string return ret } @@ -183,20 +186,28 @@ func (o *PatchedCertificateKeyPairRequest) UnsetManaged() { } func (o PatchedCertificateKeyPairRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedCertificateKeyPairRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.CertificateData != nil { + if !IsNil(o.CertificateData) { toSerialize["certificate_data"] = o.CertificateData } - if o.KeyData != nil { + if !IsNil(o.KeyData) { toSerialize["key_data"] = o.KeyData } if o.Managed.IsSet() { toSerialize["managed"] = o.Managed.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedCertificateKeyPairRequest struct { diff --git a/model_patched_consent_stage_request.go b/model_patched_consent_stage_request.go index bfa59bfc1..b215c2cd7 100644 --- a/model_patched_consent_stage_request.go +++ b/model_patched_consent_stage_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedConsentStageRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedConsentStageRequest{} + // PatchedConsentStageRequest ConsentStage Serializer type PatchedConsentStageRequest struct { Name *string `json:"name,omitempty"` @@ -43,7 +46,7 @@ func NewPatchedConsentStageRequestWithDefaults() *PatchedConsentStageRequest { // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedConsentStageRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -53,7 +56,7 @@ func (o *PatchedConsentStageRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedConsentStageRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -61,7 +64,7 @@ func (o *PatchedConsentStageRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedConsentStageRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -75,7 +78,7 @@ func (o *PatchedConsentStageRequest) SetName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *PatchedConsentStageRequest) GetFlowSet() []FlowSetRequest { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSetRequest return ret } @@ -85,7 +88,7 @@ func (o *PatchedConsentStageRequest) GetFlowSet() []FlowSetRequest { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedConsentStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -93,7 +96,7 @@ func (o *PatchedConsentStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { // HasFlowSet returns a boolean if a field has been set. func (o *PatchedConsentStageRequest) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -107,7 +110,7 @@ func (o *PatchedConsentStageRequest) SetFlowSet(v []FlowSetRequest) { // GetMode returns the Mode field value if set, zero value otherwise. func (o *PatchedConsentStageRequest) GetMode() ConsentStageModeEnum { - if o == nil || o.Mode == nil { + if o == nil || IsNil(o.Mode) { var ret ConsentStageModeEnum return ret } @@ -117,7 +120,7 @@ func (o *PatchedConsentStageRequest) GetMode() ConsentStageModeEnum { // GetModeOk returns a tuple with the Mode field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedConsentStageRequest) GetModeOk() (*ConsentStageModeEnum, bool) { - if o == nil || o.Mode == nil { + if o == nil || IsNil(o.Mode) { return nil, false } return o.Mode, true @@ -125,7 +128,7 @@ func (o *PatchedConsentStageRequest) GetModeOk() (*ConsentStageModeEnum, bool) { // HasMode returns a boolean if a field has been set. func (o *PatchedConsentStageRequest) HasMode() bool { - if o != nil && o.Mode != nil { + if o != nil && !IsNil(o.Mode) { return true } @@ -139,7 +142,7 @@ func (o *PatchedConsentStageRequest) SetMode(v ConsentStageModeEnum) { // GetConsentExpireIn returns the ConsentExpireIn field value if set, zero value otherwise. func (o *PatchedConsentStageRequest) GetConsentExpireIn() string { - if o == nil || o.ConsentExpireIn == nil { + if o == nil || IsNil(o.ConsentExpireIn) { var ret string return ret } @@ -149,7 +152,7 @@ func (o *PatchedConsentStageRequest) GetConsentExpireIn() string { // GetConsentExpireInOk returns a tuple with the ConsentExpireIn field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedConsentStageRequest) GetConsentExpireInOk() (*string, bool) { - if o == nil || o.ConsentExpireIn == nil { + if o == nil || IsNil(o.ConsentExpireIn) { return nil, false } return o.ConsentExpireIn, true @@ -157,7 +160,7 @@ func (o *PatchedConsentStageRequest) GetConsentExpireInOk() (*string, bool) { // HasConsentExpireIn returns a boolean if a field has been set. func (o *PatchedConsentStageRequest) HasConsentExpireIn() bool { - if o != nil && o.ConsentExpireIn != nil { + if o != nil && !IsNil(o.ConsentExpireIn) { return true } @@ -170,20 +173,28 @@ func (o *PatchedConsentStageRequest) SetConsentExpireIn(v string) { } func (o PatchedConsentStageRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedConsentStageRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.FlowSet != nil { + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } - if o.Mode != nil { + if !IsNil(o.Mode) { toSerialize["mode"] = o.Mode } - if o.ConsentExpireIn != nil { + if !IsNil(o.ConsentExpireIn) { toSerialize["consent_expire_in"] = o.ConsentExpireIn } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedConsentStageRequest struct { diff --git a/model_patched_deny_stage_request.go b/model_patched_deny_stage_request.go index 0f2d9b3ba..f7a47b788 100644 --- a/model_patched_deny_stage_request.go +++ b/model_patched_deny_stage_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedDenyStageRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedDenyStageRequest{} + // PatchedDenyStageRequest DenyStage Serializer type PatchedDenyStageRequest struct { Name *string `json:"name,omitempty"` @@ -40,7 +43,7 @@ func NewPatchedDenyStageRequestWithDefaults() *PatchedDenyStageRequest { // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedDenyStageRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -50,7 +53,7 @@ func (o *PatchedDenyStageRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedDenyStageRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -58,7 +61,7 @@ func (o *PatchedDenyStageRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedDenyStageRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -72,7 +75,7 @@ func (o *PatchedDenyStageRequest) SetName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *PatchedDenyStageRequest) GetFlowSet() []FlowSetRequest { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSetRequest return ret } @@ -82,7 +85,7 @@ func (o *PatchedDenyStageRequest) GetFlowSet() []FlowSetRequest { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedDenyStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -90,7 +93,7 @@ func (o *PatchedDenyStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { // HasFlowSet returns a boolean if a field has been set. func (o *PatchedDenyStageRequest) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -103,14 +106,22 @@ func (o *PatchedDenyStageRequest) SetFlowSet(v []FlowSetRequest) { } func (o PatchedDenyStageRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedDenyStageRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.FlowSet != nil { + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedDenyStageRequest struct { diff --git a/model_patched_docker_service_connection_request.go b/model_patched_docker_service_connection_request.go index 42a2e1da8..b7304fd35 100644 --- a/model_patched_docker_service_connection_request.go +++ b/model_patched_docker_service_connection_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedDockerServiceConnectionRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedDockerServiceConnectionRequest{} + // PatchedDockerServiceConnectionRequest DockerServiceConnection Serializer type PatchedDockerServiceConnectionRequest struct { Name *string `json:"name,omitempty"` @@ -47,7 +50,7 @@ func NewPatchedDockerServiceConnectionRequestWithDefaults() *PatchedDockerServic // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedDockerServiceConnectionRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -57,7 +60,7 @@ func (o *PatchedDockerServiceConnectionRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedDockerServiceConnectionRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -65,7 +68,7 @@ func (o *PatchedDockerServiceConnectionRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedDockerServiceConnectionRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -79,7 +82,7 @@ func (o *PatchedDockerServiceConnectionRequest) SetName(v string) { // GetLocal returns the Local field value if set, zero value otherwise. func (o *PatchedDockerServiceConnectionRequest) GetLocal() bool { - if o == nil || o.Local == nil { + if o == nil || IsNil(o.Local) { var ret bool return ret } @@ -89,7 +92,7 @@ func (o *PatchedDockerServiceConnectionRequest) GetLocal() bool { // GetLocalOk returns a tuple with the Local field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedDockerServiceConnectionRequest) GetLocalOk() (*bool, bool) { - if o == nil || o.Local == nil { + if o == nil || IsNil(o.Local) { return nil, false } return o.Local, true @@ -97,7 +100,7 @@ func (o *PatchedDockerServiceConnectionRequest) GetLocalOk() (*bool, bool) { // HasLocal returns a boolean if a field has been set. func (o *PatchedDockerServiceConnectionRequest) HasLocal() bool { - if o != nil && o.Local != nil { + if o != nil && !IsNil(o.Local) { return true } @@ -111,7 +114,7 @@ func (o *PatchedDockerServiceConnectionRequest) SetLocal(v bool) { // GetUrl returns the Url field value if set, zero value otherwise. func (o *PatchedDockerServiceConnectionRequest) GetUrl() string { - if o == nil || o.Url == nil { + if o == nil || IsNil(o.Url) { var ret string return ret } @@ -121,7 +124,7 @@ func (o *PatchedDockerServiceConnectionRequest) GetUrl() string { // GetUrlOk returns a tuple with the Url field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedDockerServiceConnectionRequest) GetUrlOk() (*string, bool) { - if o == nil || o.Url == nil { + if o == nil || IsNil(o.Url) { return nil, false } return o.Url, true @@ -129,7 +132,7 @@ func (o *PatchedDockerServiceConnectionRequest) GetUrlOk() (*string, bool) { // HasUrl returns a boolean if a field has been set. func (o *PatchedDockerServiceConnectionRequest) HasUrl() bool { - if o != nil && o.Url != nil { + if o != nil && !IsNil(o.Url) { return true } @@ -143,7 +146,7 @@ func (o *PatchedDockerServiceConnectionRequest) SetUrl(v string) { // GetTlsVerification returns the TlsVerification field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedDockerServiceConnectionRequest) GetTlsVerification() string { - if o == nil || o.TlsVerification.Get() == nil { + if o == nil || IsNil(o.TlsVerification.Get()) { var ret string return ret } @@ -186,7 +189,7 @@ func (o *PatchedDockerServiceConnectionRequest) UnsetTlsVerification() { // GetTlsAuthentication returns the TlsAuthentication field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedDockerServiceConnectionRequest) GetTlsAuthentication() string { - if o == nil || o.TlsAuthentication.Get() == nil { + if o == nil || IsNil(o.TlsAuthentication.Get()) { var ret string return ret } @@ -228,14 +231,22 @@ func (o *PatchedDockerServiceConnectionRequest) UnsetTlsAuthentication() { } func (o PatchedDockerServiceConnectionRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedDockerServiceConnectionRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.Local != nil { + if !IsNil(o.Local) { toSerialize["local"] = o.Local } - if o.Url != nil { + if !IsNil(o.Url) { toSerialize["url"] = o.Url } if o.TlsVerification.IsSet() { @@ -244,7 +255,7 @@ func (o PatchedDockerServiceConnectionRequest) MarshalJSON() ([]byte, error) { if o.TlsAuthentication.IsSet() { toSerialize["tls_authentication"] = o.TlsAuthentication.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedDockerServiceConnectionRequest struct { diff --git a/model_patched_dummy_policy_request.go b/model_patched_dummy_policy_request.go index a844da963..09a6177ea 100644 --- a/model_patched_dummy_policy_request.go +++ b/model_patched_dummy_policy_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedDummyPolicyRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedDummyPolicyRequest{} + // PatchedDummyPolicyRequest Dummy Policy Serializer type PatchedDummyPolicyRequest struct { Name *string `json:"name,omitempty"` @@ -44,7 +47,7 @@ func NewPatchedDummyPolicyRequestWithDefaults() *PatchedDummyPolicyRequest { // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedDummyPolicyRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -54,7 +57,7 @@ func (o *PatchedDummyPolicyRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedDummyPolicyRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -62,7 +65,7 @@ func (o *PatchedDummyPolicyRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedDummyPolicyRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -76,7 +79,7 @@ func (o *PatchedDummyPolicyRequest) SetName(v string) { // GetExecutionLogging returns the ExecutionLogging field value if set, zero value otherwise. func (o *PatchedDummyPolicyRequest) GetExecutionLogging() bool { - if o == nil || o.ExecutionLogging == nil { + if o == nil || IsNil(o.ExecutionLogging) { var ret bool return ret } @@ -86,7 +89,7 @@ func (o *PatchedDummyPolicyRequest) GetExecutionLogging() bool { // GetExecutionLoggingOk returns a tuple with the ExecutionLogging field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedDummyPolicyRequest) GetExecutionLoggingOk() (*bool, bool) { - if o == nil || o.ExecutionLogging == nil { + if o == nil || IsNil(o.ExecutionLogging) { return nil, false } return o.ExecutionLogging, true @@ -94,7 +97,7 @@ func (o *PatchedDummyPolicyRequest) GetExecutionLoggingOk() (*bool, bool) { // HasExecutionLogging returns a boolean if a field has been set. func (o *PatchedDummyPolicyRequest) HasExecutionLogging() bool { - if o != nil && o.ExecutionLogging != nil { + if o != nil && !IsNil(o.ExecutionLogging) { return true } @@ -108,7 +111,7 @@ func (o *PatchedDummyPolicyRequest) SetExecutionLogging(v bool) { // GetResult returns the Result field value if set, zero value otherwise. func (o *PatchedDummyPolicyRequest) GetResult() bool { - if o == nil || o.Result == nil { + if o == nil || IsNil(o.Result) { var ret bool return ret } @@ -118,7 +121,7 @@ func (o *PatchedDummyPolicyRequest) GetResult() bool { // GetResultOk returns a tuple with the Result field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedDummyPolicyRequest) GetResultOk() (*bool, bool) { - if o == nil || o.Result == nil { + if o == nil || IsNil(o.Result) { return nil, false } return o.Result, true @@ -126,7 +129,7 @@ func (o *PatchedDummyPolicyRequest) GetResultOk() (*bool, bool) { // HasResult returns a boolean if a field has been set. func (o *PatchedDummyPolicyRequest) HasResult() bool { - if o != nil && o.Result != nil { + if o != nil && !IsNil(o.Result) { return true } @@ -140,7 +143,7 @@ func (o *PatchedDummyPolicyRequest) SetResult(v bool) { // GetWaitMin returns the WaitMin field value if set, zero value otherwise. func (o *PatchedDummyPolicyRequest) GetWaitMin() int32 { - if o == nil || o.WaitMin == nil { + if o == nil || IsNil(o.WaitMin) { var ret int32 return ret } @@ -150,7 +153,7 @@ func (o *PatchedDummyPolicyRequest) GetWaitMin() int32 { // GetWaitMinOk returns a tuple with the WaitMin field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedDummyPolicyRequest) GetWaitMinOk() (*int32, bool) { - if o == nil || o.WaitMin == nil { + if o == nil || IsNil(o.WaitMin) { return nil, false } return o.WaitMin, true @@ -158,7 +161,7 @@ func (o *PatchedDummyPolicyRequest) GetWaitMinOk() (*int32, bool) { // HasWaitMin returns a boolean if a field has been set. func (o *PatchedDummyPolicyRequest) HasWaitMin() bool { - if o != nil && o.WaitMin != nil { + if o != nil && !IsNil(o.WaitMin) { return true } @@ -172,7 +175,7 @@ func (o *PatchedDummyPolicyRequest) SetWaitMin(v int32) { // GetWaitMax returns the WaitMax field value if set, zero value otherwise. func (o *PatchedDummyPolicyRequest) GetWaitMax() int32 { - if o == nil || o.WaitMax == nil { + if o == nil || IsNil(o.WaitMax) { var ret int32 return ret } @@ -182,7 +185,7 @@ func (o *PatchedDummyPolicyRequest) GetWaitMax() int32 { // GetWaitMaxOk returns a tuple with the WaitMax field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedDummyPolicyRequest) GetWaitMaxOk() (*int32, bool) { - if o == nil || o.WaitMax == nil { + if o == nil || IsNil(o.WaitMax) { return nil, false } return o.WaitMax, true @@ -190,7 +193,7 @@ func (o *PatchedDummyPolicyRequest) GetWaitMaxOk() (*int32, bool) { // HasWaitMax returns a boolean if a field has been set. func (o *PatchedDummyPolicyRequest) HasWaitMax() bool { - if o != nil && o.WaitMax != nil { + if o != nil && !IsNil(o.WaitMax) { return true } @@ -203,23 +206,31 @@ func (o *PatchedDummyPolicyRequest) SetWaitMax(v int32) { } func (o PatchedDummyPolicyRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedDummyPolicyRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.ExecutionLogging != nil { + if !IsNil(o.ExecutionLogging) { toSerialize["execution_logging"] = o.ExecutionLogging } - if o.Result != nil { + if !IsNil(o.Result) { toSerialize["result"] = o.Result } - if o.WaitMin != nil { + if !IsNil(o.WaitMin) { toSerialize["wait_min"] = o.WaitMin } - if o.WaitMax != nil { + if !IsNil(o.WaitMax) { toSerialize["wait_max"] = o.WaitMax } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedDummyPolicyRequest struct { diff --git a/model_patched_dummy_stage_request.go b/model_patched_dummy_stage_request.go index d4aa8d737..6b46a41f1 100644 --- a/model_patched_dummy_stage_request.go +++ b/model_patched_dummy_stage_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedDummyStageRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedDummyStageRequest{} + // PatchedDummyStageRequest DummyStage Serializer type PatchedDummyStageRequest struct { Name *string `json:"name,omitempty"` @@ -41,7 +44,7 @@ func NewPatchedDummyStageRequestWithDefaults() *PatchedDummyStageRequest { // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedDummyStageRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -51,7 +54,7 @@ func (o *PatchedDummyStageRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedDummyStageRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -59,7 +62,7 @@ func (o *PatchedDummyStageRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedDummyStageRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -73,7 +76,7 @@ func (o *PatchedDummyStageRequest) SetName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *PatchedDummyStageRequest) GetFlowSet() []FlowSetRequest { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSetRequest return ret } @@ -83,7 +86,7 @@ func (o *PatchedDummyStageRequest) GetFlowSet() []FlowSetRequest { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedDummyStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -91,7 +94,7 @@ func (o *PatchedDummyStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { // HasFlowSet returns a boolean if a field has been set. func (o *PatchedDummyStageRequest) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -105,7 +108,7 @@ func (o *PatchedDummyStageRequest) SetFlowSet(v []FlowSetRequest) { // GetThrowError returns the ThrowError field value if set, zero value otherwise. func (o *PatchedDummyStageRequest) GetThrowError() bool { - if o == nil || o.ThrowError == nil { + if o == nil || IsNil(o.ThrowError) { var ret bool return ret } @@ -115,7 +118,7 @@ func (o *PatchedDummyStageRequest) GetThrowError() bool { // GetThrowErrorOk returns a tuple with the ThrowError field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedDummyStageRequest) GetThrowErrorOk() (*bool, bool) { - if o == nil || o.ThrowError == nil { + if o == nil || IsNil(o.ThrowError) { return nil, false } return o.ThrowError, true @@ -123,7 +126,7 @@ func (o *PatchedDummyStageRequest) GetThrowErrorOk() (*bool, bool) { // HasThrowError returns a boolean if a field has been set. func (o *PatchedDummyStageRequest) HasThrowError() bool { - if o != nil && o.ThrowError != nil { + if o != nil && !IsNil(o.ThrowError) { return true } @@ -136,17 +139,25 @@ func (o *PatchedDummyStageRequest) SetThrowError(v bool) { } func (o PatchedDummyStageRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedDummyStageRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.FlowSet != nil { + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } - if o.ThrowError != nil { + if !IsNil(o.ThrowError) { toSerialize["throw_error"] = o.ThrowError } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedDummyStageRequest struct { diff --git a/model_patched_duo_device_request.go b/model_patched_duo_device_request.go index 83429b20d..0a610219b 100644 --- a/model_patched_duo_device_request.go +++ b/model_patched_duo_device_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedDuoDeviceRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedDuoDeviceRequest{} + // PatchedDuoDeviceRequest Serializer for Duo authenticator devices type PatchedDuoDeviceRequest struct { // The human-readable name of this device. @@ -40,7 +43,7 @@ func NewPatchedDuoDeviceRequestWithDefaults() *PatchedDuoDeviceRequest { // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedDuoDeviceRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -50,7 +53,7 @@ func (o *PatchedDuoDeviceRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedDuoDeviceRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -58,7 +61,7 @@ func (o *PatchedDuoDeviceRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedDuoDeviceRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -71,11 +74,19 @@ func (o *PatchedDuoDeviceRequest) SetName(v string) { } func (o PatchedDuoDeviceRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedDuoDeviceRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedDuoDeviceRequest struct { diff --git a/model_patched_email_stage_request.go b/model_patched_email_stage_request.go index d623a7597..f1d9ccafd 100644 --- a/model_patched_email_stage_request.go +++ b/model_patched_email_stage_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedEmailStageRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedEmailStageRequest{} + // PatchedEmailStageRequest EmailStage Serializer type PatchedEmailStageRequest struct { Name *string `json:"name,omitempty"` @@ -56,7 +59,7 @@ func NewPatchedEmailStageRequestWithDefaults() *PatchedEmailStageRequest { // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedEmailStageRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -66,7 +69,7 @@ func (o *PatchedEmailStageRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedEmailStageRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -74,7 +77,7 @@ func (o *PatchedEmailStageRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedEmailStageRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -88,7 +91,7 @@ func (o *PatchedEmailStageRequest) SetName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *PatchedEmailStageRequest) GetFlowSet() []FlowSetRequest { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSetRequest return ret } @@ -98,7 +101,7 @@ func (o *PatchedEmailStageRequest) GetFlowSet() []FlowSetRequest { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedEmailStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -106,7 +109,7 @@ func (o *PatchedEmailStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { // HasFlowSet returns a boolean if a field has been set. func (o *PatchedEmailStageRequest) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -120,7 +123,7 @@ func (o *PatchedEmailStageRequest) SetFlowSet(v []FlowSetRequest) { // GetUseGlobalSettings returns the UseGlobalSettings field value if set, zero value otherwise. func (o *PatchedEmailStageRequest) GetUseGlobalSettings() bool { - if o == nil || o.UseGlobalSettings == nil { + if o == nil || IsNil(o.UseGlobalSettings) { var ret bool return ret } @@ -130,7 +133,7 @@ func (o *PatchedEmailStageRequest) GetUseGlobalSettings() bool { // GetUseGlobalSettingsOk returns a tuple with the UseGlobalSettings field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedEmailStageRequest) GetUseGlobalSettingsOk() (*bool, bool) { - if o == nil || o.UseGlobalSettings == nil { + if o == nil || IsNil(o.UseGlobalSettings) { return nil, false } return o.UseGlobalSettings, true @@ -138,7 +141,7 @@ func (o *PatchedEmailStageRequest) GetUseGlobalSettingsOk() (*bool, bool) { // HasUseGlobalSettings returns a boolean if a field has been set. func (o *PatchedEmailStageRequest) HasUseGlobalSettings() bool { - if o != nil && o.UseGlobalSettings != nil { + if o != nil && !IsNil(o.UseGlobalSettings) { return true } @@ -152,7 +155,7 @@ func (o *PatchedEmailStageRequest) SetUseGlobalSettings(v bool) { // GetHost returns the Host field value if set, zero value otherwise. func (o *PatchedEmailStageRequest) GetHost() string { - if o == nil || o.Host == nil { + if o == nil || IsNil(o.Host) { var ret string return ret } @@ -162,7 +165,7 @@ func (o *PatchedEmailStageRequest) GetHost() string { // GetHostOk returns a tuple with the Host field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedEmailStageRequest) GetHostOk() (*string, bool) { - if o == nil || o.Host == nil { + if o == nil || IsNil(o.Host) { return nil, false } return o.Host, true @@ -170,7 +173,7 @@ func (o *PatchedEmailStageRequest) GetHostOk() (*string, bool) { // HasHost returns a boolean if a field has been set. func (o *PatchedEmailStageRequest) HasHost() bool { - if o != nil && o.Host != nil { + if o != nil && !IsNil(o.Host) { return true } @@ -184,7 +187,7 @@ func (o *PatchedEmailStageRequest) SetHost(v string) { // GetPort returns the Port field value if set, zero value otherwise. func (o *PatchedEmailStageRequest) GetPort() int32 { - if o == nil || o.Port == nil { + if o == nil || IsNil(o.Port) { var ret int32 return ret } @@ -194,7 +197,7 @@ func (o *PatchedEmailStageRequest) GetPort() int32 { // GetPortOk returns a tuple with the Port field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedEmailStageRequest) GetPortOk() (*int32, bool) { - if o == nil || o.Port == nil { + if o == nil || IsNil(o.Port) { return nil, false } return o.Port, true @@ -202,7 +205,7 @@ func (o *PatchedEmailStageRequest) GetPortOk() (*int32, bool) { // HasPort returns a boolean if a field has been set. func (o *PatchedEmailStageRequest) HasPort() bool { - if o != nil && o.Port != nil { + if o != nil && !IsNil(o.Port) { return true } @@ -216,7 +219,7 @@ func (o *PatchedEmailStageRequest) SetPort(v int32) { // GetUsername returns the Username field value if set, zero value otherwise. func (o *PatchedEmailStageRequest) GetUsername() string { - if o == nil || o.Username == nil { + if o == nil || IsNil(o.Username) { var ret string return ret } @@ -226,7 +229,7 @@ func (o *PatchedEmailStageRequest) GetUsername() string { // GetUsernameOk returns a tuple with the Username field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedEmailStageRequest) GetUsernameOk() (*string, bool) { - if o == nil || o.Username == nil { + if o == nil || IsNil(o.Username) { return nil, false } return o.Username, true @@ -234,7 +237,7 @@ func (o *PatchedEmailStageRequest) GetUsernameOk() (*string, bool) { // HasUsername returns a boolean if a field has been set. func (o *PatchedEmailStageRequest) HasUsername() bool { - if o != nil && o.Username != nil { + if o != nil && !IsNil(o.Username) { return true } @@ -248,7 +251,7 @@ func (o *PatchedEmailStageRequest) SetUsername(v string) { // GetPassword returns the Password field value if set, zero value otherwise. func (o *PatchedEmailStageRequest) GetPassword() string { - if o == nil || o.Password == nil { + if o == nil || IsNil(o.Password) { var ret string return ret } @@ -258,7 +261,7 @@ func (o *PatchedEmailStageRequest) GetPassword() string { // GetPasswordOk returns a tuple with the Password field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedEmailStageRequest) GetPasswordOk() (*string, bool) { - if o == nil || o.Password == nil { + if o == nil || IsNil(o.Password) { return nil, false } return o.Password, true @@ -266,7 +269,7 @@ func (o *PatchedEmailStageRequest) GetPasswordOk() (*string, bool) { // HasPassword returns a boolean if a field has been set. func (o *PatchedEmailStageRequest) HasPassword() bool { - if o != nil && o.Password != nil { + if o != nil && !IsNil(o.Password) { return true } @@ -280,7 +283,7 @@ func (o *PatchedEmailStageRequest) SetPassword(v string) { // GetUseTls returns the UseTls field value if set, zero value otherwise. func (o *PatchedEmailStageRequest) GetUseTls() bool { - if o == nil || o.UseTls == nil { + if o == nil || IsNil(o.UseTls) { var ret bool return ret } @@ -290,7 +293,7 @@ func (o *PatchedEmailStageRequest) GetUseTls() bool { // GetUseTlsOk returns a tuple with the UseTls field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedEmailStageRequest) GetUseTlsOk() (*bool, bool) { - if o == nil || o.UseTls == nil { + if o == nil || IsNil(o.UseTls) { return nil, false } return o.UseTls, true @@ -298,7 +301,7 @@ func (o *PatchedEmailStageRequest) GetUseTlsOk() (*bool, bool) { // HasUseTls returns a boolean if a field has been set. func (o *PatchedEmailStageRequest) HasUseTls() bool { - if o != nil && o.UseTls != nil { + if o != nil && !IsNil(o.UseTls) { return true } @@ -312,7 +315,7 @@ func (o *PatchedEmailStageRequest) SetUseTls(v bool) { // GetUseSsl returns the UseSsl field value if set, zero value otherwise. func (o *PatchedEmailStageRequest) GetUseSsl() bool { - if o == nil || o.UseSsl == nil { + if o == nil || IsNil(o.UseSsl) { var ret bool return ret } @@ -322,7 +325,7 @@ func (o *PatchedEmailStageRequest) GetUseSsl() bool { // GetUseSslOk returns a tuple with the UseSsl field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedEmailStageRequest) GetUseSslOk() (*bool, bool) { - if o == nil || o.UseSsl == nil { + if o == nil || IsNil(o.UseSsl) { return nil, false } return o.UseSsl, true @@ -330,7 +333,7 @@ func (o *PatchedEmailStageRequest) GetUseSslOk() (*bool, bool) { // HasUseSsl returns a boolean if a field has been set. func (o *PatchedEmailStageRequest) HasUseSsl() bool { - if o != nil && o.UseSsl != nil { + if o != nil && !IsNil(o.UseSsl) { return true } @@ -344,7 +347,7 @@ func (o *PatchedEmailStageRequest) SetUseSsl(v bool) { // GetTimeout returns the Timeout field value if set, zero value otherwise. func (o *PatchedEmailStageRequest) GetTimeout() int32 { - if o == nil || o.Timeout == nil { + if o == nil || IsNil(o.Timeout) { var ret int32 return ret } @@ -354,7 +357,7 @@ func (o *PatchedEmailStageRequest) GetTimeout() int32 { // GetTimeoutOk returns a tuple with the Timeout field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedEmailStageRequest) GetTimeoutOk() (*int32, bool) { - if o == nil || o.Timeout == nil { + if o == nil || IsNil(o.Timeout) { return nil, false } return o.Timeout, true @@ -362,7 +365,7 @@ func (o *PatchedEmailStageRequest) GetTimeoutOk() (*int32, bool) { // HasTimeout returns a boolean if a field has been set. func (o *PatchedEmailStageRequest) HasTimeout() bool { - if o != nil && o.Timeout != nil { + if o != nil && !IsNil(o.Timeout) { return true } @@ -376,7 +379,7 @@ func (o *PatchedEmailStageRequest) SetTimeout(v int32) { // GetFromAddress returns the FromAddress field value if set, zero value otherwise. func (o *PatchedEmailStageRequest) GetFromAddress() string { - if o == nil || o.FromAddress == nil { + if o == nil || IsNil(o.FromAddress) { var ret string return ret } @@ -386,7 +389,7 @@ func (o *PatchedEmailStageRequest) GetFromAddress() string { // GetFromAddressOk returns a tuple with the FromAddress field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedEmailStageRequest) GetFromAddressOk() (*string, bool) { - if o == nil || o.FromAddress == nil { + if o == nil || IsNil(o.FromAddress) { return nil, false } return o.FromAddress, true @@ -394,7 +397,7 @@ func (o *PatchedEmailStageRequest) GetFromAddressOk() (*string, bool) { // HasFromAddress returns a boolean if a field has been set. func (o *PatchedEmailStageRequest) HasFromAddress() bool { - if o != nil && o.FromAddress != nil { + if o != nil && !IsNil(o.FromAddress) { return true } @@ -408,7 +411,7 @@ func (o *PatchedEmailStageRequest) SetFromAddress(v string) { // GetTokenExpiry returns the TokenExpiry field value if set, zero value otherwise. func (o *PatchedEmailStageRequest) GetTokenExpiry() int32 { - if o == nil || o.TokenExpiry == nil { + if o == nil || IsNil(o.TokenExpiry) { var ret int32 return ret } @@ -418,7 +421,7 @@ func (o *PatchedEmailStageRequest) GetTokenExpiry() int32 { // GetTokenExpiryOk returns a tuple with the TokenExpiry field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedEmailStageRequest) GetTokenExpiryOk() (*int32, bool) { - if o == nil || o.TokenExpiry == nil { + if o == nil || IsNil(o.TokenExpiry) { return nil, false } return o.TokenExpiry, true @@ -426,7 +429,7 @@ func (o *PatchedEmailStageRequest) GetTokenExpiryOk() (*int32, bool) { // HasTokenExpiry returns a boolean if a field has been set. func (o *PatchedEmailStageRequest) HasTokenExpiry() bool { - if o != nil && o.TokenExpiry != nil { + if o != nil && !IsNil(o.TokenExpiry) { return true } @@ -440,7 +443,7 @@ func (o *PatchedEmailStageRequest) SetTokenExpiry(v int32) { // GetSubject returns the Subject field value if set, zero value otherwise. func (o *PatchedEmailStageRequest) GetSubject() string { - if o == nil || o.Subject == nil { + if o == nil || IsNil(o.Subject) { var ret string return ret } @@ -450,7 +453,7 @@ func (o *PatchedEmailStageRequest) GetSubject() string { // GetSubjectOk returns a tuple with the Subject field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedEmailStageRequest) GetSubjectOk() (*string, bool) { - if o == nil || o.Subject == nil { + if o == nil || IsNil(o.Subject) { return nil, false } return o.Subject, true @@ -458,7 +461,7 @@ func (o *PatchedEmailStageRequest) GetSubjectOk() (*string, bool) { // HasSubject returns a boolean if a field has been set. func (o *PatchedEmailStageRequest) HasSubject() bool { - if o != nil && o.Subject != nil { + if o != nil && !IsNil(o.Subject) { return true } @@ -472,7 +475,7 @@ func (o *PatchedEmailStageRequest) SetSubject(v string) { // GetTemplate returns the Template field value if set, zero value otherwise. func (o *PatchedEmailStageRequest) GetTemplate() string { - if o == nil || o.Template == nil { + if o == nil || IsNil(o.Template) { var ret string return ret } @@ -482,7 +485,7 @@ func (o *PatchedEmailStageRequest) GetTemplate() string { // GetTemplateOk returns a tuple with the Template field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedEmailStageRequest) GetTemplateOk() (*string, bool) { - if o == nil || o.Template == nil { + if o == nil || IsNil(o.Template) { return nil, false } return o.Template, true @@ -490,7 +493,7 @@ func (o *PatchedEmailStageRequest) GetTemplateOk() (*string, bool) { // HasTemplate returns a boolean if a field has been set. func (o *PatchedEmailStageRequest) HasTemplate() bool { - if o != nil && o.Template != nil { + if o != nil && !IsNil(o.Template) { return true } @@ -504,7 +507,7 @@ func (o *PatchedEmailStageRequest) SetTemplate(v string) { // GetActivateUserOnSuccess returns the ActivateUserOnSuccess field value if set, zero value otherwise. func (o *PatchedEmailStageRequest) GetActivateUserOnSuccess() bool { - if o == nil || o.ActivateUserOnSuccess == nil { + if o == nil || IsNil(o.ActivateUserOnSuccess) { var ret bool return ret } @@ -514,7 +517,7 @@ func (o *PatchedEmailStageRequest) GetActivateUserOnSuccess() bool { // GetActivateUserOnSuccessOk returns a tuple with the ActivateUserOnSuccess field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedEmailStageRequest) GetActivateUserOnSuccessOk() (*bool, bool) { - if o == nil || o.ActivateUserOnSuccess == nil { + if o == nil || IsNil(o.ActivateUserOnSuccess) { return nil, false } return o.ActivateUserOnSuccess, true @@ -522,7 +525,7 @@ func (o *PatchedEmailStageRequest) GetActivateUserOnSuccessOk() (*bool, bool) { // HasActivateUserOnSuccess returns a boolean if a field has been set. func (o *PatchedEmailStageRequest) HasActivateUserOnSuccess() bool { - if o != nil && o.ActivateUserOnSuccess != nil { + if o != nil && !IsNil(o.ActivateUserOnSuccess) { return true } @@ -535,53 +538,61 @@ func (o *PatchedEmailStageRequest) SetActivateUserOnSuccess(v bool) { } func (o PatchedEmailStageRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedEmailStageRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.FlowSet != nil { + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } - if o.UseGlobalSettings != nil { + if !IsNil(o.UseGlobalSettings) { toSerialize["use_global_settings"] = o.UseGlobalSettings } - if o.Host != nil { + if !IsNil(o.Host) { toSerialize["host"] = o.Host } - if o.Port != nil { + if !IsNil(o.Port) { toSerialize["port"] = o.Port } - if o.Username != nil { + if !IsNil(o.Username) { toSerialize["username"] = o.Username } - if o.Password != nil { + if !IsNil(o.Password) { toSerialize["password"] = o.Password } - if o.UseTls != nil { + if !IsNil(o.UseTls) { toSerialize["use_tls"] = o.UseTls } - if o.UseSsl != nil { + if !IsNil(o.UseSsl) { toSerialize["use_ssl"] = o.UseSsl } - if o.Timeout != nil { + if !IsNil(o.Timeout) { toSerialize["timeout"] = o.Timeout } - if o.FromAddress != nil { + if !IsNil(o.FromAddress) { toSerialize["from_address"] = o.FromAddress } - if o.TokenExpiry != nil { + if !IsNil(o.TokenExpiry) { toSerialize["token_expiry"] = o.TokenExpiry } - if o.Subject != nil { + if !IsNil(o.Subject) { toSerialize["subject"] = o.Subject } - if o.Template != nil { + if !IsNil(o.Template) { toSerialize["template"] = o.Template } - if o.ActivateUserOnSuccess != nil { + if !IsNil(o.ActivateUserOnSuccess) { toSerialize["activate_user_on_success"] = o.ActivateUserOnSuccess } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedEmailStageRequest struct { diff --git a/model_patched_event_matcher_policy_request.go b/model_patched_event_matcher_policy_request.go index 7780edf19..42cb453d3 100644 --- a/model_patched_event_matcher_policy_request.go +++ b/model_patched_event_matcher_policy_request.go @@ -15,17 +15,18 @@ import ( "encoding/json" ) +// checks if the PatchedEventMatcherPolicyRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedEventMatcherPolicyRequest{} + // PatchedEventMatcherPolicyRequest Event Matcher Policy Serializer type PatchedEventMatcherPolicyRequest struct { Name *string `json:"name,omitempty"` // When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. - ExecutionLogging *bool `json:"execution_logging,omitempty"` - // Match created events with this action type. When left empty, all action types will be matched. * `login` - Login * `login_failed` - Login Failed * `logout` - Logout * `user_write` - User Write * `suspicious_request` - Suspicious Request * `password_set` - Password Set * `secret_view` - Secret View * `secret_rotate` - Secret Rotate * `invitation_used` - Invite Used * `authorize_application` - Authorize Application * `source_linked` - Source Linked * `impersonation_started` - Impersonation Started * `impersonation_ended` - Impersonation Ended * `flow_execution` - Flow Execution * `policy_execution` - Policy Execution * `policy_exception` - Policy Exception * `property_mapping_exception` - Property Mapping Exception * `system_task_execution` - System Task Execution * `system_task_exception` - System Task Exception * `system_exception` - System Exception * `configuration_error` - Configuration Error * `model_created` - Model Created * `model_updated` - Model Updated * `model_deleted` - Model Deleted * `email_sent` - Email Sent * `update_available` - Update Available * `custom_` - Custom Prefix - Action NullableEventActions `json:"action,omitempty"` + ExecutionLogging *bool `json:"execution_logging,omitempty"` + Action *EventActions `json:"action,omitempty"` // Matches Event's Client IP (strict matching, for network matching use an Expression Policy) - ClientIp *string `json:"client_ip,omitempty"` - // Match events created by selected application. When left empty, all applications are matched. * `authentik.admin` - authentik Admin * `authentik.api` - authentik API * `authentik.crypto` - authentik Crypto * `authentik.events` - authentik Events * `authentik.flows` - authentik Flows * `authentik.lib` - authentik lib * `authentik.outposts` - authentik Outpost * `authentik.policies.dummy` - authentik Policies.Dummy * `authentik.policies.event_matcher` - authentik Policies.Event Matcher * `authentik.policies.expiry` - authentik Policies.Expiry * `authentik.policies.expression` - authentik Policies.Expression * `authentik.policies.password` - authentik Policies.Password * `authentik.policies.reputation` - authentik Policies.Reputation * `authentik.policies` - authentik Policies * `authentik.providers.ldap` - authentik Providers.LDAP * `authentik.providers.oauth2` - authentik Providers.OAuth2 * `authentik.providers.proxy` - authentik Providers.Proxy * `authentik.providers.radius` - authentik Providers.Radius * `authentik.providers.saml` - authentik Providers.SAML * `authentik.providers.scim` - authentik Providers.SCIM * `authentik.recovery` - authentik Recovery * `authentik.sources.ldap` - authentik Sources.LDAP * `authentik.sources.oauth` - authentik Sources.OAuth * `authentik.sources.plex` - authentik Sources.Plex * `authentik.sources.saml` - authentik Sources.SAML * `authentik.stages.authenticator_duo` - authentik Stages.Authenticator.Duo * `authentik.stages.authenticator_sms` - authentik Stages.Authenticator.SMS * `authentik.stages.authenticator_static` - authentik Stages.Authenticator.Static * `authentik.stages.authenticator_totp` - authentik Stages.Authenticator.TOTP * `authentik.stages.authenticator_validate` - authentik Stages.Authenticator.Validate * `authentik.stages.authenticator_webauthn` - authentik Stages.Authenticator.WebAuthn * `authentik.stages.captcha` - authentik Stages.Captcha * `authentik.stages.consent` - authentik Stages.Consent * `authentik.stages.deny` - authentik Stages.Deny * `authentik.stages.dummy` - authentik Stages.Dummy * `authentik.stages.email` - authentik Stages.Email * `authentik.stages.identification` - authentik Stages.Identification * `authentik.stages.invitation` - authentik Stages.User Invitation * `authentik.stages.password` - authentik Stages.Password * `authentik.stages.prompt` - authentik Stages.Prompt * `authentik.stages.user_delete` - authentik Stages.User Delete * `authentik.stages.user_login` - authentik Stages.User Login * `authentik.stages.user_logout` - authentik Stages.User Logout * `authentik.stages.user_write` - authentik Stages.User Write * `authentik.tenants` - authentik Tenants * `authentik.blueprints` - authentik Blueprints * `authentik.core` - authentik Core - App NullableAppEnum `json:"app,omitempty"` + ClientIp *string `json:"client_ip,omitempty"` + App *AppEnum `json:"app,omitempty"` } // NewPatchedEventMatcherPolicyRequest instantiates a new PatchedEventMatcherPolicyRequest object @@ -47,7 +48,7 @@ func NewPatchedEventMatcherPolicyRequestWithDefaults() *PatchedEventMatcherPolic // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedEventMatcherPolicyRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -57,7 +58,7 @@ func (o *PatchedEventMatcherPolicyRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedEventMatcherPolicyRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -65,7 +66,7 @@ func (o *PatchedEventMatcherPolicyRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedEventMatcherPolicyRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -79,7 +80,7 @@ func (o *PatchedEventMatcherPolicyRequest) SetName(v string) { // GetExecutionLogging returns the ExecutionLogging field value if set, zero value otherwise. func (o *PatchedEventMatcherPolicyRequest) GetExecutionLogging() bool { - if o == nil || o.ExecutionLogging == nil { + if o == nil || IsNil(o.ExecutionLogging) { var ret bool return ret } @@ -89,7 +90,7 @@ func (o *PatchedEventMatcherPolicyRequest) GetExecutionLogging() bool { // GetExecutionLoggingOk returns a tuple with the ExecutionLogging field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedEventMatcherPolicyRequest) GetExecutionLoggingOk() (*bool, bool) { - if o == nil || o.ExecutionLogging == nil { + if o == nil || IsNil(o.ExecutionLogging) { return nil, false } return o.ExecutionLogging, true @@ -97,7 +98,7 @@ func (o *PatchedEventMatcherPolicyRequest) GetExecutionLoggingOk() (*bool, bool) // HasExecutionLogging returns a boolean if a field has been set. func (o *PatchedEventMatcherPolicyRequest) HasExecutionLogging() bool { - if o != nil && o.ExecutionLogging != nil { + if o != nil && !IsNil(o.ExecutionLogging) { return true } @@ -109,52 +110,41 @@ func (o *PatchedEventMatcherPolicyRequest) SetExecutionLogging(v bool) { o.ExecutionLogging = &v } -// GetAction returns the Action field value if set, zero value otherwise (both if not set or set to explicit null). +// GetAction returns the Action field value if set, zero value otherwise. func (o *PatchedEventMatcherPolicyRequest) GetAction() EventActions { - if o == nil || o.Action.Get() == nil { + if o == nil || IsNil(o.Action) { var ret EventActions return ret } - return *o.Action.Get() + return *o.Action } // GetActionOk returns a tuple with the Action field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PatchedEventMatcherPolicyRequest) GetActionOk() (*EventActions, bool) { - if o == nil { + if o == nil || IsNil(o.Action) { return nil, false } - return o.Action.Get(), o.Action.IsSet() + return o.Action, true } // HasAction returns a boolean if a field has been set. func (o *PatchedEventMatcherPolicyRequest) HasAction() bool { - if o != nil && o.Action.IsSet() { + if o != nil && !IsNil(o.Action) { return true } return false } -// SetAction gets a reference to the given NullableEventActions and assigns it to the Action field. +// SetAction gets a reference to the given EventActions and assigns it to the Action field. func (o *PatchedEventMatcherPolicyRequest) SetAction(v EventActions) { - o.Action.Set(&v) -} - -// SetActionNil sets the value for Action to be an explicit nil -func (o *PatchedEventMatcherPolicyRequest) SetActionNil() { - o.Action.Set(nil) -} - -// UnsetAction ensures that no value is present for Action, not even an explicit nil -func (o *PatchedEventMatcherPolicyRequest) UnsetAction() { - o.Action.Unset() + o.Action = &v } // GetClientIp returns the ClientIp field value if set, zero value otherwise. func (o *PatchedEventMatcherPolicyRequest) GetClientIp() string { - if o == nil || o.ClientIp == nil { + if o == nil || IsNil(o.ClientIp) { var ret string return ret } @@ -164,7 +154,7 @@ func (o *PatchedEventMatcherPolicyRequest) GetClientIp() string { // GetClientIpOk returns a tuple with the ClientIp field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedEventMatcherPolicyRequest) GetClientIpOk() (*string, bool) { - if o == nil || o.ClientIp == nil { + if o == nil || IsNil(o.ClientIp) { return nil, false } return o.ClientIp, true @@ -172,7 +162,7 @@ func (o *PatchedEventMatcherPolicyRequest) GetClientIpOk() (*string, bool) { // HasClientIp returns a boolean if a field has been set. func (o *PatchedEventMatcherPolicyRequest) HasClientIp() bool { - if o != nil && o.ClientIp != nil { + if o != nil && !IsNil(o.ClientIp) { return true } @@ -184,67 +174,64 @@ func (o *PatchedEventMatcherPolicyRequest) SetClientIp(v string) { o.ClientIp = &v } -// GetApp returns the App field value if set, zero value otherwise (both if not set or set to explicit null). +// GetApp returns the App field value if set, zero value otherwise. func (o *PatchedEventMatcherPolicyRequest) GetApp() AppEnum { - if o == nil || o.App.Get() == nil { + if o == nil || IsNil(o.App) { var ret AppEnum return ret } - return *o.App.Get() + return *o.App } // GetAppOk returns a tuple with the App field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PatchedEventMatcherPolicyRequest) GetAppOk() (*AppEnum, bool) { - if o == nil { + if o == nil || IsNil(o.App) { return nil, false } - return o.App.Get(), o.App.IsSet() + return o.App, true } // HasApp returns a boolean if a field has been set. func (o *PatchedEventMatcherPolicyRequest) HasApp() bool { - if o != nil && o.App.IsSet() { + if o != nil && !IsNil(o.App) { return true } return false } -// SetApp gets a reference to the given NullableAppEnum and assigns it to the App field. +// SetApp gets a reference to the given AppEnum and assigns it to the App field. func (o *PatchedEventMatcherPolicyRequest) SetApp(v AppEnum) { - o.App.Set(&v) -} - -// SetAppNil sets the value for App to be an explicit nil -func (o *PatchedEventMatcherPolicyRequest) SetAppNil() { - o.App.Set(nil) + o.App = &v } -// UnsetApp ensures that no value is present for App, not even an explicit nil -func (o *PatchedEventMatcherPolicyRequest) UnsetApp() { - o.App.Unset() +func (o PatchedEventMatcherPolicyRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) } -func (o PatchedEventMatcherPolicyRequest) MarshalJSON() ([]byte, error) { +func (o PatchedEventMatcherPolicyRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.ExecutionLogging != nil { + if !IsNil(o.ExecutionLogging) { toSerialize["execution_logging"] = o.ExecutionLogging } - if o.Action.IsSet() { - toSerialize["action"] = o.Action.Get() + if !IsNil(o.Action) { + toSerialize["action"] = o.Action } - if o.ClientIp != nil { + if !IsNil(o.ClientIp) { toSerialize["client_ip"] = o.ClientIp } - if o.App.IsSet() { - toSerialize["app"] = o.App.Get() + if !IsNil(o.App) { + toSerialize["app"] = o.App } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedEventMatcherPolicyRequest struct { diff --git a/model_patched_event_request.go b/model_patched_event_request.go index 5964262b1..5a934245a 100644 --- a/model_patched_event_request.go +++ b/model_patched_event_request.go @@ -16,6 +16,9 @@ import ( "time" ) +// checks if the PatchedEventRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedEventRequest{} + // PatchedEventRequest Event Serializer type PatchedEventRequest struct { User map[string]interface{} `json:"user,omitempty"` @@ -46,7 +49,7 @@ func NewPatchedEventRequestWithDefaults() *PatchedEventRequest { // GetUser returns the User field value if set, zero value otherwise. func (o *PatchedEventRequest) GetUser() map[string]interface{} { - if o == nil || o.User == nil { + if o == nil || IsNil(o.User) { var ret map[string]interface{} return ret } @@ -56,15 +59,15 @@ func (o *PatchedEventRequest) GetUser() map[string]interface{} { // GetUserOk returns a tuple with the User field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedEventRequest) GetUserOk() (map[string]interface{}, bool) { - if o == nil || o.User == nil { - return nil, false + if o == nil || IsNil(o.User) { + return map[string]interface{}{}, false } return o.User, true } // HasUser returns a boolean if a field has been set. func (o *PatchedEventRequest) HasUser() bool { - if o != nil && o.User != nil { + if o != nil && !IsNil(o.User) { return true } @@ -78,7 +81,7 @@ func (o *PatchedEventRequest) SetUser(v map[string]interface{}) { // GetAction returns the Action field value if set, zero value otherwise. func (o *PatchedEventRequest) GetAction() EventActions { - if o == nil || o.Action == nil { + if o == nil || IsNil(o.Action) { var ret EventActions return ret } @@ -88,7 +91,7 @@ func (o *PatchedEventRequest) GetAction() EventActions { // GetActionOk returns a tuple with the Action field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedEventRequest) GetActionOk() (*EventActions, bool) { - if o == nil || o.Action == nil { + if o == nil || IsNil(o.Action) { return nil, false } return o.Action, true @@ -96,7 +99,7 @@ func (o *PatchedEventRequest) GetActionOk() (*EventActions, bool) { // HasAction returns a boolean if a field has been set. func (o *PatchedEventRequest) HasAction() bool { - if o != nil && o.Action != nil { + if o != nil && !IsNil(o.Action) { return true } @@ -110,7 +113,7 @@ func (o *PatchedEventRequest) SetAction(v EventActions) { // GetApp returns the App field value if set, zero value otherwise. func (o *PatchedEventRequest) GetApp() string { - if o == nil || o.App == nil { + if o == nil || IsNil(o.App) { var ret string return ret } @@ -120,7 +123,7 @@ func (o *PatchedEventRequest) GetApp() string { // GetAppOk returns a tuple with the App field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedEventRequest) GetAppOk() (*string, bool) { - if o == nil || o.App == nil { + if o == nil || IsNil(o.App) { return nil, false } return o.App, true @@ -128,7 +131,7 @@ func (o *PatchedEventRequest) GetAppOk() (*string, bool) { // HasApp returns a boolean if a field has been set. func (o *PatchedEventRequest) HasApp() bool { - if o != nil && o.App != nil { + if o != nil && !IsNil(o.App) { return true } @@ -142,7 +145,7 @@ func (o *PatchedEventRequest) SetApp(v string) { // GetContext returns the Context field value if set, zero value otherwise. func (o *PatchedEventRequest) GetContext() map[string]interface{} { - if o == nil || o.Context == nil { + if o == nil || IsNil(o.Context) { var ret map[string]interface{} return ret } @@ -152,15 +155,15 @@ func (o *PatchedEventRequest) GetContext() map[string]interface{} { // GetContextOk returns a tuple with the Context field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedEventRequest) GetContextOk() (map[string]interface{}, bool) { - if o == nil || o.Context == nil { - return nil, false + if o == nil || IsNil(o.Context) { + return map[string]interface{}{}, false } return o.Context, true } // HasContext returns a boolean if a field has been set. func (o *PatchedEventRequest) HasContext() bool { - if o != nil && o.Context != nil { + if o != nil && !IsNil(o.Context) { return true } @@ -174,7 +177,7 @@ func (o *PatchedEventRequest) SetContext(v map[string]interface{}) { // GetClientIp returns the ClientIp field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedEventRequest) GetClientIp() string { - if o == nil || o.ClientIp.Get() == nil { + if o == nil || IsNil(o.ClientIp.Get()) { var ret string return ret } @@ -217,7 +220,7 @@ func (o *PatchedEventRequest) UnsetClientIp() { // GetExpires returns the Expires field value if set, zero value otherwise. func (o *PatchedEventRequest) GetExpires() time.Time { - if o == nil || o.Expires == nil { + if o == nil || IsNil(o.Expires) { var ret time.Time return ret } @@ -227,7 +230,7 @@ func (o *PatchedEventRequest) GetExpires() time.Time { // GetExpiresOk returns a tuple with the Expires field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedEventRequest) GetExpiresOk() (*time.Time, bool) { - if o == nil || o.Expires == nil { + if o == nil || IsNil(o.Expires) { return nil, false } return o.Expires, true @@ -235,7 +238,7 @@ func (o *PatchedEventRequest) GetExpiresOk() (*time.Time, bool) { // HasExpires returns a boolean if a field has been set. func (o *PatchedEventRequest) HasExpires() bool { - if o != nil && o.Expires != nil { + if o != nil && !IsNil(o.Expires) { return true } @@ -249,7 +252,7 @@ func (o *PatchedEventRequest) SetExpires(v time.Time) { // GetTenant returns the Tenant field value if set, zero value otherwise. func (o *PatchedEventRequest) GetTenant() map[string]interface{} { - if o == nil || o.Tenant == nil { + if o == nil || IsNil(o.Tenant) { var ret map[string]interface{} return ret } @@ -259,15 +262,15 @@ func (o *PatchedEventRequest) GetTenant() map[string]interface{} { // GetTenantOk returns a tuple with the Tenant field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedEventRequest) GetTenantOk() (map[string]interface{}, bool) { - if o == nil || o.Tenant == nil { - return nil, false + if o == nil || IsNil(o.Tenant) { + return map[string]interface{}{}, false } return o.Tenant, true } // HasTenant returns a boolean if a field has been set. func (o *PatchedEventRequest) HasTenant() bool { - if o != nil && o.Tenant != nil { + if o != nil && !IsNil(o.Tenant) { return true } @@ -280,29 +283,37 @@ func (o *PatchedEventRequest) SetTenant(v map[string]interface{}) { } func (o PatchedEventRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedEventRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.User != nil { + if !IsNil(o.User) { toSerialize["user"] = o.User } - if o.Action != nil { + if !IsNil(o.Action) { toSerialize["action"] = o.Action } - if o.App != nil { + if !IsNil(o.App) { toSerialize["app"] = o.App } - if o.Context != nil { + if !IsNil(o.Context) { toSerialize["context"] = o.Context } if o.ClientIp.IsSet() { toSerialize["client_ip"] = o.ClientIp.Get() } - if o.Expires != nil { + if !IsNil(o.Expires) { toSerialize["expires"] = o.Expires } - if o.Tenant != nil { + if !IsNil(o.Tenant) { toSerialize["tenant"] = o.Tenant } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedEventRequest struct { diff --git a/model_patched_expression_policy_request.go b/model_patched_expression_policy_request.go index 92cace0ed..ac6b3b142 100644 --- a/model_patched_expression_policy_request.go +++ b/model_patched_expression_policy_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedExpressionPolicyRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedExpressionPolicyRequest{} + // PatchedExpressionPolicyRequest Group Membership Policy Serializer type PatchedExpressionPolicyRequest struct { Name *string `json:"name,omitempty"` @@ -42,7 +45,7 @@ func NewPatchedExpressionPolicyRequestWithDefaults() *PatchedExpressionPolicyReq // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedExpressionPolicyRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -52,7 +55,7 @@ func (o *PatchedExpressionPolicyRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedExpressionPolicyRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -60,7 +63,7 @@ func (o *PatchedExpressionPolicyRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedExpressionPolicyRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -74,7 +77,7 @@ func (o *PatchedExpressionPolicyRequest) SetName(v string) { // GetExecutionLogging returns the ExecutionLogging field value if set, zero value otherwise. func (o *PatchedExpressionPolicyRequest) GetExecutionLogging() bool { - if o == nil || o.ExecutionLogging == nil { + if o == nil || IsNil(o.ExecutionLogging) { var ret bool return ret } @@ -84,7 +87,7 @@ func (o *PatchedExpressionPolicyRequest) GetExecutionLogging() bool { // GetExecutionLoggingOk returns a tuple with the ExecutionLogging field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedExpressionPolicyRequest) GetExecutionLoggingOk() (*bool, bool) { - if o == nil || o.ExecutionLogging == nil { + if o == nil || IsNil(o.ExecutionLogging) { return nil, false } return o.ExecutionLogging, true @@ -92,7 +95,7 @@ func (o *PatchedExpressionPolicyRequest) GetExecutionLoggingOk() (*bool, bool) { // HasExecutionLogging returns a boolean if a field has been set. func (o *PatchedExpressionPolicyRequest) HasExecutionLogging() bool { - if o != nil && o.ExecutionLogging != nil { + if o != nil && !IsNil(o.ExecutionLogging) { return true } @@ -106,7 +109,7 @@ func (o *PatchedExpressionPolicyRequest) SetExecutionLogging(v bool) { // GetExpression returns the Expression field value if set, zero value otherwise. func (o *PatchedExpressionPolicyRequest) GetExpression() string { - if o == nil || o.Expression == nil { + if o == nil || IsNil(o.Expression) { var ret string return ret } @@ -116,7 +119,7 @@ func (o *PatchedExpressionPolicyRequest) GetExpression() string { // GetExpressionOk returns a tuple with the Expression field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedExpressionPolicyRequest) GetExpressionOk() (*string, bool) { - if o == nil || o.Expression == nil { + if o == nil || IsNil(o.Expression) { return nil, false } return o.Expression, true @@ -124,7 +127,7 @@ func (o *PatchedExpressionPolicyRequest) GetExpressionOk() (*string, bool) { // HasExpression returns a boolean if a field has been set. func (o *PatchedExpressionPolicyRequest) HasExpression() bool { - if o != nil && o.Expression != nil { + if o != nil && !IsNil(o.Expression) { return true } @@ -137,17 +140,25 @@ func (o *PatchedExpressionPolicyRequest) SetExpression(v string) { } func (o PatchedExpressionPolicyRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedExpressionPolicyRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.ExecutionLogging != nil { + if !IsNil(o.ExecutionLogging) { toSerialize["execution_logging"] = o.ExecutionLogging } - if o.Expression != nil { + if !IsNil(o.Expression) { toSerialize["expression"] = o.Expression } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedExpressionPolicyRequest struct { diff --git a/model_patched_flow_request.go b/model_patched_flow_request.go index c6cbfcc2e..b0c795ea5 100644 --- a/model_patched_flow_request.go +++ b/model_patched_flow_request.go @@ -15,23 +15,23 @@ import ( "encoding/json" ) +// checks if the PatchedFlowRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedFlowRequest{} + // PatchedFlowRequest Flow Serializer type PatchedFlowRequest struct { Name *string `json:"name,omitempty"` // Visible in the URL. Slug *string `json:"slug,omitempty"` // Shown as the Title in Flow pages. - Title *string `json:"title,omitempty"` - // Decides what this Flow is used for. For example, the Authentication flow is redirect to when an un-authenticated user visits authentik. * `authentication` - Authentication * `authorization` - Authorization * `invalidation` - Invalidation * `enrollment` - Enrollment * `unenrollment` - Unrenollment * `recovery` - Recovery * `stage_configuration` - Stage Configuration - Designation NullableFlowDesignationEnum `json:"designation,omitempty"` - PolicyEngineMode *PolicyEngineMode `json:"policy_engine_mode,omitempty"` + Title *string `json:"title,omitempty"` + Designation *FlowDesignationEnum `json:"designation,omitempty"` + PolicyEngineMode *PolicyEngineMode `json:"policy_engine_mode,omitempty"` // Enable compatibility mode, increases compatibility with password managers on mobile devices. - CompatibilityMode *bool `json:"compatibility_mode,omitempty"` - Layout *LayoutEnum `json:"layout,omitempty"` - // Configure what should happen when a flow denies access to a user. * `message_continue` - Message Continue * `message` - Message * `continue` - Continue - DeniedAction NullableDeniedActionEnum `json:"denied_action,omitempty"` - // Required level of authentication and authorization to access a flow. * `none` - None * `require_authenticated` - Require Authenticated * `require_unauthenticated` - Require Unauthenticated * `require_superuser` - Require Superuser - Authentication NullableAuthenticationEnum `json:"authentication,omitempty"` + CompatibilityMode *bool `json:"compatibility_mode,omitempty"` + Layout *LayoutEnum `json:"layout,omitempty"` + DeniedAction *DeniedActionEnum `json:"denied_action,omitempty"` + Authentication *AuthenticationEnum `json:"authentication,omitempty"` } // NewPatchedFlowRequest instantiates a new PatchedFlowRequest object @@ -53,7 +53,7 @@ func NewPatchedFlowRequestWithDefaults() *PatchedFlowRequest { // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedFlowRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -63,7 +63,7 @@ func (o *PatchedFlowRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedFlowRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -71,7 +71,7 @@ func (o *PatchedFlowRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedFlowRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -85,7 +85,7 @@ func (o *PatchedFlowRequest) SetName(v string) { // GetSlug returns the Slug field value if set, zero value otherwise. func (o *PatchedFlowRequest) GetSlug() string { - if o == nil || o.Slug == nil { + if o == nil || IsNil(o.Slug) { var ret string return ret } @@ -95,7 +95,7 @@ func (o *PatchedFlowRequest) GetSlug() string { // GetSlugOk returns a tuple with the Slug field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedFlowRequest) GetSlugOk() (*string, bool) { - if o == nil || o.Slug == nil { + if o == nil || IsNil(o.Slug) { return nil, false } return o.Slug, true @@ -103,7 +103,7 @@ func (o *PatchedFlowRequest) GetSlugOk() (*string, bool) { // HasSlug returns a boolean if a field has been set. func (o *PatchedFlowRequest) HasSlug() bool { - if o != nil && o.Slug != nil { + if o != nil && !IsNil(o.Slug) { return true } @@ -117,7 +117,7 @@ func (o *PatchedFlowRequest) SetSlug(v string) { // GetTitle returns the Title field value if set, zero value otherwise. func (o *PatchedFlowRequest) GetTitle() string { - if o == nil || o.Title == nil { + if o == nil || IsNil(o.Title) { var ret string return ret } @@ -127,7 +127,7 @@ func (o *PatchedFlowRequest) GetTitle() string { // GetTitleOk returns a tuple with the Title field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedFlowRequest) GetTitleOk() (*string, bool) { - if o == nil || o.Title == nil { + if o == nil || IsNil(o.Title) { return nil, false } return o.Title, true @@ -135,7 +135,7 @@ func (o *PatchedFlowRequest) GetTitleOk() (*string, bool) { // HasTitle returns a boolean if a field has been set. func (o *PatchedFlowRequest) HasTitle() bool { - if o != nil && o.Title != nil { + if o != nil && !IsNil(o.Title) { return true } @@ -147,52 +147,41 @@ func (o *PatchedFlowRequest) SetTitle(v string) { o.Title = &v } -// GetDesignation returns the Designation field value if set, zero value otherwise (both if not set or set to explicit null). +// GetDesignation returns the Designation field value if set, zero value otherwise. func (o *PatchedFlowRequest) GetDesignation() FlowDesignationEnum { - if o == nil || o.Designation.Get() == nil { + if o == nil || IsNil(o.Designation) { var ret FlowDesignationEnum return ret } - return *o.Designation.Get() + return *o.Designation } // GetDesignationOk returns a tuple with the Designation field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PatchedFlowRequest) GetDesignationOk() (*FlowDesignationEnum, bool) { - if o == nil { + if o == nil || IsNil(o.Designation) { return nil, false } - return o.Designation.Get(), o.Designation.IsSet() + return o.Designation, true } // HasDesignation returns a boolean if a field has been set. func (o *PatchedFlowRequest) HasDesignation() bool { - if o != nil && o.Designation.IsSet() { + if o != nil && !IsNil(o.Designation) { return true } return false } -// SetDesignation gets a reference to the given NullableFlowDesignationEnum and assigns it to the Designation field. +// SetDesignation gets a reference to the given FlowDesignationEnum and assigns it to the Designation field. func (o *PatchedFlowRequest) SetDesignation(v FlowDesignationEnum) { - o.Designation.Set(&v) -} - -// SetDesignationNil sets the value for Designation to be an explicit nil -func (o *PatchedFlowRequest) SetDesignationNil() { - o.Designation.Set(nil) -} - -// UnsetDesignation ensures that no value is present for Designation, not even an explicit nil -func (o *PatchedFlowRequest) UnsetDesignation() { - o.Designation.Unset() + o.Designation = &v } // GetPolicyEngineMode returns the PolicyEngineMode field value if set, zero value otherwise. func (o *PatchedFlowRequest) GetPolicyEngineMode() PolicyEngineMode { - if o == nil || o.PolicyEngineMode == nil { + if o == nil || IsNil(o.PolicyEngineMode) { var ret PolicyEngineMode return ret } @@ -202,7 +191,7 @@ func (o *PatchedFlowRequest) GetPolicyEngineMode() PolicyEngineMode { // GetPolicyEngineModeOk returns a tuple with the PolicyEngineMode field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedFlowRequest) GetPolicyEngineModeOk() (*PolicyEngineMode, bool) { - if o == nil || o.PolicyEngineMode == nil { + if o == nil || IsNil(o.PolicyEngineMode) { return nil, false } return o.PolicyEngineMode, true @@ -210,7 +199,7 @@ func (o *PatchedFlowRequest) GetPolicyEngineModeOk() (*PolicyEngineMode, bool) { // HasPolicyEngineMode returns a boolean if a field has been set. func (o *PatchedFlowRequest) HasPolicyEngineMode() bool { - if o != nil && o.PolicyEngineMode != nil { + if o != nil && !IsNil(o.PolicyEngineMode) { return true } @@ -224,7 +213,7 @@ func (o *PatchedFlowRequest) SetPolicyEngineMode(v PolicyEngineMode) { // GetCompatibilityMode returns the CompatibilityMode field value if set, zero value otherwise. func (o *PatchedFlowRequest) GetCompatibilityMode() bool { - if o == nil || o.CompatibilityMode == nil { + if o == nil || IsNil(o.CompatibilityMode) { var ret bool return ret } @@ -234,7 +223,7 @@ func (o *PatchedFlowRequest) GetCompatibilityMode() bool { // GetCompatibilityModeOk returns a tuple with the CompatibilityMode field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedFlowRequest) GetCompatibilityModeOk() (*bool, bool) { - if o == nil || o.CompatibilityMode == nil { + if o == nil || IsNil(o.CompatibilityMode) { return nil, false } return o.CompatibilityMode, true @@ -242,7 +231,7 @@ func (o *PatchedFlowRequest) GetCompatibilityModeOk() (*bool, bool) { // HasCompatibilityMode returns a boolean if a field has been set. func (o *PatchedFlowRequest) HasCompatibilityMode() bool { - if o != nil && o.CompatibilityMode != nil { + if o != nil && !IsNil(o.CompatibilityMode) { return true } @@ -256,7 +245,7 @@ func (o *PatchedFlowRequest) SetCompatibilityMode(v bool) { // GetLayout returns the Layout field value if set, zero value otherwise. func (o *PatchedFlowRequest) GetLayout() LayoutEnum { - if o == nil || o.Layout == nil { + if o == nil || IsNil(o.Layout) { var ret LayoutEnum return ret } @@ -266,7 +255,7 @@ func (o *PatchedFlowRequest) GetLayout() LayoutEnum { // GetLayoutOk returns a tuple with the Layout field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedFlowRequest) GetLayoutOk() (*LayoutEnum, bool) { - if o == nil || o.Layout == nil { + if o == nil || IsNil(o.Layout) { return nil, false } return o.Layout, true @@ -274,7 +263,7 @@ func (o *PatchedFlowRequest) GetLayoutOk() (*LayoutEnum, bool) { // HasLayout returns a boolean if a field has been set. func (o *PatchedFlowRequest) HasLayout() bool { - if o != nil && o.Layout != nil { + if o != nil && !IsNil(o.Layout) { return true } @@ -286,122 +275,108 @@ func (o *PatchedFlowRequest) SetLayout(v LayoutEnum) { o.Layout = &v } -// GetDeniedAction returns the DeniedAction field value if set, zero value otherwise (both if not set or set to explicit null). +// GetDeniedAction returns the DeniedAction field value if set, zero value otherwise. func (o *PatchedFlowRequest) GetDeniedAction() DeniedActionEnum { - if o == nil || o.DeniedAction.Get() == nil { + if o == nil || IsNil(o.DeniedAction) { var ret DeniedActionEnum return ret } - return *o.DeniedAction.Get() + return *o.DeniedAction } // GetDeniedActionOk returns a tuple with the DeniedAction field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PatchedFlowRequest) GetDeniedActionOk() (*DeniedActionEnum, bool) { - if o == nil { + if o == nil || IsNil(o.DeniedAction) { return nil, false } - return o.DeniedAction.Get(), o.DeniedAction.IsSet() + return o.DeniedAction, true } // HasDeniedAction returns a boolean if a field has been set. func (o *PatchedFlowRequest) HasDeniedAction() bool { - if o != nil && o.DeniedAction.IsSet() { + if o != nil && !IsNil(o.DeniedAction) { return true } return false } -// SetDeniedAction gets a reference to the given NullableDeniedActionEnum and assigns it to the DeniedAction field. +// SetDeniedAction gets a reference to the given DeniedActionEnum and assigns it to the DeniedAction field. func (o *PatchedFlowRequest) SetDeniedAction(v DeniedActionEnum) { - o.DeniedAction.Set(&v) -} - -// SetDeniedActionNil sets the value for DeniedAction to be an explicit nil -func (o *PatchedFlowRequest) SetDeniedActionNil() { - o.DeniedAction.Set(nil) -} - -// UnsetDeniedAction ensures that no value is present for DeniedAction, not even an explicit nil -func (o *PatchedFlowRequest) UnsetDeniedAction() { - o.DeniedAction.Unset() + o.DeniedAction = &v } -// GetAuthentication returns the Authentication field value if set, zero value otherwise (both if not set or set to explicit null). +// GetAuthentication returns the Authentication field value if set, zero value otherwise. func (o *PatchedFlowRequest) GetAuthentication() AuthenticationEnum { - if o == nil || o.Authentication.Get() == nil { + if o == nil || IsNil(o.Authentication) { var ret AuthenticationEnum return ret } - return *o.Authentication.Get() + return *o.Authentication } // GetAuthenticationOk returns a tuple with the Authentication field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PatchedFlowRequest) GetAuthenticationOk() (*AuthenticationEnum, bool) { - if o == nil { + if o == nil || IsNil(o.Authentication) { return nil, false } - return o.Authentication.Get(), o.Authentication.IsSet() + return o.Authentication, true } // HasAuthentication returns a boolean if a field has been set. func (o *PatchedFlowRequest) HasAuthentication() bool { - if o != nil && o.Authentication.IsSet() { + if o != nil && !IsNil(o.Authentication) { return true } return false } -// SetAuthentication gets a reference to the given NullableAuthenticationEnum and assigns it to the Authentication field. +// SetAuthentication gets a reference to the given AuthenticationEnum and assigns it to the Authentication field. func (o *PatchedFlowRequest) SetAuthentication(v AuthenticationEnum) { - o.Authentication.Set(&v) -} - -// SetAuthenticationNil sets the value for Authentication to be an explicit nil -func (o *PatchedFlowRequest) SetAuthenticationNil() { - o.Authentication.Set(nil) + o.Authentication = &v } -// UnsetAuthentication ensures that no value is present for Authentication, not even an explicit nil -func (o *PatchedFlowRequest) UnsetAuthentication() { - o.Authentication.Unset() +func (o PatchedFlowRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) } -func (o PatchedFlowRequest) MarshalJSON() ([]byte, error) { +func (o PatchedFlowRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.Slug != nil { + if !IsNil(o.Slug) { toSerialize["slug"] = o.Slug } - if o.Title != nil { + if !IsNil(o.Title) { toSerialize["title"] = o.Title } - if o.Designation.IsSet() { - toSerialize["designation"] = o.Designation.Get() + if !IsNil(o.Designation) { + toSerialize["designation"] = o.Designation } - if o.PolicyEngineMode != nil { + if !IsNil(o.PolicyEngineMode) { toSerialize["policy_engine_mode"] = o.PolicyEngineMode } - if o.CompatibilityMode != nil { + if !IsNil(o.CompatibilityMode) { toSerialize["compatibility_mode"] = o.CompatibilityMode } - if o.Layout != nil { + if !IsNil(o.Layout) { toSerialize["layout"] = o.Layout } - if o.DeniedAction.IsSet() { - toSerialize["denied_action"] = o.DeniedAction.Get() + if !IsNil(o.DeniedAction) { + toSerialize["denied_action"] = o.DeniedAction } - if o.Authentication.IsSet() { - toSerialize["authentication"] = o.Authentication.Get() + if !IsNil(o.Authentication) { + toSerialize["authentication"] = o.Authentication } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedFlowRequest struct { diff --git a/model_patched_flow_stage_binding_request.go b/model_patched_flow_stage_binding_request.go index 369877c75..b6e0b3154 100644 --- a/model_patched_flow_stage_binding_request.go +++ b/model_patched_flow_stage_binding_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedFlowStageBindingRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedFlowStageBindingRequest{} + // PatchedFlowStageBindingRequest FlowStageBinding Serializer type PatchedFlowStageBindingRequest struct { Target *string `json:"target,omitempty"` @@ -22,11 +25,10 @@ type PatchedFlowStageBindingRequest struct { // Evaluate policies during the Flow planning process. EvaluateOnPlan *bool `json:"evaluate_on_plan,omitempty"` // Evaluate policies when the Stage is present to the user. - ReEvaluatePolicies *bool `json:"re_evaluate_policies,omitempty"` - Order *int32 `json:"order,omitempty"` - PolicyEngineMode *PolicyEngineMode `json:"policy_engine_mode,omitempty"` - // Configure how the flow executor should handle an invalid response to a challenge. RETRY returns the error message and a similar challenge to the executor. RESTART restarts the flow from the beginning, and RESTART_WITH_CONTEXT restarts the flow while keeping the current context. * `retry` - Retry * `restart` - Restart * `restart_with_context` - Restart With Context - InvalidResponseAction NullableInvalidResponseActionEnum `json:"invalid_response_action,omitempty"` + ReEvaluatePolicies *bool `json:"re_evaluate_policies,omitempty"` + Order *int32 `json:"order,omitempty"` + PolicyEngineMode *PolicyEngineMode `json:"policy_engine_mode,omitempty"` + InvalidResponseAction *InvalidResponseActionEnum `json:"invalid_response_action,omitempty"` } // NewPatchedFlowStageBindingRequest instantiates a new PatchedFlowStageBindingRequest object @@ -48,7 +50,7 @@ func NewPatchedFlowStageBindingRequestWithDefaults() *PatchedFlowStageBindingReq // GetTarget returns the Target field value if set, zero value otherwise. func (o *PatchedFlowStageBindingRequest) GetTarget() string { - if o == nil || o.Target == nil { + if o == nil || IsNil(o.Target) { var ret string return ret } @@ -58,7 +60,7 @@ func (o *PatchedFlowStageBindingRequest) GetTarget() string { // GetTargetOk returns a tuple with the Target field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedFlowStageBindingRequest) GetTargetOk() (*string, bool) { - if o == nil || o.Target == nil { + if o == nil || IsNil(o.Target) { return nil, false } return o.Target, true @@ -66,7 +68,7 @@ func (o *PatchedFlowStageBindingRequest) GetTargetOk() (*string, bool) { // HasTarget returns a boolean if a field has been set. func (o *PatchedFlowStageBindingRequest) HasTarget() bool { - if o != nil && o.Target != nil { + if o != nil && !IsNil(o.Target) { return true } @@ -80,7 +82,7 @@ func (o *PatchedFlowStageBindingRequest) SetTarget(v string) { // GetStage returns the Stage field value if set, zero value otherwise. func (o *PatchedFlowStageBindingRequest) GetStage() string { - if o == nil || o.Stage == nil { + if o == nil || IsNil(o.Stage) { var ret string return ret } @@ -90,7 +92,7 @@ func (o *PatchedFlowStageBindingRequest) GetStage() string { // GetStageOk returns a tuple with the Stage field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedFlowStageBindingRequest) GetStageOk() (*string, bool) { - if o == nil || o.Stage == nil { + if o == nil || IsNil(o.Stage) { return nil, false } return o.Stage, true @@ -98,7 +100,7 @@ func (o *PatchedFlowStageBindingRequest) GetStageOk() (*string, bool) { // HasStage returns a boolean if a field has been set. func (o *PatchedFlowStageBindingRequest) HasStage() bool { - if o != nil && o.Stage != nil { + if o != nil && !IsNil(o.Stage) { return true } @@ -112,7 +114,7 @@ func (o *PatchedFlowStageBindingRequest) SetStage(v string) { // GetEvaluateOnPlan returns the EvaluateOnPlan field value if set, zero value otherwise. func (o *PatchedFlowStageBindingRequest) GetEvaluateOnPlan() bool { - if o == nil || o.EvaluateOnPlan == nil { + if o == nil || IsNil(o.EvaluateOnPlan) { var ret bool return ret } @@ -122,7 +124,7 @@ func (o *PatchedFlowStageBindingRequest) GetEvaluateOnPlan() bool { // GetEvaluateOnPlanOk returns a tuple with the EvaluateOnPlan field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedFlowStageBindingRequest) GetEvaluateOnPlanOk() (*bool, bool) { - if o == nil || o.EvaluateOnPlan == nil { + if o == nil || IsNil(o.EvaluateOnPlan) { return nil, false } return o.EvaluateOnPlan, true @@ -130,7 +132,7 @@ func (o *PatchedFlowStageBindingRequest) GetEvaluateOnPlanOk() (*bool, bool) { // HasEvaluateOnPlan returns a boolean if a field has been set. func (o *PatchedFlowStageBindingRequest) HasEvaluateOnPlan() bool { - if o != nil && o.EvaluateOnPlan != nil { + if o != nil && !IsNil(o.EvaluateOnPlan) { return true } @@ -144,7 +146,7 @@ func (o *PatchedFlowStageBindingRequest) SetEvaluateOnPlan(v bool) { // GetReEvaluatePolicies returns the ReEvaluatePolicies field value if set, zero value otherwise. func (o *PatchedFlowStageBindingRequest) GetReEvaluatePolicies() bool { - if o == nil || o.ReEvaluatePolicies == nil { + if o == nil || IsNil(o.ReEvaluatePolicies) { var ret bool return ret } @@ -154,7 +156,7 @@ func (o *PatchedFlowStageBindingRequest) GetReEvaluatePolicies() bool { // GetReEvaluatePoliciesOk returns a tuple with the ReEvaluatePolicies field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedFlowStageBindingRequest) GetReEvaluatePoliciesOk() (*bool, bool) { - if o == nil || o.ReEvaluatePolicies == nil { + if o == nil || IsNil(o.ReEvaluatePolicies) { return nil, false } return o.ReEvaluatePolicies, true @@ -162,7 +164,7 @@ func (o *PatchedFlowStageBindingRequest) GetReEvaluatePoliciesOk() (*bool, bool) // HasReEvaluatePolicies returns a boolean if a field has been set. func (o *PatchedFlowStageBindingRequest) HasReEvaluatePolicies() bool { - if o != nil && o.ReEvaluatePolicies != nil { + if o != nil && !IsNil(o.ReEvaluatePolicies) { return true } @@ -176,7 +178,7 @@ func (o *PatchedFlowStageBindingRequest) SetReEvaluatePolicies(v bool) { // GetOrder returns the Order field value if set, zero value otherwise. func (o *PatchedFlowStageBindingRequest) GetOrder() int32 { - if o == nil || o.Order == nil { + if o == nil || IsNil(o.Order) { var ret int32 return ret } @@ -186,7 +188,7 @@ func (o *PatchedFlowStageBindingRequest) GetOrder() int32 { // GetOrderOk returns a tuple with the Order field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedFlowStageBindingRequest) GetOrderOk() (*int32, bool) { - if o == nil || o.Order == nil { + if o == nil || IsNil(o.Order) { return nil, false } return o.Order, true @@ -194,7 +196,7 @@ func (o *PatchedFlowStageBindingRequest) GetOrderOk() (*int32, bool) { // HasOrder returns a boolean if a field has been set. func (o *PatchedFlowStageBindingRequest) HasOrder() bool { - if o != nil && o.Order != nil { + if o != nil && !IsNil(o.Order) { return true } @@ -208,7 +210,7 @@ func (o *PatchedFlowStageBindingRequest) SetOrder(v int32) { // GetPolicyEngineMode returns the PolicyEngineMode field value if set, zero value otherwise. func (o *PatchedFlowStageBindingRequest) GetPolicyEngineMode() PolicyEngineMode { - if o == nil || o.PolicyEngineMode == nil { + if o == nil || IsNil(o.PolicyEngineMode) { var ret PolicyEngineMode return ret } @@ -218,7 +220,7 @@ func (o *PatchedFlowStageBindingRequest) GetPolicyEngineMode() PolicyEngineMode // GetPolicyEngineModeOk returns a tuple with the PolicyEngineMode field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedFlowStageBindingRequest) GetPolicyEngineModeOk() (*PolicyEngineMode, bool) { - if o == nil || o.PolicyEngineMode == nil { + if o == nil || IsNil(o.PolicyEngineMode) { return nil, false } return o.PolicyEngineMode, true @@ -226,7 +228,7 @@ func (o *PatchedFlowStageBindingRequest) GetPolicyEngineModeOk() (*PolicyEngineM // HasPolicyEngineMode returns a boolean if a field has been set. func (o *PatchedFlowStageBindingRequest) HasPolicyEngineMode() bool { - if o != nil && o.PolicyEngineMode != nil { + if o != nil && !IsNil(o.PolicyEngineMode) { return true } @@ -238,73 +240,70 @@ func (o *PatchedFlowStageBindingRequest) SetPolicyEngineMode(v PolicyEngineMode) o.PolicyEngineMode = &v } -// GetInvalidResponseAction returns the InvalidResponseAction field value if set, zero value otherwise (both if not set or set to explicit null). +// GetInvalidResponseAction returns the InvalidResponseAction field value if set, zero value otherwise. func (o *PatchedFlowStageBindingRequest) GetInvalidResponseAction() InvalidResponseActionEnum { - if o == nil || o.InvalidResponseAction.Get() == nil { + if o == nil || IsNil(o.InvalidResponseAction) { var ret InvalidResponseActionEnum return ret } - return *o.InvalidResponseAction.Get() + return *o.InvalidResponseAction } // GetInvalidResponseActionOk returns a tuple with the InvalidResponseAction field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PatchedFlowStageBindingRequest) GetInvalidResponseActionOk() (*InvalidResponseActionEnum, bool) { - if o == nil { + if o == nil || IsNil(o.InvalidResponseAction) { return nil, false } - return o.InvalidResponseAction.Get(), o.InvalidResponseAction.IsSet() + return o.InvalidResponseAction, true } // HasInvalidResponseAction returns a boolean if a field has been set. func (o *PatchedFlowStageBindingRequest) HasInvalidResponseAction() bool { - if o != nil && o.InvalidResponseAction.IsSet() { + if o != nil && !IsNil(o.InvalidResponseAction) { return true } return false } -// SetInvalidResponseAction gets a reference to the given NullableInvalidResponseActionEnum and assigns it to the InvalidResponseAction field. +// SetInvalidResponseAction gets a reference to the given InvalidResponseActionEnum and assigns it to the InvalidResponseAction field. func (o *PatchedFlowStageBindingRequest) SetInvalidResponseAction(v InvalidResponseActionEnum) { - o.InvalidResponseAction.Set(&v) -} - -// SetInvalidResponseActionNil sets the value for InvalidResponseAction to be an explicit nil -func (o *PatchedFlowStageBindingRequest) SetInvalidResponseActionNil() { - o.InvalidResponseAction.Set(nil) + o.InvalidResponseAction = &v } -// UnsetInvalidResponseAction ensures that no value is present for InvalidResponseAction, not even an explicit nil -func (o *PatchedFlowStageBindingRequest) UnsetInvalidResponseAction() { - o.InvalidResponseAction.Unset() +func (o PatchedFlowStageBindingRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) } -func (o PatchedFlowStageBindingRequest) MarshalJSON() ([]byte, error) { +func (o PatchedFlowStageBindingRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Target != nil { + if !IsNil(o.Target) { toSerialize["target"] = o.Target } - if o.Stage != nil { + if !IsNil(o.Stage) { toSerialize["stage"] = o.Stage } - if o.EvaluateOnPlan != nil { + if !IsNil(o.EvaluateOnPlan) { toSerialize["evaluate_on_plan"] = o.EvaluateOnPlan } - if o.ReEvaluatePolicies != nil { + if !IsNil(o.ReEvaluatePolicies) { toSerialize["re_evaluate_policies"] = o.ReEvaluatePolicies } - if o.Order != nil { + if !IsNil(o.Order) { toSerialize["order"] = o.Order } - if o.PolicyEngineMode != nil { + if !IsNil(o.PolicyEngineMode) { toSerialize["policy_engine_mode"] = o.PolicyEngineMode } - if o.InvalidResponseAction.IsSet() { - toSerialize["invalid_response_action"] = o.InvalidResponseAction.Get() + if !IsNil(o.InvalidResponseAction) { + toSerialize["invalid_response_action"] = o.InvalidResponseAction } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedFlowStageBindingRequest struct { diff --git a/model_patched_group_request.go b/model_patched_group_request.go index 64fb74b0b..88a02d03e 100644 --- a/model_patched_group_request.go +++ b/model_patched_group_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedGroupRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedGroupRequest{} + // PatchedGroupRequest Group Serializer type PatchedGroupRequest struct { Name *string `json:"name,omitempty"` @@ -44,7 +47,7 @@ func NewPatchedGroupRequestWithDefaults() *PatchedGroupRequest { // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedGroupRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -54,7 +57,7 @@ func (o *PatchedGroupRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedGroupRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -62,7 +65,7 @@ func (o *PatchedGroupRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedGroupRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -76,7 +79,7 @@ func (o *PatchedGroupRequest) SetName(v string) { // GetIsSuperuser returns the IsSuperuser field value if set, zero value otherwise. func (o *PatchedGroupRequest) GetIsSuperuser() bool { - if o == nil || o.IsSuperuser == nil { + if o == nil || IsNil(o.IsSuperuser) { var ret bool return ret } @@ -86,7 +89,7 @@ func (o *PatchedGroupRequest) GetIsSuperuser() bool { // GetIsSuperuserOk returns a tuple with the IsSuperuser field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedGroupRequest) GetIsSuperuserOk() (*bool, bool) { - if o == nil || o.IsSuperuser == nil { + if o == nil || IsNil(o.IsSuperuser) { return nil, false } return o.IsSuperuser, true @@ -94,7 +97,7 @@ func (o *PatchedGroupRequest) GetIsSuperuserOk() (*bool, bool) { // HasIsSuperuser returns a boolean if a field has been set. func (o *PatchedGroupRequest) HasIsSuperuser() bool { - if o != nil && o.IsSuperuser != nil { + if o != nil && !IsNil(o.IsSuperuser) { return true } @@ -108,7 +111,7 @@ func (o *PatchedGroupRequest) SetIsSuperuser(v bool) { // GetParent returns the Parent field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedGroupRequest) GetParent() string { - if o == nil || o.Parent.Get() == nil { + if o == nil || IsNil(o.Parent.Get()) { var ret string return ret } @@ -151,7 +154,7 @@ func (o *PatchedGroupRequest) UnsetParent() { // GetUsers returns the Users field value if set, zero value otherwise. func (o *PatchedGroupRequest) GetUsers() []int32 { - if o == nil || o.Users == nil { + if o == nil || IsNil(o.Users) { var ret []int32 return ret } @@ -161,7 +164,7 @@ func (o *PatchedGroupRequest) GetUsers() []int32 { // GetUsersOk returns a tuple with the Users field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedGroupRequest) GetUsersOk() ([]int32, bool) { - if o == nil || o.Users == nil { + if o == nil || IsNil(o.Users) { return nil, false } return o.Users, true @@ -169,7 +172,7 @@ func (o *PatchedGroupRequest) GetUsersOk() ([]int32, bool) { // HasUsers returns a boolean if a field has been set. func (o *PatchedGroupRequest) HasUsers() bool { - if o != nil && o.Users != nil { + if o != nil && !IsNil(o.Users) { return true } @@ -183,7 +186,7 @@ func (o *PatchedGroupRequest) SetUsers(v []int32) { // GetAttributes returns the Attributes field value if set, zero value otherwise. func (o *PatchedGroupRequest) GetAttributes() map[string]interface{} { - if o == nil || o.Attributes == nil { + if o == nil || IsNil(o.Attributes) { var ret map[string]interface{} return ret } @@ -193,15 +196,15 @@ func (o *PatchedGroupRequest) GetAttributes() map[string]interface{} { // GetAttributesOk returns a tuple with the Attributes field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedGroupRequest) GetAttributesOk() (map[string]interface{}, bool) { - if o == nil || o.Attributes == nil { - return nil, false + if o == nil || IsNil(o.Attributes) { + return map[string]interface{}{}, false } return o.Attributes, true } // HasAttributes returns a boolean if a field has been set. func (o *PatchedGroupRequest) HasAttributes() bool { - if o != nil && o.Attributes != nil { + if o != nil && !IsNil(o.Attributes) { return true } @@ -214,23 +217,31 @@ func (o *PatchedGroupRequest) SetAttributes(v map[string]interface{}) { } func (o PatchedGroupRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedGroupRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.IsSuperuser != nil { + if !IsNil(o.IsSuperuser) { toSerialize["is_superuser"] = o.IsSuperuser } if o.Parent.IsSet() { toSerialize["parent"] = o.Parent.Get() } - if o.Users != nil { + if !IsNil(o.Users) { toSerialize["users"] = o.Users } - if o.Attributes != nil { + if !IsNil(o.Attributes) { toSerialize["attributes"] = o.Attributes } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedGroupRequest struct { diff --git a/model_patched_identification_stage_request.go b/model_patched_identification_stage_request.go index bae5ee57b..e9aee718d 100644 --- a/model_patched_identification_stage_request.go +++ b/model_patched_identification_stage_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedIdentificationStageRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedIdentificationStageRequest{} + // PatchedIdentificationStageRequest IdentificationStage Serializer type PatchedIdentificationStageRequest struct { Name *string `json:"name,omitempty"` @@ -57,7 +60,7 @@ func NewPatchedIdentificationStageRequestWithDefaults() *PatchedIdentificationSt // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedIdentificationStageRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -67,7 +70,7 @@ func (o *PatchedIdentificationStageRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedIdentificationStageRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -75,7 +78,7 @@ func (o *PatchedIdentificationStageRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedIdentificationStageRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -89,7 +92,7 @@ func (o *PatchedIdentificationStageRequest) SetName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *PatchedIdentificationStageRequest) GetFlowSet() []FlowSetRequest { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSetRequest return ret } @@ -99,7 +102,7 @@ func (o *PatchedIdentificationStageRequest) GetFlowSet() []FlowSetRequest { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedIdentificationStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -107,7 +110,7 @@ func (o *PatchedIdentificationStageRequest) GetFlowSetOk() ([]FlowSetRequest, bo // HasFlowSet returns a boolean if a field has been set. func (o *PatchedIdentificationStageRequest) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -121,7 +124,7 @@ func (o *PatchedIdentificationStageRequest) SetFlowSet(v []FlowSetRequest) { // GetUserFields returns the UserFields field value if set, zero value otherwise. func (o *PatchedIdentificationStageRequest) GetUserFields() []UserFieldsEnum { - if o == nil || o.UserFields == nil { + if o == nil || IsNil(o.UserFields) { var ret []UserFieldsEnum return ret } @@ -131,7 +134,7 @@ func (o *PatchedIdentificationStageRequest) GetUserFields() []UserFieldsEnum { // GetUserFieldsOk returns a tuple with the UserFields field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedIdentificationStageRequest) GetUserFieldsOk() ([]UserFieldsEnum, bool) { - if o == nil || o.UserFields == nil { + if o == nil || IsNil(o.UserFields) { return nil, false } return o.UserFields, true @@ -139,7 +142,7 @@ func (o *PatchedIdentificationStageRequest) GetUserFieldsOk() ([]UserFieldsEnum, // HasUserFields returns a boolean if a field has been set. func (o *PatchedIdentificationStageRequest) HasUserFields() bool { - if o != nil && o.UserFields != nil { + if o != nil && !IsNil(o.UserFields) { return true } @@ -153,7 +156,7 @@ func (o *PatchedIdentificationStageRequest) SetUserFields(v []UserFieldsEnum) { // GetPasswordStage returns the PasswordStage field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedIdentificationStageRequest) GetPasswordStage() string { - if o == nil || o.PasswordStage.Get() == nil { + if o == nil || IsNil(o.PasswordStage.Get()) { var ret string return ret } @@ -196,7 +199,7 @@ func (o *PatchedIdentificationStageRequest) UnsetPasswordStage() { // GetCaseInsensitiveMatching returns the CaseInsensitiveMatching field value if set, zero value otherwise. func (o *PatchedIdentificationStageRequest) GetCaseInsensitiveMatching() bool { - if o == nil || o.CaseInsensitiveMatching == nil { + if o == nil || IsNil(o.CaseInsensitiveMatching) { var ret bool return ret } @@ -206,7 +209,7 @@ func (o *PatchedIdentificationStageRequest) GetCaseInsensitiveMatching() bool { // GetCaseInsensitiveMatchingOk returns a tuple with the CaseInsensitiveMatching field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedIdentificationStageRequest) GetCaseInsensitiveMatchingOk() (*bool, bool) { - if o == nil || o.CaseInsensitiveMatching == nil { + if o == nil || IsNil(o.CaseInsensitiveMatching) { return nil, false } return o.CaseInsensitiveMatching, true @@ -214,7 +217,7 @@ func (o *PatchedIdentificationStageRequest) GetCaseInsensitiveMatchingOk() (*boo // HasCaseInsensitiveMatching returns a boolean if a field has been set. func (o *PatchedIdentificationStageRequest) HasCaseInsensitiveMatching() bool { - if o != nil && o.CaseInsensitiveMatching != nil { + if o != nil && !IsNil(o.CaseInsensitiveMatching) { return true } @@ -228,7 +231,7 @@ func (o *PatchedIdentificationStageRequest) SetCaseInsensitiveMatching(v bool) { // GetShowMatchedUser returns the ShowMatchedUser field value if set, zero value otherwise. func (o *PatchedIdentificationStageRequest) GetShowMatchedUser() bool { - if o == nil || o.ShowMatchedUser == nil { + if o == nil || IsNil(o.ShowMatchedUser) { var ret bool return ret } @@ -238,7 +241,7 @@ func (o *PatchedIdentificationStageRequest) GetShowMatchedUser() bool { // GetShowMatchedUserOk returns a tuple with the ShowMatchedUser field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedIdentificationStageRequest) GetShowMatchedUserOk() (*bool, bool) { - if o == nil || o.ShowMatchedUser == nil { + if o == nil || IsNil(o.ShowMatchedUser) { return nil, false } return o.ShowMatchedUser, true @@ -246,7 +249,7 @@ func (o *PatchedIdentificationStageRequest) GetShowMatchedUserOk() (*bool, bool) // HasShowMatchedUser returns a boolean if a field has been set. func (o *PatchedIdentificationStageRequest) HasShowMatchedUser() bool { - if o != nil && o.ShowMatchedUser != nil { + if o != nil && !IsNil(o.ShowMatchedUser) { return true } @@ -260,7 +263,7 @@ func (o *PatchedIdentificationStageRequest) SetShowMatchedUser(v bool) { // GetEnrollmentFlow returns the EnrollmentFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedIdentificationStageRequest) GetEnrollmentFlow() string { - if o == nil || o.EnrollmentFlow.Get() == nil { + if o == nil || IsNil(o.EnrollmentFlow.Get()) { var ret string return ret } @@ -303,7 +306,7 @@ func (o *PatchedIdentificationStageRequest) UnsetEnrollmentFlow() { // GetRecoveryFlow returns the RecoveryFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedIdentificationStageRequest) GetRecoveryFlow() string { - if o == nil || o.RecoveryFlow.Get() == nil { + if o == nil || IsNil(o.RecoveryFlow.Get()) { var ret string return ret } @@ -346,7 +349,7 @@ func (o *PatchedIdentificationStageRequest) UnsetRecoveryFlow() { // GetPasswordlessFlow returns the PasswordlessFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedIdentificationStageRequest) GetPasswordlessFlow() string { - if o == nil || o.PasswordlessFlow.Get() == nil { + if o == nil || IsNil(o.PasswordlessFlow.Get()) { var ret string return ret } @@ -389,7 +392,7 @@ func (o *PatchedIdentificationStageRequest) UnsetPasswordlessFlow() { // GetSources returns the Sources field value if set, zero value otherwise. func (o *PatchedIdentificationStageRequest) GetSources() []string { - if o == nil || o.Sources == nil { + if o == nil || IsNil(o.Sources) { var ret []string return ret } @@ -399,7 +402,7 @@ func (o *PatchedIdentificationStageRequest) GetSources() []string { // GetSourcesOk returns a tuple with the Sources field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedIdentificationStageRequest) GetSourcesOk() ([]string, bool) { - if o == nil || o.Sources == nil { + if o == nil || IsNil(o.Sources) { return nil, false } return o.Sources, true @@ -407,7 +410,7 @@ func (o *PatchedIdentificationStageRequest) GetSourcesOk() ([]string, bool) { // HasSources returns a boolean if a field has been set. func (o *PatchedIdentificationStageRequest) HasSources() bool { - if o != nil && o.Sources != nil { + if o != nil && !IsNil(o.Sources) { return true } @@ -421,7 +424,7 @@ func (o *PatchedIdentificationStageRequest) SetSources(v []string) { // GetShowSourceLabels returns the ShowSourceLabels field value if set, zero value otherwise. func (o *PatchedIdentificationStageRequest) GetShowSourceLabels() bool { - if o == nil || o.ShowSourceLabels == nil { + if o == nil || IsNil(o.ShowSourceLabels) { var ret bool return ret } @@ -431,7 +434,7 @@ func (o *PatchedIdentificationStageRequest) GetShowSourceLabels() bool { // GetShowSourceLabelsOk returns a tuple with the ShowSourceLabels field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedIdentificationStageRequest) GetShowSourceLabelsOk() (*bool, bool) { - if o == nil || o.ShowSourceLabels == nil { + if o == nil || IsNil(o.ShowSourceLabels) { return nil, false } return o.ShowSourceLabels, true @@ -439,7 +442,7 @@ func (o *PatchedIdentificationStageRequest) GetShowSourceLabelsOk() (*bool, bool // HasShowSourceLabels returns a boolean if a field has been set. func (o *PatchedIdentificationStageRequest) HasShowSourceLabels() bool { - if o != nil && o.ShowSourceLabels != nil { + if o != nil && !IsNil(o.ShowSourceLabels) { return true } @@ -452,23 +455,31 @@ func (o *PatchedIdentificationStageRequest) SetShowSourceLabels(v bool) { } func (o PatchedIdentificationStageRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedIdentificationStageRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.FlowSet != nil { + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } - if o.UserFields != nil { + if !IsNil(o.UserFields) { toSerialize["user_fields"] = o.UserFields } if o.PasswordStage.IsSet() { toSerialize["password_stage"] = o.PasswordStage.Get() } - if o.CaseInsensitiveMatching != nil { + if !IsNil(o.CaseInsensitiveMatching) { toSerialize["case_insensitive_matching"] = o.CaseInsensitiveMatching } - if o.ShowMatchedUser != nil { + if !IsNil(o.ShowMatchedUser) { toSerialize["show_matched_user"] = o.ShowMatchedUser } if o.EnrollmentFlow.IsSet() { @@ -480,13 +491,13 @@ func (o PatchedIdentificationStageRequest) MarshalJSON() ([]byte, error) { if o.PasswordlessFlow.IsSet() { toSerialize["passwordless_flow"] = o.PasswordlessFlow.Get() } - if o.Sources != nil { + if !IsNil(o.Sources) { toSerialize["sources"] = o.Sources } - if o.ShowSourceLabels != nil { + if !IsNil(o.ShowSourceLabels) { toSerialize["show_source_labels"] = o.ShowSourceLabels } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedIdentificationStageRequest struct { diff --git a/model_patched_invitation_request.go b/model_patched_invitation_request.go index 4f0377a35..5a91aa82c 100644 --- a/model_patched_invitation_request.go +++ b/model_patched_invitation_request.go @@ -16,6 +16,9 @@ import ( "time" ) +// checks if the PatchedInvitationRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedInvitationRequest{} + // PatchedInvitationRequest Invitation Serializer type PatchedInvitationRequest struct { Name *string `json:"name,omitempty"` @@ -46,7 +49,7 @@ func NewPatchedInvitationRequestWithDefaults() *PatchedInvitationRequest { // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedInvitationRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -56,7 +59,7 @@ func (o *PatchedInvitationRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedInvitationRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -64,7 +67,7 @@ func (o *PatchedInvitationRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedInvitationRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -78,7 +81,7 @@ func (o *PatchedInvitationRequest) SetName(v string) { // GetExpires returns the Expires field value if set, zero value otherwise. func (o *PatchedInvitationRequest) GetExpires() time.Time { - if o == nil || o.Expires == nil { + if o == nil || IsNil(o.Expires) { var ret time.Time return ret } @@ -88,7 +91,7 @@ func (o *PatchedInvitationRequest) GetExpires() time.Time { // GetExpiresOk returns a tuple with the Expires field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedInvitationRequest) GetExpiresOk() (*time.Time, bool) { - if o == nil || o.Expires == nil { + if o == nil || IsNil(o.Expires) { return nil, false } return o.Expires, true @@ -96,7 +99,7 @@ func (o *PatchedInvitationRequest) GetExpiresOk() (*time.Time, bool) { // HasExpires returns a boolean if a field has been set. func (o *PatchedInvitationRequest) HasExpires() bool { - if o != nil && o.Expires != nil { + if o != nil && !IsNil(o.Expires) { return true } @@ -110,7 +113,7 @@ func (o *PatchedInvitationRequest) SetExpires(v time.Time) { // GetFixedData returns the FixedData field value if set, zero value otherwise. func (o *PatchedInvitationRequest) GetFixedData() map[string]interface{} { - if o == nil || o.FixedData == nil { + if o == nil || IsNil(o.FixedData) { var ret map[string]interface{} return ret } @@ -120,15 +123,15 @@ func (o *PatchedInvitationRequest) GetFixedData() map[string]interface{} { // GetFixedDataOk returns a tuple with the FixedData field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedInvitationRequest) GetFixedDataOk() (map[string]interface{}, bool) { - if o == nil || o.FixedData == nil { - return nil, false + if o == nil || IsNil(o.FixedData) { + return map[string]interface{}{}, false } return o.FixedData, true } // HasFixedData returns a boolean if a field has been set. func (o *PatchedInvitationRequest) HasFixedData() bool { - if o != nil && o.FixedData != nil { + if o != nil && !IsNil(o.FixedData) { return true } @@ -142,7 +145,7 @@ func (o *PatchedInvitationRequest) SetFixedData(v map[string]interface{}) { // GetSingleUse returns the SingleUse field value if set, zero value otherwise. func (o *PatchedInvitationRequest) GetSingleUse() bool { - if o == nil || o.SingleUse == nil { + if o == nil || IsNil(o.SingleUse) { var ret bool return ret } @@ -152,7 +155,7 @@ func (o *PatchedInvitationRequest) GetSingleUse() bool { // GetSingleUseOk returns a tuple with the SingleUse field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedInvitationRequest) GetSingleUseOk() (*bool, bool) { - if o == nil || o.SingleUse == nil { + if o == nil || IsNil(o.SingleUse) { return nil, false } return o.SingleUse, true @@ -160,7 +163,7 @@ func (o *PatchedInvitationRequest) GetSingleUseOk() (*bool, bool) { // HasSingleUse returns a boolean if a field has been set. func (o *PatchedInvitationRequest) HasSingleUse() bool { - if o != nil && o.SingleUse != nil { + if o != nil && !IsNil(o.SingleUse) { return true } @@ -174,7 +177,7 @@ func (o *PatchedInvitationRequest) SetSingleUse(v bool) { // GetFlow returns the Flow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedInvitationRequest) GetFlow() string { - if o == nil || o.Flow.Get() == nil { + if o == nil || IsNil(o.Flow.Get()) { var ret string return ret } @@ -216,23 +219,31 @@ func (o *PatchedInvitationRequest) UnsetFlow() { } func (o PatchedInvitationRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedInvitationRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.Expires != nil { + if !IsNil(o.Expires) { toSerialize["expires"] = o.Expires } - if o.FixedData != nil { + if !IsNil(o.FixedData) { toSerialize["fixed_data"] = o.FixedData } - if o.SingleUse != nil { + if !IsNil(o.SingleUse) { toSerialize["single_use"] = o.SingleUse } if o.Flow.IsSet() { toSerialize["flow"] = o.Flow.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedInvitationRequest struct { diff --git a/model_patched_invitation_stage_request.go b/model_patched_invitation_stage_request.go index f65041501..d08177f87 100644 --- a/model_patched_invitation_stage_request.go +++ b/model_patched_invitation_stage_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedInvitationStageRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedInvitationStageRequest{} + // PatchedInvitationStageRequest InvitationStage Serializer type PatchedInvitationStageRequest struct { Name *string `json:"name,omitempty"` @@ -42,7 +45,7 @@ func NewPatchedInvitationStageRequestWithDefaults() *PatchedInvitationStageReque // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedInvitationStageRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -52,7 +55,7 @@ func (o *PatchedInvitationStageRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedInvitationStageRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -60,7 +63,7 @@ func (o *PatchedInvitationStageRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedInvitationStageRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -74,7 +77,7 @@ func (o *PatchedInvitationStageRequest) SetName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *PatchedInvitationStageRequest) GetFlowSet() []FlowSetRequest { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSetRequest return ret } @@ -84,7 +87,7 @@ func (o *PatchedInvitationStageRequest) GetFlowSet() []FlowSetRequest { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedInvitationStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -92,7 +95,7 @@ func (o *PatchedInvitationStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) // HasFlowSet returns a boolean if a field has been set. func (o *PatchedInvitationStageRequest) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -106,7 +109,7 @@ func (o *PatchedInvitationStageRequest) SetFlowSet(v []FlowSetRequest) { // GetContinueFlowWithoutInvitation returns the ContinueFlowWithoutInvitation field value if set, zero value otherwise. func (o *PatchedInvitationStageRequest) GetContinueFlowWithoutInvitation() bool { - if o == nil || o.ContinueFlowWithoutInvitation == nil { + if o == nil || IsNil(o.ContinueFlowWithoutInvitation) { var ret bool return ret } @@ -116,7 +119,7 @@ func (o *PatchedInvitationStageRequest) GetContinueFlowWithoutInvitation() bool // GetContinueFlowWithoutInvitationOk returns a tuple with the ContinueFlowWithoutInvitation field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedInvitationStageRequest) GetContinueFlowWithoutInvitationOk() (*bool, bool) { - if o == nil || o.ContinueFlowWithoutInvitation == nil { + if o == nil || IsNil(o.ContinueFlowWithoutInvitation) { return nil, false } return o.ContinueFlowWithoutInvitation, true @@ -124,7 +127,7 @@ func (o *PatchedInvitationStageRequest) GetContinueFlowWithoutInvitationOk() (*b // HasContinueFlowWithoutInvitation returns a boolean if a field has been set. func (o *PatchedInvitationStageRequest) HasContinueFlowWithoutInvitation() bool { - if o != nil && o.ContinueFlowWithoutInvitation != nil { + if o != nil && !IsNil(o.ContinueFlowWithoutInvitation) { return true } @@ -137,17 +140,25 @@ func (o *PatchedInvitationStageRequest) SetContinueFlowWithoutInvitation(v bool) } func (o PatchedInvitationStageRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedInvitationStageRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.FlowSet != nil { + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } - if o.ContinueFlowWithoutInvitation != nil { + if !IsNil(o.ContinueFlowWithoutInvitation) { toSerialize["continue_flow_without_invitation"] = o.ContinueFlowWithoutInvitation } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedInvitationStageRequest struct { diff --git a/model_patched_kubernetes_service_connection_request.go b/model_patched_kubernetes_service_connection_request.go index 57d624721..b1b9ba03d 100644 --- a/model_patched_kubernetes_service_connection_request.go +++ b/model_patched_kubernetes_service_connection_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedKubernetesServiceConnectionRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedKubernetesServiceConnectionRequest{} + // PatchedKubernetesServiceConnectionRequest KubernetesServiceConnection Serializer type PatchedKubernetesServiceConnectionRequest struct { Name *string `json:"name,omitempty"` @@ -45,7 +48,7 @@ func NewPatchedKubernetesServiceConnectionRequestWithDefaults() *PatchedKubernet // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedKubernetesServiceConnectionRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -55,7 +58,7 @@ func (o *PatchedKubernetesServiceConnectionRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedKubernetesServiceConnectionRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -63,7 +66,7 @@ func (o *PatchedKubernetesServiceConnectionRequest) GetNameOk() (*string, bool) // HasName returns a boolean if a field has been set. func (o *PatchedKubernetesServiceConnectionRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -77,7 +80,7 @@ func (o *PatchedKubernetesServiceConnectionRequest) SetName(v string) { // GetLocal returns the Local field value if set, zero value otherwise. func (o *PatchedKubernetesServiceConnectionRequest) GetLocal() bool { - if o == nil || o.Local == nil { + if o == nil || IsNil(o.Local) { var ret bool return ret } @@ -87,7 +90,7 @@ func (o *PatchedKubernetesServiceConnectionRequest) GetLocal() bool { // GetLocalOk returns a tuple with the Local field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedKubernetesServiceConnectionRequest) GetLocalOk() (*bool, bool) { - if o == nil || o.Local == nil { + if o == nil || IsNil(o.Local) { return nil, false } return o.Local, true @@ -95,7 +98,7 @@ func (o *PatchedKubernetesServiceConnectionRequest) GetLocalOk() (*bool, bool) { // HasLocal returns a boolean if a field has been set. func (o *PatchedKubernetesServiceConnectionRequest) HasLocal() bool { - if o != nil && o.Local != nil { + if o != nil && !IsNil(o.Local) { return true } @@ -109,7 +112,7 @@ func (o *PatchedKubernetesServiceConnectionRequest) SetLocal(v bool) { // GetKubeconfig returns the Kubeconfig field value if set, zero value otherwise. func (o *PatchedKubernetesServiceConnectionRequest) GetKubeconfig() map[string]interface{} { - if o == nil || o.Kubeconfig == nil { + if o == nil || IsNil(o.Kubeconfig) { var ret map[string]interface{} return ret } @@ -119,15 +122,15 @@ func (o *PatchedKubernetesServiceConnectionRequest) GetKubeconfig() map[string]i // GetKubeconfigOk returns a tuple with the Kubeconfig field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedKubernetesServiceConnectionRequest) GetKubeconfigOk() (map[string]interface{}, bool) { - if o == nil || o.Kubeconfig == nil { - return nil, false + if o == nil || IsNil(o.Kubeconfig) { + return map[string]interface{}{}, false } return o.Kubeconfig, true } // HasKubeconfig returns a boolean if a field has been set. func (o *PatchedKubernetesServiceConnectionRequest) HasKubeconfig() bool { - if o != nil && o.Kubeconfig != nil { + if o != nil && !IsNil(o.Kubeconfig) { return true } @@ -141,7 +144,7 @@ func (o *PatchedKubernetesServiceConnectionRequest) SetKubeconfig(v map[string]i // GetVerifySsl returns the VerifySsl field value if set, zero value otherwise. func (o *PatchedKubernetesServiceConnectionRequest) GetVerifySsl() bool { - if o == nil || o.VerifySsl == nil { + if o == nil || IsNil(o.VerifySsl) { var ret bool return ret } @@ -151,7 +154,7 @@ func (o *PatchedKubernetesServiceConnectionRequest) GetVerifySsl() bool { // GetVerifySslOk returns a tuple with the VerifySsl field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedKubernetesServiceConnectionRequest) GetVerifySslOk() (*bool, bool) { - if o == nil || o.VerifySsl == nil { + if o == nil || IsNil(o.VerifySsl) { return nil, false } return o.VerifySsl, true @@ -159,7 +162,7 @@ func (o *PatchedKubernetesServiceConnectionRequest) GetVerifySslOk() (*bool, boo // HasVerifySsl returns a boolean if a field has been set. func (o *PatchedKubernetesServiceConnectionRequest) HasVerifySsl() bool { - if o != nil && o.VerifySsl != nil { + if o != nil && !IsNil(o.VerifySsl) { return true } @@ -172,20 +175,28 @@ func (o *PatchedKubernetesServiceConnectionRequest) SetVerifySsl(v bool) { } func (o PatchedKubernetesServiceConnectionRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedKubernetesServiceConnectionRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.Local != nil { + if !IsNil(o.Local) { toSerialize["local"] = o.Local } - if o.Kubeconfig != nil { + if !IsNil(o.Kubeconfig) { toSerialize["kubeconfig"] = o.Kubeconfig } - if o.VerifySsl != nil { + if !IsNil(o.VerifySsl) { toSerialize["verify_ssl"] = o.VerifySsl } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedKubernetesServiceConnectionRequest struct { diff --git a/model_patched_ldap_property_mapping_request.go b/model_patched_ldap_property_mapping_request.go index e1cbf1ee8..d5526f5f8 100644 --- a/model_patched_ldap_property_mapping_request.go +++ b/model_patched_ldap_property_mapping_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedLDAPPropertyMappingRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedLDAPPropertyMappingRequest{} + // PatchedLDAPPropertyMappingRequest LDAP PropertyMapping Serializer type PatchedLDAPPropertyMappingRequest struct { // Objects which are managed by authentik. These objects are created and updated automatically. This is flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. @@ -43,7 +46,7 @@ func NewPatchedLDAPPropertyMappingRequestWithDefaults() *PatchedLDAPPropertyMapp // GetManaged returns the Managed field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedLDAPPropertyMappingRequest) GetManaged() string { - if o == nil || o.Managed.Get() == nil { + if o == nil || IsNil(o.Managed.Get()) { var ret string return ret } @@ -86,7 +89,7 @@ func (o *PatchedLDAPPropertyMappingRequest) UnsetManaged() { // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedLDAPPropertyMappingRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -96,7 +99,7 @@ func (o *PatchedLDAPPropertyMappingRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedLDAPPropertyMappingRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -104,7 +107,7 @@ func (o *PatchedLDAPPropertyMappingRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedLDAPPropertyMappingRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -118,7 +121,7 @@ func (o *PatchedLDAPPropertyMappingRequest) SetName(v string) { // GetExpression returns the Expression field value if set, zero value otherwise. func (o *PatchedLDAPPropertyMappingRequest) GetExpression() string { - if o == nil || o.Expression == nil { + if o == nil || IsNil(o.Expression) { var ret string return ret } @@ -128,7 +131,7 @@ func (o *PatchedLDAPPropertyMappingRequest) GetExpression() string { // GetExpressionOk returns a tuple with the Expression field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedLDAPPropertyMappingRequest) GetExpressionOk() (*string, bool) { - if o == nil || o.Expression == nil { + if o == nil || IsNil(o.Expression) { return nil, false } return o.Expression, true @@ -136,7 +139,7 @@ func (o *PatchedLDAPPropertyMappingRequest) GetExpressionOk() (*string, bool) { // HasExpression returns a boolean if a field has been set. func (o *PatchedLDAPPropertyMappingRequest) HasExpression() bool { - if o != nil && o.Expression != nil { + if o != nil && !IsNil(o.Expression) { return true } @@ -150,7 +153,7 @@ func (o *PatchedLDAPPropertyMappingRequest) SetExpression(v string) { // GetObjectField returns the ObjectField field value if set, zero value otherwise. func (o *PatchedLDAPPropertyMappingRequest) GetObjectField() string { - if o == nil || o.ObjectField == nil { + if o == nil || IsNil(o.ObjectField) { var ret string return ret } @@ -160,7 +163,7 @@ func (o *PatchedLDAPPropertyMappingRequest) GetObjectField() string { // GetObjectFieldOk returns a tuple with the ObjectField field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedLDAPPropertyMappingRequest) GetObjectFieldOk() (*string, bool) { - if o == nil || o.ObjectField == nil { + if o == nil || IsNil(o.ObjectField) { return nil, false } return o.ObjectField, true @@ -168,7 +171,7 @@ func (o *PatchedLDAPPropertyMappingRequest) GetObjectFieldOk() (*string, bool) { // HasObjectField returns a boolean if a field has been set. func (o *PatchedLDAPPropertyMappingRequest) HasObjectField() bool { - if o != nil && o.ObjectField != nil { + if o != nil && !IsNil(o.ObjectField) { return true } @@ -181,20 +184,28 @@ func (o *PatchedLDAPPropertyMappingRequest) SetObjectField(v string) { } func (o PatchedLDAPPropertyMappingRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedLDAPPropertyMappingRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Managed.IsSet() { toSerialize["managed"] = o.Managed.Get() } - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.Expression != nil { + if !IsNil(o.Expression) { toSerialize["expression"] = o.Expression } - if o.ObjectField != nil { + if !IsNil(o.ObjectField) { toSerialize["object_field"] = o.ObjectField } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedLDAPPropertyMappingRequest struct { diff --git a/model_patched_ldap_provider_request.go b/model_patched_ldap_provider_request.go index b81c173ce..cfd7ff00c 100644 --- a/model_patched_ldap_provider_request.go +++ b/model_patched_ldap_provider_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedLDAPProviderRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedLDAPProviderRequest{} + // PatchedLDAPProviderRequest LDAPProvider Serializer type PatchedLDAPProviderRequest struct { Name *string `json:"name,omitempty"` @@ -56,7 +59,7 @@ func NewPatchedLDAPProviderRequestWithDefaults() *PatchedLDAPProviderRequest { // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedLDAPProviderRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -66,7 +69,7 @@ func (o *PatchedLDAPProviderRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedLDAPProviderRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -74,7 +77,7 @@ func (o *PatchedLDAPProviderRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedLDAPProviderRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -88,7 +91,7 @@ func (o *PatchedLDAPProviderRequest) SetName(v string) { // GetAuthenticationFlow returns the AuthenticationFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedLDAPProviderRequest) GetAuthenticationFlow() string { - if o == nil || o.AuthenticationFlow.Get() == nil { + if o == nil || IsNil(o.AuthenticationFlow.Get()) { var ret string return ret } @@ -131,7 +134,7 @@ func (o *PatchedLDAPProviderRequest) UnsetAuthenticationFlow() { // GetAuthorizationFlow returns the AuthorizationFlow field value if set, zero value otherwise. func (o *PatchedLDAPProviderRequest) GetAuthorizationFlow() string { - if o == nil || o.AuthorizationFlow == nil { + if o == nil || IsNil(o.AuthorizationFlow) { var ret string return ret } @@ -141,7 +144,7 @@ func (o *PatchedLDAPProviderRequest) GetAuthorizationFlow() string { // GetAuthorizationFlowOk returns a tuple with the AuthorizationFlow field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedLDAPProviderRequest) GetAuthorizationFlowOk() (*string, bool) { - if o == nil || o.AuthorizationFlow == nil { + if o == nil || IsNil(o.AuthorizationFlow) { return nil, false } return o.AuthorizationFlow, true @@ -149,7 +152,7 @@ func (o *PatchedLDAPProviderRequest) GetAuthorizationFlowOk() (*string, bool) { // HasAuthorizationFlow returns a boolean if a field has been set. func (o *PatchedLDAPProviderRequest) HasAuthorizationFlow() bool { - if o != nil && o.AuthorizationFlow != nil { + if o != nil && !IsNil(o.AuthorizationFlow) { return true } @@ -163,7 +166,7 @@ func (o *PatchedLDAPProviderRequest) SetAuthorizationFlow(v string) { // GetPropertyMappings returns the PropertyMappings field value if set, zero value otherwise. func (o *PatchedLDAPProviderRequest) GetPropertyMappings() []string { - if o == nil || o.PropertyMappings == nil { + if o == nil || IsNil(o.PropertyMappings) { var ret []string return ret } @@ -173,7 +176,7 @@ func (o *PatchedLDAPProviderRequest) GetPropertyMappings() []string { // GetPropertyMappingsOk returns a tuple with the PropertyMappings field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedLDAPProviderRequest) GetPropertyMappingsOk() ([]string, bool) { - if o == nil || o.PropertyMappings == nil { + if o == nil || IsNil(o.PropertyMappings) { return nil, false } return o.PropertyMappings, true @@ -181,7 +184,7 @@ func (o *PatchedLDAPProviderRequest) GetPropertyMappingsOk() ([]string, bool) { // HasPropertyMappings returns a boolean if a field has been set. func (o *PatchedLDAPProviderRequest) HasPropertyMappings() bool { - if o != nil && o.PropertyMappings != nil { + if o != nil && !IsNil(o.PropertyMappings) { return true } @@ -195,7 +198,7 @@ func (o *PatchedLDAPProviderRequest) SetPropertyMappings(v []string) { // GetBaseDn returns the BaseDn field value if set, zero value otherwise. func (o *PatchedLDAPProviderRequest) GetBaseDn() string { - if o == nil || o.BaseDn == nil { + if o == nil || IsNil(o.BaseDn) { var ret string return ret } @@ -205,7 +208,7 @@ func (o *PatchedLDAPProviderRequest) GetBaseDn() string { // GetBaseDnOk returns a tuple with the BaseDn field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedLDAPProviderRequest) GetBaseDnOk() (*string, bool) { - if o == nil || o.BaseDn == nil { + if o == nil || IsNil(o.BaseDn) { return nil, false } return o.BaseDn, true @@ -213,7 +216,7 @@ func (o *PatchedLDAPProviderRequest) GetBaseDnOk() (*string, bool) { // HasBaseDn returns a boolean if a field has been set. func (o *PatchedLDAPProviderRequest) HasBaseDn() bool { - if o != nil && o.BaseDn != nil { + if o != nil && !IsNil(o.BaseDn) { return true } @@ -227,7 +230,7 @@ func (o *PatchedLDAPProviderRequest) SetBaseDn(v string) { // GetSearchGroup returns the SearchGroup field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedLDAPProviderRequest) GetSearchGroup() string { - if o == nil || o.SearchGroup.Get() == nil { + if o == nil || IsNil(o.SearchGroup.Get()) { var ret string return ret } @@ -270,7 +273,7 @@ func (o *PatchedLDAPProviderRequest) UnsetSearchGroup() { // GetCertificate returns the Certificate field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedLDAPProviderRequest) GetCertificate() string { - if o == nil || o.Certificate.Get() == nil { + if o == nil || IsNil(o.Certificate.Get()) { var ret string return ret } @@ -313,7 +316,7 @@ func (o *PatchedLDAPProviderRequest) UnsetCertificate() { // GetTlsServerName returns the TlsServerName field value if set, zero value otherwise. func (o *PatchedLDAPProviderRequest) GetTlsServerName() string { - if o == nil || o.TlsServerName == nil { + if o == nil || IsNil(o.TlsServerName) { var ret string return ret } @@ -323,7 +326,7 @@ func (o *PatchedLDAPProviderRequest) GetTlsServerName() string { // GetTlsServerNameOk returns a tuple with the TlsServerName field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedLDAPProviderRequest) GetTlsServerNameOk() (*string, bool) { - if o == nil || o.TlsServerName == nil { + if o == nil || IsNil(o.TlsServerName) { return nil, false } return o.TlsServerName, true @@ -331,7 +334,7 @@ func (o *PatchedLDAPProviderRequest) GetTlsServerNameOk() (*string, bool) { // HasTlsServerName returns a boolean if a field has been set. func (o *PatchedLDAPProviderRequest) HasTlsServerName() bool { - if o != nil && o.TlsServerName != nil { + if o != nil && !IsNil(o.TlsServerName) { return true } @@ -345,7 +348,7 @@ func (o *PatchedLDAPProviderRequest) SetTlsServerName(v string) { // GetUidStartNumber returns the UidStartNumber field value if set, zero value otherwise. func (o *PatchedLDAPProviderRequest) GetUidStartNumber() int32 { - if o == nil || o.UidStartNumber == nil { + if o == nil || IsNil(o.UidStartNumber) { var ret int32 return ret } @@ -355,7 +358,7 @@ func (o *PatchedLDAPProviderRequest) GetUidStartNumber() int32 { // GetUidStartNumberOk returns a tuple with the UidStartNumber field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedLDAPProviderRequest) GetUidStartNumberOk() (*int32, bool) { - if o == nil || o.UidStartNumber == nil { + if o == nil || IsNil(o.UidStartNumber) { return nil, false } return o.UidStartNumber, true @@ -363,7 +366,7 @@ func (o *PatchedLDAPProviderRequest) GetUidStartNumberOk() (*int32, bool) { // HasUidStartNumber returns a boolean if a field has been set. func (o *PatchedLDAPProviderRequest) HasUidStartNumber() bool { - if o != nil && o.UidStartNumber != nil { + if o != nil && !IsNil(o.UidStartNumber) { return true } @@ -377,7 +380,7 @@ func (o *PatchedLDAPProviderRequest) SetUidStartNumber(v int32) { // GetGidStartNumber returns the GidStartNumber field value if set, zero value otherwise. func (o *PatchedLDAPProviderRequest) GetGidStartNumber() int32 { - if o == nil || o.GidStartNumber == nil { + if o == nil || IsNil(o.GidStartNumber) { var ret int32 return ret } @@ -387,7 +390,7 @@ func (o *PatchedLDAPProviderRequest) GetGidStartNumber() int32 { // GetGidStartNumberOk returns a tuple with the GidStartNumber field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedLDAPProviderRequest) GetGidStartNumberOk() (*int32, bool) { - if o == nil || o.GidStartNumber == nil { + if o == nil || IsNil(o.GidStartNumber) { return nil, false } return o.GidStartNumber, true @@ -395,7 +398,7 @@ func (o *PatchedLDAPProviderRequest) GetGidStartNumberOk() (*int32, bool) { // HasGidStartNumber returns a boolean if a field has been set. func (o *PatchedLDAPProviderRequest) HasGidStartNumber() bool { - if o != nil && o.GidStartNumber != nil { + if o != nil && !IsNil(o.GidStartNumber) { return true } @@ -409,7 +412,7 @@ func (o *PatchedLDAPProviderRequest) SetGidStartNumber(v int32) { // GetSearchMode returns the SearchMode field value if set, zero value otherwise. func (o *PatchedLDAPProviderRequest) GetSearchMode() LDAPAPIAccessMode { - if o == nil || o.SearchMode == nil { + if o == nil || IsNil(o.SearchMode) { var ret LDAPAPIAccessMode return ret } @@ -419,7 +422,7 @@ func (o *PatchedLDAPProviderRequest) GetSearchMode() LDAPAPIAccessMode { // GetSearchModeOk returns a tuple with the SearchMode field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedLDAPProviderRequest) GetSearchModeOk() (*LDAPAPIAccessMode, bool) { - if o == nil || o.SearchMode == nil { + if o == nil || IsNil(o.SearchMode) { return nil, false } return o.SearchMode, true @@ -427,7 +430,7 @@ func (o *PatchedLDAPProviderRequest) GetSearchModeOk() (*LDAPAPIAccessMode, bool // HasSearchMode returns a boolean if a field has been set. func (o *PatchedLDAPProviderRequest) HasSearchMode() bool { - if o != nil && o.SearchMode != nil { + if o != nil && !IsNil(o.SearchMode) { return true } @@ -441,7 +444,7 @@ func (o *PatchedLDAPProviderRequest) SetSearchMode(v LDAPAPIAccessMode) { // GetBindMode returns the BindMode field value if set, zero value otherwise. func (o *PatchedLDAPProviderRequest) GetBindMode() LDAPAPIAccessMode { - if o == nil || o.BindMode == nil { + if o == nil || IsNil(o.BindMode) { var ret LDAPAPIAccessMode return ret } @@ -451,7 +454,7 @@ func (o *PatchedLDAPProviderRequest) GetBindMode() LDAPAPIAccessMode { // GetBindModeOk returns a tuple with the BindMode field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedLDAPProviderRequest) GetBindModeOk() (*LDAPAPIAccessMode, bool) { - if o == nil || o.BindMode == nil { + if o == nil || IsNil(o.BindMode) { return nil, false } return o.BindMode, true @@ -459,7 +462,7 @@ func (o *PatchedLDAPProviderRequest) GetBindModeOk() (*LDAPAPIAccessMode, bool) // HasBindMode returns a boolean if a field has been set. func (o *PatchedLDAPProviderRequest) HasBindMode() bool { - if o != nil && o.BindMode != nil { + if o != nil && !IsNil(o.BindMode) { return true } @@ -472,20 +475,28 @@ func (o *PatchedLDAPProviderRequest) SetBindMode(v LDAPAPIAccessMode) { } func (o PatchedLDAPProviderRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedLDAPProviderRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } if o.AuthenticationFlow.IsSet() { toSerialize["authentication_flow"] = o.AuthenticationFlow.Get() } - if o.AuthorizationFlow != nil { + if !IsNil(o.AuthorizationFlow) { toSerialize["authorization_flow"] = o.AuthorizationFlow } - if o.PropertyMappings != nil { + if !IsNil(o.PropertyMappings) { toSerialize["property_mappings"] = o.PropertyMappings } - if o.BaseDn != nil { + if !IsNil(o.BaseDn) { toSerialize["base_dn"] = o.BaseDn } if o.SearchGroup.IsSet() { @@ -494,22 +505,22 @@ func (o PatchedLDAPProviderRequest) MarshalJSON() ([]byte, error) { if o.Certificate.IsSet() { toSerialize["certificate"] = o.Certificate.Get() } - if o.TlsServerName != nil { + if !IsNil(o.TlsServerName) { toSerialize["tls_server_name"] = o.TlsServerName } - if o.UidStartNumber != nil { + if !IsNil(o.UidStartNumber) { toSerialize["uid_start_number"] = o.UidStartNumber } - if o.GidStartNumber != nil { + if !IsNil(o.GidStartNumber) { toSerialize["gid_start_number"] = o.GidStartNumber } - if o.SearchMode != nil { + if !IsNil(o.SearchMode) { toSerialize["search_mode"] = o.SearchMode } - if o.BindMode != nil { + if !IsNil(o.BindMode) { toSerialize["bind_mode"] = o.BindMode } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedLDAPProviderRequest struct { diff --git a/model_patched_ldap_source_request.go b/model_patched_ldap_source_request.go index 311bf3083..e7a9f2f1a 100644 --- a/model_patched_ldap_source_request.go +++ b/model_patched_ldap_source_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedLDAPSourceRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedLDAPSourceRequest{} + // PatchedLDAPSourceRequest LDAP Source Serializer type PatchedLDAPSourceRequest struct { // Source's display Name. @@ -25,12 +28,11 @@ type PatchedLDAPSourceRequest struct { // Flow to use when authenticating existing users. AuthenticationFlow NullableString `json:"authentication_flow,omitempty"` // Flow to use when enrolling new users. - EnrollmentFlow NullableString `json:"enrollment_flow,omitempty"` - PolicyEngineMode *PolicyEngineMode `json:"policy_engine_mode,omitempty"` - // How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. - UserMatchingMode NullableUserMatchingModeEnum `json:"user_matching_mode,omitempty"` - UserPathTemplate *string `json:"user_path_template,omitempty"` - ServerUri *string `json:"server_uri,omitempty"` + EnrollmentFlow NullableString `json:"enrollment_flow,omitempty"` + PolicyEngineMode *PolicyEngineMode `json:"policy_engine_mode,omitempty"` + UserMatchingMode *UserMatchingModeEnum `json:"user_matching_mode,omitempty"` + UserPathTemplate *string `json:"user_path_template,omitempty"` + ServerUri *string `json:"server_uri,omitempty"` // Optionally verify the LDAP Server's Certificate against the CA Chain in this keypair. PeerCertificate NullableString `json:"peer_certificate,omitempty"` BindCn *string `json:"bind_cn,omitempty"` @@ -78,7 +80,7 @@ func NewPatchedLDAPSourceRequestWithDefaults() *PatchedLDAPSourceRequest { // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedLDAPSourceRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -88,7 +90,7 @@ func (o *PatchedLDAPSourceRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedLDAPSourceRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -96,7 +98,7 @@ func (o *PatchedLDAPSourceRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedLDAPSourceRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -110,7 +112,7 @@ func (o *PatchedLDAPSourceRequest) SetName(v string) { // GetSlug returns the Slug field value if set, zero value otherwise. func (o *PatchedLDAPSourceRequest) GetSlug() string { - if o == nil || o.Slug == nil { + if o == nil || IsNil(o.Slug) { var ret string return ret } @@ -120,7 +122,7 @@ func (o *PatchedLDAPSourceRequest) GetSlug() string { // GetSlugOk returns a tuple with the Slug field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedLDAPSourceRequest) GetSlugOk() (*string, bool) { - if o == nil || o.Slug == nil { + if o == nil || IsNil(o.Slug) { return nil, false } return o.Slug, true @@ -128,7 +130,7 @@ func (o *PatchedLDAPSourceRequest) GetSlugOk() (*string, bool) { // HasSlug returns a boolean if a field has been set. func (o *PatchedLDAPSourceRequest) HasSlug() bool { - if o != nil && o.Slug != nil { + if o != nil && !IsNil(o.Slug) { return true } @@ -142,7 +144,7 @@ func (o *PatchedLDAPSourceRequest) SetSlug(v string) { // GetEnabled returns the Enabled field value if set, zero value otherwise. func (o *PatchedLDAPSourceRequest) GetEnabled() bool { - if o == nil || o.Enabled == nil { + if o == nil || IsNil(o.Enabled) { var ret bool return ret } @@ -152,7 +154,7 @@ func (o *PatchedLDAPSourceRequest) GetEnabled() bool { // GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedLDAPSourceRequest) GetEnabledOk() (*bool, bool) { - if o == nil || o.Enabled == nil { + if o == nil || IsNil(o.Enabled) { return nil, false } return o.Enabled, true @@ -160,7 +162,7 @@ func (o *PatchedLDAPSourceRequest) GetEnabledOk() (*bool, bool) { // HasEnabled returns a boolean if a field has been set. func (o *PatchedLDAPSourceRequest) HasEnabled() bool { - if o != nil && o.Enabled != nil { + if o != nil && !IsNil(o.Enabled) { return true } @@ -174,7 +176,7 @@ func (o *PatchedLDAPSourceRequest) SetEnabled(v bool) { // GetAuthenticationFlow returns the AuthenticationFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedLDAPSourceRequest) GetAuthenticationFlow() string { - if o == nil || o.AuthenticationFlow.Get() == nil { + if o == nil || IsNil(o.AuthenticationFlow.Get()) { var ret string return ret } @@ -217,7 +219,7 @@ func (o *PatchedLDAPSourceRequest) UnsetAuthenticationFlow() { // GetEnrollmentFlow returns the EnrollmentFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedLDAPSourceRequest) GetEnrollmentFlow() string { - if o == nil || o.EnrollmentFlow.Get() == nil { + if o == nil || IsNil(o.EnrollmentFlow.Get()) { var ret string return ret } @@ -260,7 +262,7 @@ func (o *PatchedLDAPSourceRequest) UnsetEnrollmentFlow() { // GetPolicyEngineMode returns the PolicyEngineMode field value if set, zero value otherwise. func (o *PatchedLDAPSourceRequest) GetPolicyEngineMode() PolicyEngineMode { - if o == nil || o.PolicyEngineMode == nil { + if o == nil || IsNil(o.PolicyEngineMode) { var ret PolicyEngineMode return ret } @@ -270,7 +272,7 @@ func (o *PatchedLDAPSourceRequest) GetPolicyEngineMode() PolicyEngineMode { // GetPolicyEngineModeOk returns a tuple with the PolicyEngineMode field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedLDAPSourceRequest) GetPolicyEngineModeOk() (*PolicyEngineMode, bool) { - if o == nil || o.PolicyEngineMode == nil { + if o == nil || IsNil(o.PolicyEngineMode) { return nil, false } return o.PolicyEngineMode, true @@ -278,7 +280,7 @@ func (o *PatchedLDAPSourceRequest) GetPolicyEngineModeOk() (*PolicyEngineMode, b // HasPolicyEngineMode returns a boolean if a field has been set. func (o *PatchedLDAPSourceRequest) HasPolicyEngineMode() bool { - if o != nil && o.PolicyEngineMode != nil { + if o != nil && !IsNil(o.PolicyEngineMode) { return true } @@ -290,52 +292,41 @@ func (o *PatchedLDAPSourceRequest) SetPolicyEngineMode(v PolicyEngineMode) { o.PolicyEngineMode = &v } -// GetUserMatchingMode returns the UserMatchingMode field value if set, zero value otherwise (both if not set or set to explicit null). +// GetUserMatchingMode returns the UserMatchingMode field value if set, zero value otherwise. func (o *PatchedLDAPSourceRequest) GetUserMatchingMode() UserMatchingModeEnum { - if o == nil || o.UserMatchingMode.Get() == nil { + if o == nil || IsNil(o.UserMatchingMode) { var ret UserMatchingModeEnum return ret } - return *o.UserMatchingMode.Get() + return *o.UserMatchingMode } // GetUserMatchingModeOk returns a tuple with the UserMatchingMode field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PatchedLDAPSourceRequest) GetUserMatchingModeOk() (*UserMatchingModeEnum, bool) { - if o == nil { + if o == nil || IsNil(o.UserMatchingMode) { return nil, false } - return o.UserMatchingMode.Get(), o.UserMatchingMode.IsSet() + return o.UserMatchingMode, true } // HasUserMatchingMode returns a boolean if a field has been set. func (o *PatchedLDAPSourceRequest) HasUserMatchingMode() bool { - if o != nil && o.UserMatchingMode.IsSet() { + if o != nil && !IsNil(o.UserMatchingMode) { return true } return false } -// SetUserMatchingMode gets a reference to the given NullableUserMatchingModeEnum and assigns it to the UserMatchingMode field. +// SetUserMatchingMode gets a reference to the given UserMatchingModeEnum and assigns it to the UserMatchingMode field. func (o *PatchedLDAPSourceRequest) SetUserMatchingMode(v UserMatchingModeEnum) { - o.UserMatchingMode.Set(&v) -} - -// SetUserMatchingModeNil sets the value for UserMatchingMode to be an explicit nil -func (o *PatchedLDAPSourceRequest) SetUserMatchingModeNil() { - o.UserMatchingMode.Set(nil) -} - -// UnsetUserMatchingMode ensures that no value is present for UserMatchingMode, not even an explicit nil -func (o *PatchedLDAPSourceRequest) UnsetUserMatchingMode() { - o.UserMatchingMode.Unset() + o.UserMatchingMode = &v } // GetUserPathTemplate returns the UserPathTemplate field value if set, zero value otherwise. func (o *PatchedLDAPSourceRequest) GetUserPathTemplate() string { - if o == nil || o.UserPathTemplate == nil { + if o == nil || IsNil(o.UserPathTemplate) { var ret string return ret } @@ -345,7 +336,7 @@ func (o *PatchedLDAPSourceRequest) GetUserPathTemplate() string { // GetUserPathTemplateOk returns a tuple with the UserPathTemplate field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedLDAPSourceRequest) GetUserPathTemplateOk() (*string, bool) { - if o == nil || o.UserPathTemplate == nil { + if o == nil || IsNil(o.UserPathTemplate) { return nil, false } return o.UserPathTemplate, true @@ -353,7 +344,7 @@ func (o *PatchedLDAPSourceRequest) GetUserPathTemplateOk() (*string, bool) { // HasUserPathTemplate returns a boolean if a field has been set. func (o *PatchedLDAPSourceRequest) HasUserPathTemplate() bool { - if o != nil && o.UserPathTemplate != nil { + if o != nil && !IsNil(o.UserPathTemplate) { return true } @@ -367,7 +358,7 @@ func (o *PatchedLDAPSourceRequest) SetUserPathTemplate(v string) { // GetServerUri returns the ServerUri field value if set, zero value otherwise. func (o *PatchedLDAPSourceRequest) GetServerUri() string { - if o == nil || o.ServerUri == nil { + if o == nil || IsNil(o.ServerUri) { var ret string return ret } @@ -377,7 +368,7 @@ func (o *PatchedLDAPSourceRequest) GetServerUri() string { // GetServerUriOk returns a tuple with the ServerUri field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedLDAPSourceRequest) GetServerUriOk() (*string, bool) { - if o == nil || o.ServerUri == nil { + if o == nil || IsNil(o.ServerUri) { return nil, false } return o.ServerUri, true @@ -385,7 +376,7 @@ func (o *PatchedLDAPSourceRequest) GetServerUriOk() (*string, bool) { // HasServerUri returns a boolean if a field has been set. func (o *PatchedLDAPSourceRequest) HasServerUri() bool { - if o != nil && o.ServerUri != nil { + if o != nil && !IsNil(o.ServerUri) { return true } @@ -399,7 +390,7 @@ func (o *PatchedLDAPSourceRequest) SetServerUri(v string) { // GetPeerCertificate returns the PeerCertificate field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedLDAPSourceRequest) GetPeerCertificate() string { - if o == nil || o.PeerCertificate.Get() == nil { + if o == nil || IsNil(o.PeerCertificate.Get()) { var ret string return ret } @@ -442,7 +433,7 @@ func (o *PatchedLDAPSourceRequest) UnsetPeerCertificate() { // GetBindCn returns the BindCn field value if set, zero value otherwise. func (o *PatchedLDAPSourceRequest) GetBindCn() string { - if o == nil || o.BindCn == nil { + if o == nil || IsNil(o.BindCn) { var ret string return ret } @@ -452,7 +443,7 @@ func (o *PatchedLDAPSourceRequest) GetBindCn() string { // GetBindCnOk returns a tuple with the BindCn field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedLDAPSourceRequest) GetBindCnOk() (*string, bool) { - if o == nil || o.BindCn == nil { + if o == nil || IsNil(o.BindCn) { return nil, false } return o.BindCn, true @@ -460,7 +451,7 @@ func (o *PatchedLDAPSourceRequest) GetBindCnOk() (*string, bool) { // HasBindCn returns a boolean if a field has been set. func (o *PatchedLDAPSourceRequest) HasBindCn() bool { - if o != nil && o.BindCn != nil { + if o != nil && !IsNil(o.BindCn) { return true } @@ -474,7 +465,7 @@ func (o *PatchedLDAPSourceRequest) SetBindCn(v string) { // GetBindPassword returns the BindPassword field value if set, zero value otherwise. func (o *PatchedLDAPSourceRequest) GetBindPassword() string { - if o == nil || o.BindPassword == nil { + if o == nil || IsNil(o.BindPassword) { var ret string return ret } @@ -484,7 +475,7 @@ func (o *PatchedLDAPSourceRequest) GetBindPassword() string { // GetBindPasswordOk returns a tuple with the BindPassword field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedLDAPSourceRequest) GetBindPasswordOk() (*string, bool) { - if o == nil || o.BindPassword == nil { + if o == nil || IsNil(o.BindPassword) { return nil, false } return o.BindPassword, true @@ -492,7 +483,7 @@ func (o *PatchedLDAPSourceRequest) GetBindPasswordOk() (*string, bool) { // HasBindPassword returns a boolean if a field has been set. func (o *PatchedLDAPSourceRequest) HasBindPassword() bool { - if o != nil && o.BindPassword != nil { + if o != nil && !IsNil(o.BindPassword) { return true } @@ -506,7 +497,7 @@ func (o *PatchedLDAPSourceRequest) SetBindPassword(v string) { // GetStartTls returns the StartTls field value if set, zero value otherwise. func (o *PatchedLDAPSourceRequest) GetStartTls() bool { - if o == nil || o.StartTls == nil { + if o == nil || IsNil(o.StartTls) { var ret bool return ret } @@ -516,7 +507,7 @@ func (o *PatchedLDAPSourceRequest) GetStartTls() bool { // GetStartTlsOk returns a tuple with the StartTls field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedLDAPSourceRequest) GetStartTlsOk() (*bool, bool) { - if o == nil || o.StartTls == nil { + if o == nil || IsNil(o.StartTls) { return nil, false } return o.StartTls, true @@ -524,7 +515,7 @@ func (o *PatchedLDAPSourceRequest) GetStartTlsOk() (*bool, bool) { // HasStartTls returns a boolean if a field has been set. func (o *PatchedLDAPSourceRequest) HasStartTls() bool { - if o != nil && o.StartTls != nil { + if o != nil && !IsNil(o.StartTls) { return true } @@ -538,7 +529,7 @@ func (o *PatchedLDAPSourceRequest) SetStartTls(v bool) { // GetBaseDn returns the BaseDn field value if set, zero value otherwise. func (o *PatchedLDAPSourceRequest) GetBaseDn() string { - if o == nil || o.BaseDn == nil { + if o == nil || IsNil(o.BaseDn) { var ret string return ret } @@ -548,7 +539,7 @@ func (o *PatchedLDAPSourceRequest) GetBaseDn() string { // GetBaseDnOk returns a tuple with the BaseDn field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedLDAPSourceRequest) GetBaseDnOk() (*string, bool) { - if o == nil || o.BaseDn == nil { + if o == nil || IsNil(o.BaseDn) { return nil, false } return o.BaseDn, true @@ -556,7 +547,7 @@ func (o *PatchedLDAPSourceRequest) GetBaseDnOk() (*string, bool) { // HasBaseDn returns a boolean if a field has been set. func (o *PatchedLDAPSourceRequest) HasBaseDn() bool { - if o != nil && o.BaseDn != nil { + if o != nil && !IsNil(o.BaseDn) { return true } @@ -570,7 +561,7 @@ func (o *PatchedLDAPSourceRequest) SetBaseDn(v string) { // GetAdditionalUserDn returns the AdditionalUserDn field value if set, zero value otherwise. func (o *PatchedLDAPSourceRequest) GetAdditionalUserDn() string { - if o == nil || o.AdditionalUserDn == nil { + if o == nil || IsNil(o.AdditionalUserDn) { var ret string return ret } @@ -580,7 +571,7 @@ func (o *PatchedLDAPSourceRequest) GetAdditionalUserDn() string { // GetAdditionalUserDnOk returns a tuple with the AdditionalUserDn field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedLDAPSourceRequest) GetAdditionalUserDnOk() (*string, bool) { - if o == nil || o.AdditionalUserDn == nil { + if o == nil || IsNil(o.AdditionalUserDn) { return nil, false } return o.AdditionalUserDn, true @@ -588,7 +579,7 @@ func (o *PatchedLDAPSourceRequest) GetAdditionalUserDnOk() (*string, bool) { // HasAdditionalUserDn returns a boolean if a field has been set. func (o *PatchedLDAPSourceRequest) HasAdditionalUserDn() bool { - if o != nil && o.AdditionalUserDn != nil { + if o != nil && !IsNil(o.AdditionalUserDn) { return true } @@ -602,7 +593,7 @@ func (o *PatchedLDAPSourceRequest) SetAdditionalUserDn(v string) { // GetAdditionalGroupDn returns the AdditionalGroupDn field value if set, zero value otherwise. func (o *PatchedLDAPSourceRequest) GetAdditionalGroupDn() string { - if o == nil || o.AdditionalGroupDn == nil { + if o == nil || IsNil(o.AdditionalGroupDn) { var ret string return ret } @@ -612,7 +603,7 @@ func (o *PatchedLDAPSourceRequest) GetAdditionalGroupDn() string { // GetAdditionalGroupDnOk returns a tuple with the AdditionalGroupDn field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedLDAPSourceRequest) GetAdditionalGroupDnOk() (*string, bool) { - if o == nil || o.AdditionalGroupDn == nil { + if o == nil || IsNil(o.AdditionalGroupDn) { return nil, false } return o.AdditionalGroupDn, true @@ -620,7 +611,7 @@ func (o *PatchedLDAPSourceRequest) GetAdditionalGroupDnOk() (*string, bool) { // HasAdditionalGroupDn returns a boolean if a field has been set. func (o *PatchedLDAPSourceRequest) HasAdditionalGroupDn() bool { - if o != nil && o.AdditionalGroupDn != nil { + if o != nil && !IsNil(o.AdditionalGroupDn) { return true } @@ -634,7 +625,7 @@ func (o *PatchedLDAPSourceRequest) SetAdditionalGroupDn(v string) { // GetUserObjectFilter returns the UserObjectFilter field value if set, zero value otherwise. func (o *PatchedLDAPSourceRequest) GetUserObjectFilter() string { - if o == nil || o.UserObjectFilter == nil { + if o == nil || IsNil(o.UserObjectFilter) { var ret string return ret } @@ -644,7 +635,7 @@ func (o *PatchedLDAPSourceRequest) GetUserObjectFilter() string { // GetUserObjectFilterOk returns a tuple with the UserObjectFilter field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedLDAPSourceRequest) GetUserObjectFilterOk() (*string, bool) { - if o == nil || o.UserObjectFilter == nil { + if o == nil || IsNil(o.UserObjectFilter) { return nil, false } return o.UserObjectFilter, true @@ -652,7 +643,7 @@ func (o *PatchedLDAPSourceRequest) GetUserObjectFilterOk() (*string, bool) { // HasUserObjectFilter returns a boolean if a field has been set. func (o *PatchedLDAPSourceRequest) HasUserObjectFilter() bool { - if o != nil && o.UserObjectFilter != nil { + if o != nil && !IsNil(o.UserObjectFilter) { return true } @@ -666,7 +657,7 @@ func (o *PatchedLDAPSourceRequest) SetUserObjectFilter(v string) { // GetGroupObjectFilter returns the GroupObjectFilter field value if set, zero value otherwise. func (o *PatchedLDAPSourceRequest) GetGroupObjectFilter() string { - if o == nil || o.GroupObjectFilter == nil { + if o == nil || IsNil(o.GroupObjectFilter) { var ret string return ret } @@ -676,7 +667,7 @@ func (o *PatchedLDAPSourceRequest) GetGroupObjectFilter() string { // GetGroupObjectFilterOk returns a tuple with the GroupObjectFilter field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedLDAPSourceRequest) GetGroupObjectFilterOk() (*string, bool) { - if o == nil || o.GroupObjectFilter == nil { + if o == nil || IsNil(o.GroupObjectFilter) { return nil, false } return o.GroupObjectFilter, true @@ -684,7 +675,7 @@ func (o *PatchedLDAPSourceRequest) GetGroupObjectFilterOk() (*string, bool) { // HasGroupObjectFilter returns a boolean if a field has been set. func (o *PatchedLDAPSourceRequest) HasGroupObjectFilter() bool { - if o != nil && o.GroupObjectFilter != nil { + if o != nil && !IsNil(o.GroupObjectFilter) { return true } @@ -698,7 +689,7 @@ func (o *PatchedLDAPSourceRequest) SetGroupObjectFilter(v string) { // GetGroupMembershipField returns the GroupMembershipField field value if set, zero value otherwise. func (o *PatchedLDAPSourceRequest) GetGroupMembershipField() string { - if o == nil || o.GroupMembershipField == nil { + if o == nil || IsNil(o.GroupMembershipField) { var ret string return ret } @@ -708,7 +699,7 @@ func (o *PatchedLDAPSourceRequest) GetGroupMembershipField() string { // GetGroupMembershipFieldOk returns a tuple with the GroupMembershipField field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedLDAPSourceRequest) GetGroupMembershipFieldOk() (*string, bool) { - if o == nil || o.GroupMembershipField == nil { + if o == nil || IsNil(o.GroupMembershipField) { return nil, false } return o.GroupMembershipField, true @@ -716,7 +707,7 @@ func (o *PatchedLDAPSourceRequest) GetGroupMembershipFieldOk() (*string, bool) { // HasGroupMembershipField returns a boolean if a field has been set. func (o *PatchedLDAPSourceRequest) HasGroupMembershipField() bool { - if o != nil && o.GroupMembershipField != nil { + if o != nil && !IsNil(o.GroupMembershipField) { return true } @@ -730,7 +721,7 @@ func (o *PatchedLDAPSourceRequest) SetGroupMembershipField(v string) { // GetObjectUniquenessField returns the ObjectUniquenessField field value if set, zero value otherwise. func (o *PatchedLDAPSourceRequest) GetObjectUniquenessField() string { - if o == nil || o.ObjectUniquenessField == nil { + if o == nil || IsNil(o.ObjectUniquenessField) { var ret string return ret } @@ -740,7 +731,7 @@ func (o *PatchedLDAPSourceRequest) GetObjectUniquenessField() string { // GetObjectUniquenessFieldOk returns a tuple with the ObjectUniquenessField field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedLDAPSourceRequest) GetObjectUniquenessFieldOk() (*string, bool) { - if o == nil || o.ObjectUniquenessField == nil { + if o == nil || IsNil(o.ObjectUniquenessField) { return nil, false } return o.ObjectUniquenessField, true @@ -748,7 +739,7 @@ func (o *PatchedLDAPSourceRequest) GetObjectUniquenessFieldOk() (*string, bool) // HasObjectUniquenessField returns a boolean if a field has been set. func (o *PatchedLDAPSourceRequest) HasObjectUniquenessField() bool { - if o != nil && o.ObjectUniquenessField != nil { + if o != nil && !IsNil(o.ObjectUniquenessField) { return true } @@ -762,7 +753,7 @@ func (o *PatchedLDAPSourceRequest) SetObjectUniquenessField(v string) { // GetSyncUsers returns the SyncUsers field value if set, zero value otherwise. func (o *PatchedLDAPSourceRequest) GetSyncUsers() bool { - if o == nil || o.SyncUsers == nil { + if o == nil || IsNil(o.SyncUsers) { var ret bool return ret } @@ -772,7 +763,7 @@ func (o *PatchedLDAPSourceRequest) GetSyncUsers() bool { // GetSyncUsersOk returns a tuple with the SyncUsers field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedLDAPSourceRequest) GetSyncUsersOk() (*bool, bool) { - if o == nil || o.SyncUsers == nil { + if o == nil || IsNil(o.SyncUsers) { return nil, false } return o.SyncUsers, true @@ -780,7 +771,7 @@ func (o *PatchedLDAPSourceRequest) GetSyncUsersOk() (*bool, bool) { // HasSyncUsers returns a boolean if a field has been set. func (o *PatchedLDAPSourceRequest) HasSyncUsers() bool { - if o != nil && o.SyncUsers != nil { + if o != nil && !IsNil(o.SyncUsers) { return true } @@ -794,7 +785,7 @@ func (o *PatchedLDAPSourceRequest) SetSyncUsers(v bool) { // GetSyncUsersPassword returns the SyncUsersPassword field value if set, zero value otherwise. func (o *PatchedLDAPSourceRequest) GetSyncUsersPassword() bool { - if o == nil || o.SyncUsersPassword == nil { + if o == nil || IsNil(o.SyncUsersPassword) { var ret bool return ret } @@ -804,7 +795,7 @@ func (o *PatchedLDAPSourceRequest) GetSyncUsersPassword() bool { // GetSyncUsersPasswordOk returns a tuple with the SyncUsersPassword field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedLDAPSourceRequest) GetSyncUsersPasswordOk() (*bool, bool) { - if o == nil || o.SyncUsersPassword == nil { + if o == nil || IsNil(o.SyncUsersPassword) { return nil, false } return o.SyncUsersPassword, true @@ -812,7 +803,7 @@ func (o *PatchedLDAPSourceRequest) GetSyncUsersPasswordOk() (*bool, bool) { // HasSyncUsersPassword returns a boolean if a field has been set. func (o *PatchedLDAPSourceRequest) HasSyncUsersPassword() bool { - if o != nil && o.SyncUsersPassword != nil { + if o != nil && !IsNil(o.SyncUsersPassword) { return true } @@ -826,7 +817,7 @@ func (o *PatchedLDAPSourceRequest) SetSyncUsersPassword(v bool) { // GetSyncGroups returns the SyncGroups field value if set, zero value otherwise. func (o *PatchedLDAPSourceRequest) GetSyncGroups() bool { - if o == nil || o.SyncGroups == nil { + if o == nil || IsNil(o.SyncGroups) { var ret bool return ret } @@ -836,7 +827,7 @@ func (o *PatchedLDAPSourceRequest) GetSyncGroups() bool { // GetSyncGroupsOk returns a tuple with the SyncGroups field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedLDAPSourceRequest) GetSyncGroupsOk() (*bool, bool) { - if o == nil || o.SyncGroups == nil { + if o == nil || IsNil(o.SyncGroups) { return nil, false } return o.SyncGroups, true @@ -844,7 +835,7 @@ func (o *PatchedLDAPSourceRequest) GetSyncGroupsOk() (*bool, bool) { // HasSyncGroups returns a boolean if a field has been set. func (o *PatchedLDAPSourceRequest) HasSyncGroups() bool { - if o != nil && o.SyncGroups != nil { + if o != nil && !IsNil(o.SyncGroups) { return true } @@ -858,7 +849,7 @@ func (o *PatchedLDAPSourceRequest) SetSyncGroups(v bool) { // GetSyncParentGroup returns the SyncParentGroup field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedLDAPSourceRequest) GetSyncParentGroup() string { - if o == nil || o.SyncParentGroup.Get() == nil { + if o == nil || IsNil(o.SyncParentGroup.Get()) { var ret string return ret } @@ -901,7 +892,7 @@ func (o *PatchedLDAPSourceRequest) UnsetSyncParentGroup() { // GetPropertyMappings returns the PropertyMappings field value if set, zero value otherwise. func (o *PatchedLDAPSourceRequest) GetPropertyMappings() []string { - if o == nil || o.PropertyMappings == nil { + if o == nil || IsNil(o.PropertyMappings) { var ret []string return ret } @@ -911,7 +902,7 @@ func (o *PatchedLDAPSourceRequest) GetPropertyMappings() []string { // GetPropertyMappingsOk returns a tuple with the PropertyMappings field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedLDAPSourceRequest) GetPropertyMappingsOk() ([]string, bool) { - if o == nil || o.PropertyMappings == nil { + if o == nil || IsNil(o.PropertyMappings) { return nil, false } return o.PropertyMappings, true @@ -919,7 +910,7 @@ func (o *PatchedLDAPSourceRequest) GetPropertyMappingsOk() ([]string, bool) { // HasPropertyMappings returns a boolean if a field has been set. func (o *PatchedLDAPSourceRequest) HasPropertyMappings() bool { - if o != nil && o.PropertyMappings != nil { + if o != nil && !IsNil(o.PropertyMappings) { return true } @@ -933,7 +924,7 @@ func (o *PatchedLDAPSourceRequest) SetPropertyMappings(v []string) { // GetPropertyMappingsGroup returns the PropertyMappingsGroup field value if set, zero value otherwise. func (o *PatchedLDAPSourceRequest) GetPropertyMappingsGroup() []string { - if o == nil || o.PropertyMappingsGroup == nil { + if o == nil || IsNil(o.PropertyMappingsGroup) { var ret []string return ret } @@ -943,7 +934,7 @@ func (o *PatchedLDAPSourceRequest) GetPropertyMappingsGroup() []string { // GetPropertyMappingsGroupOk returns a tuple with the PropertyMappingsGroup field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedLDAPSourceRequest) GetPropertyMappingsGroupOk() ([]string, bool) { - if o == nil || o.PropertyMappingsGroup == nil { + if o == nil || IsNil(o.PropertyMappingsGroup) { return nil, false } return o.PropertyMappingsGroup, true @@ -951,7 +942,7 @@ func (o *PatchedLDAPSourceRequest) GetPropertyMappingsGroupOk() ([]string, bool) // HasPropertyMappingsGroup returns a boolean if a field has been set. func (o *PatchedLDAPSourceRequest) HasPropertyMappingsGroup() bool { - if o != nil && o.PropertyMappingsGroup != nil { + if o != nil && !IsNil(o.PropertyMappingsGroup) { return true } @@ -964,14 +955,22 @@ func (o *PatchedLDAPSourceRequest) SetPropertyMappingsGroup(v []string) { } func (o PatchedLDAPSourceRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedLDAPSourceRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.Slug != nil { + if !IsNil(o.Slug) { toSerialize["slug"] = o.Slug } - if o.Enabled != nil { + if !IsNil(o.Enabled) { toSerialize["enabled"] = o.Enabled } if o.AuthenticationFlow.IsSet() { @@ -980,70 +979,70 @@ func (o PatchedLDAPSourceRequest) MarshalJSON() ([]byte, error) { if o.EnrollmentFlow.IsSet() { toSerialize["enrollment_flow"] = o.EnrollmentFlow.Get() } - if o.PolicyEngineMode != nil { + if !IsNil(o.PolicyEngineMode) { toSerialize["policy_engine_mode"] = o.PolicyEngineMode } - if o.UserMatchingMode.IsSet() { - toSerialize["user_matching_mode"] = o.UserMatchingMode.Get() + if !IsNil(o.UserMatchingMode) { + toSerialize["user_matching_mode"] = o.UserMatchingMode } - if o.UserPathTemplate != nil { + if !IsNil(o.UserPathTemplate) { toSerialize["user_path_template"] = o.UserPathTemplate } - if o.ServerUri != nil { + if !IsNil(o.ServerUri) { toSerialize["server_uri"] = o.ServerUri } if o.PeerCertificate.IsSet() { toSerialize["peer_certificate"] = o.PeerCertificate.Get() } - if o.BindCn != nil { + if !IsNil(o.BindCn) { toSerialize["bind_cn"] = o.BindCn } - if o.BindPassword != nil { + if !IsNil(o.BindPassword) { toSerialize["bind_password"] = o.BindPassword } - if o.StartTls != nil { + if !IsNil(o.StartTls) { toSerialize["start_tls"] = o.StartTls } - if o.BaseDn != nil { + if !IsNil(o.BaseDn) { toSerialize["base_dn"] = o.BaseDn } - if o.AdditionalUserDn != nil { + if !IsNil(o.AdditionalUserDn) { toSerialize["additional_user_dn"] = o.AdditionalUserDn } - if o.AdditionalGroupDn != nil { + if !IsNil(o.AdditionalGroupDn) { toSerialize["additional_group_dn"] = o.AdditionalGroupDn } - if o.UserObjectFilter != nil { + if !IsNil(o.UserObjectFilter) { toSerialize["user_object_filter"] = o.UserObjectFilter } - if o.GroupObjectFilter != nil { + if !IsNil(o.GroupObjectFilter) { toSerialize["group_object_filter"] = o.GroupObjectFilter } - if o.GroupMembershipField != nil { + if !IsNil(o.GroupMembershipField) { toSerialize["group_membership_field"] = o.GroupMembershipField } - if o.ObjectUniquenessField != nil { + if !IsNil(o.ObjectUniquenessField) { toSerialize["object_uniqueness_field"] = o.ObjectUniquenessField } - if o.SyncUsers != nil { + if !IsNil(o.SyncUsers) { toSerialize["sync_users"] = o.SyncUsers } - if o.SyncUsersPassword != nil { + if !IsNil(o.SyncUsersPassword) { toSerialize["sync_users_password"] = o.SyncUsersPassword } - if o.SyncGroups != nil { + if !IsNil(o.SyncGroups) { toSerialize["sync_groups"] = o.SyncGroups } if o.SyncParentGroup.IsSet() { toSerialize["sync_parent_group"] = o.SyncParentGroup.Get() } - if o.PropertyMappings != nil { + if !IsNil(o.PropertyMappings) { toSerialize["property_mappings"] = o.PropertyMappings } - if o.PropertyMappingsGroup != nil { + if !IsNil(o.PropertyMappingsGroup) { toSerialize["property_mappings_group"] = o.PropertyMappingsGroup } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedLDAPSourceRequest struct { diff --git a/model_patched_notification_request.go b/model_patched_notification_request.go index 7faee9f48..5f775a11a 100644 --- a/model_patched_notification_request.go +++ b/model_patched_notification_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedNotificationRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedNotificationRequest{} + // PatchedNotificationRequest Notification Serializer type PatchedNotificationRequest struct { Event *EventRequest `json:"event,omitempty"` @@ -40,7 +43,7 @@ func NewPatchedNotificationRequestWithDefaults() *PatchedNotificationRequest { // GetEvent returns the Event field value if set, zero value otherwise. func (o *PatchedNotificationRequest) GetEvent() EventRequest { - if o == nil || o.Event == nil { + if o == nil || IsNil(o.Event) { var ret EventRequest return ret } @@ -50,7 +53,7 @@ func (o *PatchedNotificationRequest) GetEvent() EventRequest { // GetEventOk returns a tuple with the Event field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedNotificationRequest) GetEventOk() (*EventRequest, bool) { - if o == nil || o.Event == nil { + if o == nil || IsNil(o.Event) { return nil, false } return o.Event, true @@ -58,7 +61,7 @@ func (o *PatchedNotificationRequest) GetEventOk() (*EventRequest, bool) { // HasEvent returns a boolean if a field has been set. func (o *PatchedNotificationRequest) HasEvent() bool { - if o != nil && o.Event != nil { + if o != nil && !IsNil(o.Event) { return true } @@ -72,7 +75,7 @@ func (o *PatchedNotificationRequest) SetEvent(v EventRequest) { // GetSeen returns the Seen field value if set, zero value otherwise. func (o *PatchedNotificationRequest) GetSeen() bool { - if o == nil || o.Seen == nil { + if o == nil || IsNil(o.Seen) { var ret bool return ret } @@ -82,7 +85,7 @@ func (o *PatchedNotificationRequest) GetSeen() bool { // GetSeenOk returns a tuple with the Seen field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedNotificationRequest) GetSeenOk() (*bool, bool) { - if o == nil || o.Seen == nil { + if o == nil || IsNil(o.Seen) { return nil, false } return o.Seen, true @@ -90,7 +93,7 @@ func (o *PatchedNotificationRequest) GetSeenOk() (*bool, bool) { // HasSeen returns a boolean if a field has been set. func (o *PatchedNotificationRequest) HasSeen() bool { - if o != nil && o.Seen != nil { + if o != nil && !IsNil(o.Seen) { return true } @@ -103,14 +106,22 @@ func (o *PatchedNotificationRequest) SetSeen(v bool) { } func (o PatchedNotificationRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedNotificationRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Event != nil { + if !IsNil(o.Event) { toSerialize["event"] = o.Event } - if o.Seen != nil { + if !IsNil(o.Seen) { toSerialize["seen"] = o.Seen } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedNotificationRequest struct { diff --git a/model_patched_notification_rule_request.go b/model_patched_notification_rule_request.go index 05bbc1344..8114e84e6 100644 --- a/model_patched_notification_rule_request.go +++ b/model_patched_notification_rule_request.go @@ -15,13 +15,15 @@ import ( "encoding/json" ) +// checks if the PatchedNotificationRuleRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedNotificationRuleRequest{} + // PatchedNotificationRuleRequest NotificationRule Serializer type PatchedNotificationRuleRequest struct { Name *string `json:"name,omitempty"` // Select which transports should be used to notify the user. If none are selected, the notification will only be shown in the authentik UI. - Transports []string `json:"transports,omitempty"` - // Controls which severity level the created notifications will have. * `notice` - Notice * `warning` - Warning * `alert` - Alert - Severity NullableSeverityEnum `json:"severity,omitempty"` + Transports []string `json:"transports,omitempty"` + Severity *SeverityEnum `json:"severity,omitempty"` // Define which group of users this notification should be sent and shown to. If left empty, Notification won't ben sent. Group NullableString `json:"group,omitempty"` } @@ -45,7 +47,7 @@ func NewPatchedNotificationRuleRequestWithDefaults() *PatchedNotificationRuleReq // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedNotificationRuleRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -55,7 +57,7 @@ func (o *PatchedNotificationRuleRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedNotificationRuleRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -63,7 +65,7 @@ func (o *PatchedNotificationRuleRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedNotificationRuleRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -77,7 +79,7 @@ func (o *PatchedNotificationRuleRequest) SetName(v string) { // GetTransports returns the Transports field value if set, zero value otherwise. func (o *PatchedNotificationRuleRequest) GetTransports() []string { - if o == nil || o.Transports == nil { + if o == nil || IsNil(o.Transports) { var ret []string return ret } @@ -87,7 +89,7 @@ func (o *PatchedNotificationRuleRequest) GetTransports() []string { // GetTransportsOk returns a tuple with the Transports field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedNotificationRuleRequest) GetTransportsOk() ([]string, bool) { - if o == nil || o.Transports == nil { + if o == nil || IsNil(o.Transports) { return nil, false } return o.Transports, true @@ -95,7 +97,7 @@ func (o *PatchedNotificationRuleRequest) GetTransportsOk() ([]string, bool) { // HasTransports returns a boolean if a field has been set. func (o *PatchedNotificationRuleRequest) HasTransports() bool { - if o != nil && o.Transports != nil { + if o != nil && !IsNil(o.Transports) { return true } @@ -107,52 +109,41 @@ func (o *PatchedNotificationRuleRequest) SetTransports(v []string) { o.Transports = v } -// GetSeverity returns the Severity field value if set, zero value otherwise (both if not set or set to explicit null). +// GetSeverity returns the Severity field value if set, zero value otherwise. func (o *PatchedNotificationRuleRequest) GetSeverity() SeverityEnum { - if o == nil || o.Severity.Get() == nil { + if o == nil || IsNil(o.Severity) { var ret SeverityEnum return ret } - return *o.Severity.Get() + return *o.Severity } // GetSeverityOk returns a tuple with the Severity field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PatchedNotificationRuleRequest) GetSeverityOk() (*SeverityEnum, bool) { - if o == nil { + if o == nil || IsNil(o.Severity) { return nil, false } - return o.Severity.Get(), o.Severity.IsSet() + return o.Severity, true } // HasSeverity returns a boolean if a field has been set. func (o *PatchedNotificationRuleRequest) HasSeverity() bool { - if o != nil && o.Severity.IsSet() { + if o != nil && !IsNil(o.Severity) { return true } return false } -// SetSeverity gets a reference to the given NullableSeverityEnum and assigns it to the Severity field. +// SetSeverity gets a reference to the given SeverityEnum and assigns it to the Severity field. func (o *PatchedNotificationRuleRequest) SetSeverity(v SeverityEnum) { - o.Severity.Set(&v) -} - -// SetSeverityNil sets the value for Severity to be an explicit nil -func (o *PatchedNotificationRuleRequest) SetSeverityNil() { - o.Severity.Set(nil) -} - -// UnsetSeverity ensures that no value is present for Severity, not even an explicit nil -func (o *PatchedNotificationRuleRequest) UnsetSeverity() { - o.Severity.Unset() + o.Severity = &v } // GetGroup returns the Group field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedNotificationRuleRequest) GetGroup() string { - if o == nil || o.Group.Get() == nil { + if o == nil || IsNil(o.Group.Get()) { var ret string return ret } @@ -194,20 +185,28 @@ func (o *PatchedNotificationRuleRequest) UnsetGroup() { } func (o PatchedNotificationRuleRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedNotificationRuleRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.Transports != nil { + if !IsNil(o.Transports) { toSerialize["transports"] = o.Transports } - if o.Severity.IsSet() { - toSerialize["severity"] = o.Severity.Get() + if !IsNil(o.Severity) { + toSerialize["severity"] = o.Severity } if o.Group.IsSet() { toSerialize["group"] = o.Group.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedNotificationRuleRequest struct { diff --git a/model_patched_notification_transport_request.go b/model_patched_notification_transport_request.go index d2aeac908..8b83dc0a3 100644 --- a/model_patched_notification_transport_request.go +++ b/model_patched_notification_transport_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedNotificationTransportRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedNotificationTransportRequest{} + // PatchedNotificationTransportRequest NotificationTransport Serializer type PatchedNotificationTransportRequest struct { Name *string `json:"name,omitempty"` @@ -44,7 +47,7 @@ func NewPatchedNotificationTransportRequestWithDefaults() *PatchedNotificationTr // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedNotificationTransportRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -54,7 +57,7 @@ func (o *PatchedNotificationTransportRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedNotificationTransportRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -62,7 +65,7 @@ func (o *PatchedNotificationTransportRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedNotificationTransportRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -76,7 +79,7 @@ func (o *PatchedNotificationTransportRequest) SetName(v string) { // GetMode returns the Mode field value if set, zero value otherwise. func (o *PatchedNotificationTransportRequest) GetMode() NotificationTransportModeEnum { - if o == nil || o.Mode == nil { + if o == nil || IsNil(o.Mode) { var ret NotificationTransportModeEnum return ret } @@ -86,7 +89,7 @@ func (o *PatchedNotificationTransportRequest) GetMode() NotificationTransportMod // GetModeOk returns a tuple with the Mode field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedNotificationTransportRequest) GetModeOk() (*NotificationTransportModeEnum, bool) { - if o == nil || o.Mode == nil { + if o == nil || IsNil(o.Mode) { return nil, false } return o.Mode, true @@ -94,7 +97,7 @@ func (o *PatchedNotificationTransportRequest) GetModeOk() (*NotificationTranspor // HasMode returns a boolean if a field has been set. func (o *PatchedNotificationTransportRequest) HasMode() bool { - if o != nil && o.Mode != nil { + if o != nil && !IsNil(o.Mode) { return true } @@ -108,7 +111,7 @@ func (o *PatchedNotificationTransportRequest) SetMode(v NotificationTransportMod // GetWebhookUrl returns the WebhookUrl field value if set, zero value otherwise. func (o *PatchedNotificationTransportRequest) GetWebhookUrl() string { - if o == nil || o.WebhookUrl == nil { + if o == nil || IsNil(o.WebhookUrl) { var ret string return ret } @@ -118,7 +121,7 @@ func (o *PatchedNotificationTransportRequest) GetWebhookUrl() string { // GetWebhookUrlOk returns a tuple with the WebhookUrl field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedNotificationTransportRequest) GetWebhookUrlOk() (*string, bool) { - if o == nil || o.WebhookUrl == nil { + if o == nil || IsNil(o.WebhookUrl) { return nil, false } return o.WebhookUrl, true @@ -126,7 +129,7 @@ func (o *PatchedNotificationTransportRequest) GetWebhookUrlOk() (*string, bool) // HasWebhookUrl returns a boolean if a field has been set. func (o *PatchedNotificationTransportRequest) HasWebhookUrl() bool { - if o != nil && o.WebhookUrl != nil { + if o != nil && !IsNil(o.WebhookUrl) { return true } @@ -140,7 +143,7 @@ func (o *PatchedNotificationTransportRequest) SetWebhookUrl(v string) { // GetWebhookMapping returns the WebhookMapping field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedNotificationTransportRequest) GetWebhookMapping() string { - if o == nil || o.WebhookMapping.Get() == nil { + if o == nil || IsNil(o.WebhookMapping.Get()) { var ret string return ret } @@ -183,7 +186,7 @@ func (o *PatchedNotificationTransportRequest) UnsetWebhookMapping() { // GetSendOnce returns the SendOnce field value if set, zero value otherwise. func (o *PatchedNotificationTransportRequest) GetSendOnce() bool { - if o == nil || o.SendOnce == nil { + if o == nil || IsNil(o.SendOnce) { var ret bool return ret } @@ -193,7 +196,7 @@ func (o *PatchedNotificationTransportRequest) GetSendOnce() bool { // GetSendOnceOk returns a tuple with the SendOnce field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedNotificationTransportRequest) GetSendOnceOk() (*bool, bool) { - if o == nil || o.SendOnce == nil { + if o == nil || IsNil(o.SendOnce) { return nil, false } return o.SendOnce, true @@ -201,7 +204,7 @@ func (o *PatchedNotificationTransportRequest) GetSendOnceOk() (*bool, bool) { // HasSendOnce returns a boolean if a field has been set. func (o *PatchedNotificationTransportRequest) HasSendOnce() bool { - if o != nil && o.SendOnce != nil { + if o != nil && !IsNil(o.SendOnce) { return true } @@ -214,23 +217,31 @@ func (o *PatchedNotificationTransportRequest) SetSendOnce(v bool) { } func (o PatchedNotificationTransportRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedNotificationTransportRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.Mode != nil { + if !IsNil(o.Mode) { toSerialize["mode"] = o.Mode } - if o.WebhookUrl != nil { + if !IsNil(o.WebhookUrl) { toSerialize["webhook_url"] = o.WebhookUrl } if o.WebhookMapping.IsSet() { toSerialize["webhook_mapping"] = o.WebhookMapping.Get() } - if o.SendOnce != nil { + if !IsNil(o.SendOnce) { toSerialize["send_once"] = o.SendOnce } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedNotificationTransportRequest struct { diff --git a/model_patched_notification_webhook_mapping_request.go b/model_patched_notification_webhook_mapping_request.go index 48dfae2d2..46740b118 100644 --- a/model_patched_notification_webhook_mapping_request.go +++ b/model_patched_notification_webhook_mapping_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedNotificationWebhookMappingRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedNotificationWebhookMappingRequest{} + // PatchedNotificationWebhookMappingRequest NotificationWebhookMapping Serializer type PatchedNotificationWebhookMappingRequest struct { Name *string `json:"name,omitempty"` @@ -40,7 +43,7 @@ func NewPatchedNotificationWebhookMappingRequestWithDefaults() *PatchedNotificat // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedNotificationWebhookMappingRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -50,7 +53,7 @@ func (o *PatchedNotificationWebhookMappingRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedNotificationWebhookMappingRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -58,7 +61,7 @@ func (o *PatchedNotificationWebhookMappingRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedNotificationWebhookMappingRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -72,7 +75,7 @@ func (o *PatchedNotificationWebhookMappingRequest) SetName(v string) { // GetExpression returns the Expression field value if set, zero value otherwise. func (o *PatchedNotificationWebhookMappingRequest) GetExpression() string { - if o == nil || o.Expression == nil { + if o == nil || IsNil(o.Expression) { var ret string return ret } @@ -82,7 +85,7 @@ func (o *PatchedNotificationWebhookMappingRequest) GetExpression() string { // GetExpressionOk returns a tuple with the Expression field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedNotificationWebhookMappingRequest) GetExpressionOk() (*string, bool) { - if o == nil || o.Expression == nil { + if o == nil || IsNil(o.Expression) { return nil, false } return o.Expression, true @@ -90,7 +93,7 @@ func (o *PatchedNotificationWebhookMappingRequest) GetExpressionOk() (*string, b // HasExpression returns a boolean if a field has been set. func (o *PatchedNotificationWebhookMappingRequest) HasExpression() bool { - if o != nil && o.Expression != nil { + if o != nil && !IsNil(o.Expression) { return true } @@ -103,14 +106,22 @@ func (o *PatchedNotificationWebhookMappingRequest) SetExpression(v string) { } func (o PatchedNotificationWebhookMappingRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedNotificationWebhookMappingRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.Expression != nil { + if !IsNil(o.Expression) { toSerialize["expression"] = o.Expression } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedNotificationWebhookMappingRequest struct { diff --git a/model_patched_o_auth2_provider_request.go b/model_patched_o_auth2_provider_request.go index 5138d826d..d1f340cad 100644 --- a/model_patched_o_auth2_provider_request.go +++ b/model_patched_o_auth2_provider_request.go @@ -15,18 +15,20 @@ import ( "encoding/json" ) +// checks if the PatchedOAuth2ProviderRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedOAuth2ProviderRequest{} + // PatchedOAuth2ProviderRequest OAuth2Provider Serializer type PatchedOAuth2ProviderRequest struct { Name *string `json:"name,omitempty"` // Flow used for authentication when the associated application is accessed by an un-authenticated user. AuthenticationFlow NullableString `json:"authentication_flow,omitempty"` // Flow used when authorizing this provider. - AuthorizationFlow *string `json:"authorization_flow,omitempty"` - PropertyMappings []string `json:"property_mappings,omitempty"` - // Confidential clients are capable of maintaining the confidentiality of their credentials. Public clients are incapable * `confidential` - Confidential * `public` - Public - ClientType NullableClientTypeEnum `json:"client_type,omitempty"` - ClientId *string `json:"client_id,omitempty"` - ClientSecret *string `json:"client_secret,omitempty"` + AuthorizationFlow *string `json:"authorization_flow,omitempty"` + PropertyMappings []string `json:"property_mappings,omitempty"` + ClientType *ClientTypeEnum `json:"client_type,omitempty"` + ClientId *string `json:"client_id,omitempty"` + ClientSecret *string `json:"client_secret,omitempty"` // Access codes not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). AccessCodeValidity *string `json:"access_code_validity,omitempty"` // Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). @@ -38,12 +40,10 @@ type PatchedOAuth2ProviderRequest struct { // Key used to sign the tokens. Only required when JWT Algorithm is set to RS256. SigningKey NullableString `json:"signing_key,omitempty"` // Enter each URI on a new line. - RedirectUris *string `json:"redirect_uris,omitempty"` - // Configure what data should be used as unique User Identifier. For most cases, the default should be fine. * `hashed_user_id` - Based on the Hashed User ID * `user_id` - Based on user ID * `user_username` - Based on the username * `user_email` - Based on the User's Email. This is recommended over the UPN method. * `user_upn` - Based on the User's UPN, only works if user has a 'upn' attribute set. Use this method only if you have different UPN and Mail domains. - SubMode NullableSubModeEnum `json:"sub_mode,omitempty"` - // Configure how the issuer field of the ID Token should be filled. * `global` - Same identifier is used for all providers * `per_provider` - Each provider has a different issuer, based on the application slug. - IssuerMode NullableIssuerModeEnum `json:"issuer_mode,omitempty"` - JwksSources []string `json:"jwks_sources,omitempty"` + RedirectUris *string `json:"redirect_uris,omitempty"` + SubMode *SubModeEnum `json:"sub_mode,omitempty"` + IssuerMode *IssuerModeEnum `json:"issuer_mode,omitempty"` + JwksSources []string `json:"jwks_sources,omitempty"` } // NewPatchedOAuth2ProviderRequest instantiates a new PatchedOAuth2ProviderRequest object @@ -65,7 +65,7 @@ func NewPatchedOAuth2ProviderRequestWithDefaults() *PatchedOAuth2ProviderRequest // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedOAuth2ProviderRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -75,7 +75,7 @@ func (o *PatchedOAuth2ProviderRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedOAuth2ProviderRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -83,7 +83,7 @@ func (o *PatchedOAuth2ProviderRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedOAuth2ProviderRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -97,7 +97,7 @@ func (o *PatchedOAuth2ProviderRequest) SetName(v string) { // GetAuthenticationFlow returns the AuthenticationFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedOAuth2ProviderRequest) GetAuthenticationFlow() string { - if o == nil || o.AuthenticationFlow.Get() == nil { + if o == nil || IsNil(o.AuthenticationFlow.Get()) { var ret string return ret } @@ -140,7 +140,7 @@ func (o *PatchedOAuth2ProviderRequest) UnsetAuthenticationFlow() { // GetAuthorizationFlow returns the AuthorizationFlow field value if set, zero value otherwise. func (o *PatchedOAuth2ProviderRequest) GetAuthorizationFlow() string { - if o == nil || o.AuthorizationFlow == nil { + if o == nil || IsNil(o.AuthorizationFlow) { var ret string return ret } @@ -150,7 +150,7 @@ func (o *PatchedOAuth2ProviderRequest) GetAuthorizationFlow() string { // GetAuthorizationFlowOk returns a tuple with the AuthorizationFlow field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedOAuth2ProviderRequest) GetAuthorizationFlowOk() (*string, bool) { - if o == nil || o.AuthorizationFlow == nil { + if o == nil || IsNil(o.AuthorizationFlow) { return nil, false } return o.AuthorizationFlow, true @@ -158,7 +158,7 @@ func (o *PatchedOAuth2ProviderRequest) GetAuthorizationFlowOk() (*string, bool) // HasAuthorizationFlow returns a boolean if a field has been set. func (o *PatchedOAuth2ProviderRequest) HasAuthorizationFlow() bool { - if o != nil && o.AuthorizationFlow != nil { + if o != nil && !IsNil(o.AuthorizationFlow) { return true } @@ -172,7 +172,7 @@ func (o *PatchedOAuth2ProviderRequest) SetAuthorizationFlow(v string) { // GetPropertyMappings returns the PropertyMappings field value if set, zero value otherwise. func (o *PatchedOAuth2ProviderRequest) GetPropertyMappings() []string { - if o == nil || o.PropertyMappings == nil { + if o == nil || IsNil(o.PropertyMappings) { var ret []string return ret } @@ -182,7 +182,7 @@ func (o *PatchedOAuth2ProviderRequest) GetPropertyMappings() []string { // GetPropertyMappingsOk returns a tuple with the PropertyMappings field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedOAuth2ProviderRequest) GetPropertyMappingsOk() ([]string, bool) { - if o == nil || o.PropertyMappings == nil { + if o == nil || IsNil(o.PropertyMappings) { return nil, false } return o.PropertyMappings, true @@ -190,7 +190,7 @@ func (o *PatchedOAuth2ProviderRequest) GetPropertyMappingsOk() ([]string, bool) // HasPropertyMappings returns a boolean if a field has been set. func (o *PatchedOAuth2ProviderRequest) HasPropertyMappings() bool { - if o != nil && o.PropertyMappings != nil { + if o != nil && !IsNil(o.PropertyMappings) { return true } @@ -202,52 +202,41 @@ func (o *PatchedOAuth2ProviderRequest) SetPropertyMappings(v []string) { o.PropertyMappings = v } -// GetClientType returns the ClientType field value if set, zero value otherwise (both if not set or set to explicit null). +// GetClientType returns the ClientType field value if set, zero value otherwise. func (o *PatchedOAuth2ProviderRequest) GetClientType() ClientTypeEnum { - if o == nil || o.ClientType.Get() == nil { + if o == nil || IsNil(o.ClientType) { var ret ClientTypeEnum return ret } - return *o.ClientType.Get() + return *o.ClientType } // GetClientTypeOk returns a tuple with the ClientType field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PatchedOAuth2ProviderRequest) GetClientTypeOk() (*ClientTypeEnum, bool) { - if o == nil { + if o == nil || IsNil(o.ClientType) { return nil, false } - return o.ClientType.Get(), o.ClientType.IsSet() + return o.ClientType, true } // HasClientType returns a boolean if a field has been set. func (o *PatchedOAuth2ProviderRequest) HasClientType() bool { - if o != nil && o.ClientType.IsSet() { + if o != nil && !IsNil(o.ClientType) { return true } return false } -// SetClientType gets a reference to the given NullableClientTypeEnum and assigns it to the ClientType field. +// SetClientType gets a reference to the given ClientTypeEnum and assigns it to the ClientType field. func (o *PatchedOAuth2ProviderRequest) SetClientType(v ClientTypeEnum) { - o.ClientType.Set(&v) -} - -// SetClientTypeNil sets the value for ClientType to be an explicit nil -func (o *PatchedOAuth2ProviderRequest) SetClientTypeNil() { - o.ClientType.Set(nil) -} - -// UnsetClientType ensures that no value is present for ClientType, not even an explicit nil -func (o *PatchedOAuth2ProviderRequest) UnsetClientType() { - o.ClientType.Unset() + o.ClientType = &v } // GetClientId returns the ClientId field value if set, zero value otherwise. func (o *PatchedOAuth2ProviderRequest) GetClientId() string { - if o == nil || o.ClientId == nil { + if o == nil || IsNil(o.ClientId) { var ret string return ret } @@ -257,7 +246,7 @@ func (o *PatchedOAuth2ProviderRequest) GetClientId() string { // GetClientIdOk returns a tuple with the ClientId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedOAuth2ProviderRequest) GetClientIdOk() (*string, bool) { - if o == nil || o.ClientId == nil { + if o == nil || IsNil(o.ClientId) { return nil, false } return o.ClientId, true @@ -265,7 +254,7 @@ func (o *PatchedOAuth2ProviderRequest) GetClientIdOk() (*string, bool) { // HasClientId returns a boolean if a field has been set. func (o *PatchedOAuth2ProviderRequest) HasClientId() bool { - if o != nil && o.ClientId != nil { + if o != nil && !IsNil(o.ClientId) { return true } @@ -279,7 +268,7 @@ func (o *PatchedOAuth2ProviderRequest) SetClientId(v string) { // GetClientSecret returns the ClientSecret field value if set, zero value otherwise. func (o *PatchedOAuth2ProviderRequest) GetClientSecret() string { - if o == nil || o.ClientSecret == nil { + if o == nil || IsNil(o.ClientSecret) { var ret string return ret } @@ -289,7 +278,7 @@ func (o *PatchedOAuth2ProviderRequest) GetClientSecret() string { // GetClientSecretOk returns a tuple with the ClientSecret field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedOAuth2ProviderRequest) GetClientSecretOk() (*string, bool) { - if o == nil || o.ClientSecret == nil { + if o == nil || IsNil(o.ClientSecret) { return nil, false } return o.ClientSecret, true @@ -297,7 +286,7 @@ func (o *PatchedOAuth2ProviderRequest) GetClientSecretOk() (*string, bool) { // HasClientSecret returns a boolean if a field has been set. func (o *PatchedOAuth2ProviderRequest) HasClientSecret() bool { - if o != nil && o.ClientSecret != nil { + if o != nil && !IsNil(o.ClientSecret) { return true } @@ -311,7 +300,7 @@ func (o *PatchedOAuth2ProviderRequest) SetClientSecret(v string) { // GetAccessCodeValidity returns the AccessCodeValidity field value if set, zero value otherwise. func (o *PatchedOAuth2ProviderRequest) GetAccessCodeValidity() string { - if o == nil || o.AccessCodeValidity == nil { + if o == nil || IsNil(o.AccessCodeValidity) { var ret string return ret } @@ -321,7 +310,7 @@ func (o *PatchedOAuth2ProviderRequest) GetAccessCodeValidity() string { // GetAccessCodeValidityOk returns a tuple with the AccessCodeValidity field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedOAuth2ProviderRequest) GetAccessCodeValidityOk() (*string, bool) { - if o == nil || o.AccessCodeValidity == nil { + if o == nil || IsNil(o.AccessCodeValidity) { return nil, false } return o.AccessCodeValidity, true @@ -329,7 +318,7 @@ func (o *PatchedOAuth2ProviderRequest) GetAccessCodeValidityOk() (*string, bool) // HasAccessCodeValidity returns a boolean if a field has been set. func (o *PatchedOAuth2ProviderRequest) HasAccessCodeValidity() bool { - if o != nil && o.AccessCodeValidity != nil { + if o != nil && !IsNil(o.AccessCodeValidity) { return true } @@ -343,7 +332,7 @@ func (o *PatchedOAuth2ProviderRequest) SetAccessCodeValidity(v string) { // GetAccessTokenValidity returns the AccessTokenValidity field value if set, zero value otherwise. func (o *PatchedOAuth2ProviderRequest) GetAccessTokenValidity() string { - if o == nil || o.AccessTokenValidity == nil { + if o == nil || IsNil(o.AccessTokenValidity) { var ret string return ret } @@ -353,7 +342,7 @@ func (o *PatchedOAuth2ProviderRequest) GetAccessTokenValidity() string { // GetAccessTokenValidityOk returns a tuple with the AccessTokenValidity field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedOAuth2ProviderRequest) GetAccessTokenValidityOk() (*string, bool) { - if o == nil || o.AccessTokenValidity == nil { + if o == nil || IsNil(o.AccessTokenValidity) { return nil, false } return o.AccessTokenValidity, true @@ -361,7 +350,7 @@ func (o *PatchedOAuth2ProviderRequest) GetAccessTokenValidityOk() (*string, bool // HasAccessTokenValidity returns a boolean if a field has been set. func (o *PatchedOAuth2ProviderRequest) HasAccessTokenValidity() bool { - if o != nil && o.AccessTokenValidity != nil { + if o != nil && !IsNil(o.AccessTokenValidity) { return true } @@ -375,7 +364,7 @@ func (o *PatchedOAuth2ProviderRequest) SetAccessTokenValidity(v string) { // GetRefreshTokenValidity returns the RefreshTokenValidity field value if set, zero value otherwise. func (o *PatchedOAuth2ProviderRequest) GetRefreshTokenValidity() string { - if o == nil || o.RefreshTokenValidity == nil { + if o == nil || IsNil(o.RefreshTokenValidity) { var ret string return ret } @@ -385,7 +374,7 @@ func (o *PatchedOAuth2ProviderRequest) GetRefreshTokenValidity() string { // GetRefreshTokenValidityOk returns a tuple with the RefreshTokenValidity field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedOAuth2ProviderRequest) GetRefreshTokenValidityOk() (*string, bool) { - if o == nil || o.RefreshTokenValidity == nil { + if o == nil || IsNil(o.RefreshTokenValidity) { return nil, false } return o.RefreshTokenValidity, true @@ -393,7 +382,7 @@ func (o *PatchedOAuth2ProviderRequest) GetRefreshTokenValidityOk() (*string, boo // HasRefreshTokenValidity returns a boolean if a field has been set. func (o *PatchedOAuth2ProviderRequest) HasRefreshTokenValidity() bool { - if o != nil && o.RefreshTokenValidity != nil { + if o != nil && !IsNil(o.RefreshTokenValidity) { return true } @@ -407,7 +396,7 @@ func (o *PatchedOAuth2ProviderRequest) SetRefreshTokenValidity(v string) { // GetIncludeClaimsInIdToken returns the IncludeClaimsInIdToken field value if set, zero value otherwise. func (o *PatchedOAuth2ProviderRequest) GetIncludeClaimsInIdToken() bool { - if o == nil || o.IncludeClaimsInIdToken == nil { + if o == nil || IsNil(o.IncludeClaimsInIdToken) { var ret bool return ret } @@ -417,7 +406,7 @@ func (o *PatchedOAuth2ProviderRequest) GetIncludeClaimsInIdToken() bool { // GetIncludeClaimsInIdTokenOk returns a tuple with the IncludeClaimsInIdToken field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedOAuth2ProviderRequest) GetIncludeClaimsInIdTokenOk() (*bool, bool) { - if o == nil || o.IncludeClaimsInIdToken == nil { + if o == nil || IsNil(o.IncludeClaimsInIdToken) { return nil, false } return o.IncludeClaimsInIdToken, true @@ -425,7 +414,7 @@ func (o *PatchedOAuth2ProviderRequest) GetIncludeClaimsInIdTokenOk() (*bool, boo // HasIncludeClaimsInIdToken returns a boolean if a field has been set. func (o *PatchedOAuth2ProviderRequest) HasIncludeClaimsInIdToken() bool { - if o != nil && o.IncludeClaimsInIdToken != nil { + if o != nil && !IsNil(o.IncludeClaimsInIdToken) { return true } @@ -439,7 +428,7 @@ func (o *PatchedOAuth2ProviderRequest) SetIncludeClaimsInIdToken(v bool) { // GetSigningKey returns the SigningKey field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedOAuth2ProviderRequest) GetSigningKey() string { - if o == nil || o.SigningKey.Get() == nil { + if o == nil || IsNil(o.SigningKey.Get()) { var ret string return ret } @@ -482,7 +471,7 @@ func (o *PatchedOAuth2ProviderRequest) UnsetSigningKey() { // GetRedirectUris returns the RedirectUris field value if set, zero value otherwise. func (o *PatchedOAuth2ProviderRequest) GetRedirectUris() string { - if o == nil || o.RedirectUris == nil { + if o == nil || IsNil(o.RedirectUris) { var ret string return ret } @@ -492,7 +481,7 @@ func (o *PatchedOAuth2ProviderRequest) GetRedirectUris() string { // GetRedirectUrisOk returns a tuple with the RedirectUris field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedOAuth2ProviderRequest) GetRedirectUrisOk() (*string, bool) { - if o == nil || o.RedirectUris == nil { + if o == nil || IsNil(o.RedirectUris) { return nil, false } return o.RedirectUris, true @@ -500,7 +489,7 @@ func (o *PatchedOAuth2ProviderRequest) GetRedirectUrisOk() (*string, bool) { // HasRedirectUris returns a boolean if a field has been set. func (o *PatchedOAuth2ProviderRequest) HasRedirectUris() bool { - if o != nil && o.RedirectUris != nil { + if o != nil && !IsNil(o.RedirectUris) { return true } @@ -512,95 +501,73 @@ func (o *PatchedOAuth2ProviderRequest) SetRedirectUris(v string) { o.RedirectUris = &v } -// GetSubMode returns the SubMode field value if set, zero value otherwise (both if not set or set to explicit null). +// GetSubMode returns the SubMode field value if set, zero value otherwise. func (o *PatchedOAuth2ProviderRequest) GetSubMode() SubModeEnum { - if o == nil || o.SubMode.Get() == nil { + if o == nil || IsNil(o.SubMode) { var ret SubModeEnum return ret } - return *o.SubMode.Get() + return *o.SubMode } // GetSubModeOk returns a tuple with the SubMode field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PatchedOAuth2ProviderRequest) GetSubModeOk() (*SubModeEnum, bool) { - if o == nil { + if o == nil || IsNil(o.SubMode) { return nil, false } - return o.SubMode.Get(), o.SubMode.IsSet() + return o.SubMode, true } // HasSubMode returns a boolean if a field has been set. func (o *PatchedOAuth2ProviderRequest) HasSubMode() bool { - if o != nil && o.SubMode.IsSet() { + if o != nil && !IsNil(o.SubMode) { return true } return false } -// SetSubMode gets a reference to the given NullableSubModeEnum and assigns it to the SubMode field. +// SetSubMode gets a reference to the given SubModeEnum and assigns it to the SubMode field. func (o *PatchedOAuth2ProviderRequest) SetSubMode(v SubModeEnum) { - o.SubMode.Set(&v) -} - -// SetSubModeNil sets the value for SubMode to be an explicit nil -func (o *PatchedOAuth2ProviderRequest) SetSubModeNil() { - o.SubMode.Set(nil) -} - -// UnsetSubMode ensures that no value is present for SubMode, not even an explicit nil -func (o *PatchedOAuth2ProviderRequest) UnsetSubMode() { - o.SubMode.Unset() + o.SubMode = &v } -// GetIssuerMode returns the IssuerMode field value if set, zero value otherwise (both if not set or set to explicit null). +// GetIssuerMode returns the IssuerMode field value if set, zero value otherwise. func (o *PatchedOAuth2ProviderRequest) GetIssuerMode() IssuerModeEnum { - if o == nil || o.IssuerMode.Get() == nil { + if o == nil || IsNil(o.IssuerMode) { var ret IssuerModeEnum return ret } - return *o.IssuerMode.Get() + return *o.IssuerMode } // GetIssuerModeOk returns a tuple with the IssuerMode field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PatchedOAuth2ProviderRequest) GetIssuerModeOk() (*IssuerModeEnum, bool) { - if o == nil { + if o == nil || IsNil(o.IssuerMode) { return nil, false } - return o.IssuerMode.Get(), o.IssuerMode.IsSet() + return o.IssuerMode, true } // HasIssuerMode returns a boolean if a field has been set. func (o *PatchedOAuth2ProviderRequest) HasIssuerMode() bool { - if o != nil && o.IssuerMode.IsSet() { + if o != nil && !IsNil(o.IssuerMode) { return true } return false } -// SetIssuerMode gets a reference to the given NullableIssuerModeEnum and assigns it to the IssuerMode field. +// SetIssuerMode gets a reference to the given IssuerModeEnum and assigns it to the IssuerMode field. func (o *PatchedOAuth2ProviderRequest) SetIssuerMode(v IssuerModeEnum) { - o.IssuerMode.Set(&v) -} - -// SetIssuerModeNil sets the value for IssuerMode to be an explicit nil -func (o *PatchedOAuth2ProviderRequest) SetIssuerModeNil() { - o.IssuerMode.Set(nil) -} - -// UnsetIssuerMode ensures that no value is present for IssuerMode, not even an explicit nil -func (o *PatchedOAuth2ProviderRequest) UnsetIssuerMode() { - o.IssuerMode.Unset() + o.IssuerMode = &v } // GetJwksSources returns the JwksSources field value if set, zero value otherwise. func (o *PatchedOAuth2ProviderRequest) GetJwksSources() []string { - if o == nil || o.JwksSources == nil { + if o == nil || IsNil(o.JwksSources) { var ret []string return ret } @@ -610,7 +577,7 @@ func (o *PatchedOAuth2ProviderRequest) GetJwksSources() []string { // GetJwksSourcesOk returns a tuple with the JwksSources field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedOAuth2ProviderRequest) GetJwksSourcesOk() ([]string, bool) { - if o == nil || o.JwksSources == nil { + if o == nil || IsNil(o.JwksSources) { return nil, false } return o.JwksSources, true @@ -618,7 +585,7 @@ func (o *PatchedOAuth2ProviderRequest) GetJwksSourcesOk() ([]string, bool) { // HasJwksSources returns a boolean if a field has been set. func (o *PatchedOAuth2ProviderRequest) HasJwksSources() bool { - if o != nil && o.JwksSources != nil { + if o != nil && !IsNil(o.JwksSources) { return true } @@ -631,56 +598,64 @@ func (o *PatchedOAuth2ProviderRequest) SetJwksSources(v []string) { } func (o PatchedOAuth2ProviderRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedOAuth2ProviderRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } if o.AuthenticationFlow.IsSet() { toSerialize["authentication_flow"] = o.AuthenticationFlow.Get() } - if o.AuthorizationFlow != nil { + if !IsNil(o.AuthorizationFlow) { toSerialize["authorization_flow"] = o.AuthorizationFlow } - if o.PropertyMappings != nil { + if !IsNil(o.PropertyMappings) { toSerialize["property_mappings"] = o.PropertyMappings } - if o.ClientType.IsSet() { - toSerialize["client_type"] = o.ClientType.Get() + if !IsNil(o.ClientType) { + toSerialize["client_type"] = o.ClientType } - if o.ClientId != nil { + if !IsNil(o.ClientId) { toSerialize["client_id"] = o.ClientId } - if o.ClientSecret != nil { + if !IsNil(o.ClientSecret) { toSerialize["client_secret"] = o.ClientSecret } - if o.AccessCodeValidity != nil { + if !IsNil(o.AccessCodeValidity) { toSerialize["access_code_validity"] = o.AccessCodeValidity } - if o.AccessTokenValidity != nil { + if !IsNil(o.AccessTokenValidity) { toSerialize["access_token_validity"] = o.AccessTokenValidity } - if o.RefreshTokenValidity != nil { + if !IsNil(o.RefreshTokenValidity) { toSerialize["refresh_token_validity"] = o.RefreshTokenValidity } - if o.IncludeClaimsInIdToken != nil { + if !IsNil(o.IncludeClaimsInIdToken) { toSerialize["include_claims_in_id_token"] = o.IncludeClaimsInIdToken } if o.SigningKey.IsSet() { toSerialize["signing_key"] = o.SigningKey.Get() } - if o.RedirectUris != nil { + if !IsNil(o.RedirectUris) { toSerialize["redirect_uris"] = o.RedirectUris } - if o.SubMode.IsSet() { - toSerialize["sub_mode"] = o.SubMode.Get() + if !IsNil(o.SubMode) { + toSerialize["sub_mode"] = o.SubMode } - if o.IssuerMode.IsSet() { - toSerialize["issuer_mode"] = o.IssuerMode.Get() + if !IsNil(o.IssuerMode) { + toSerialize["issuer_mode"] = o.IssuerMode } - if o.JwksSources != nil { + if !IsNil(o.JwksSources) { toSerialize["jwks_sources"] = o.JwksSources } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedOAuth2ProviderRequest struct { diff --git a/model_patched_o_auth_source_request.go b/model_patched_o_auth_source_request.go index bd38cb4ff..7e9d6d3bc 100644 --- a/model_patched_o_auth_source_request.go +++ b/model_patched_o_auth_source_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedOAuthSourceRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedOAuthSourceRequest{} + // PatchedOAuthSourceRequest OAuth Source Serializer type PatchedOAuthSourceRequest struct { // Source's display Name. @@ -25,12 +28,11 @@ type PatchedOAuthSourceRequest struct { // Flow to use when authenticating existing users. AuthenticationFlow NullableString `json:"authentication_flow,omitempty"` // Flow to use when enrolling new users. - EnrollmentFlow NullableString `json:"enrollment_flow,omitempty"` - PolicyEngineMode *PolicyEngineMode `json:"policy_engine_mode,omitempty"` - // How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. - UserMatchingMode NullableUserMatchingModeEnum `json:"user_matching_mode,omitempty"` - UserPathTemplate *string `json:"user_path_template,omitempty"` - ProviderType *ProviderTypeEnum `json:"provider_type,omitempty"` + EnrollmentFlow NullableString `json:"enrollment_flow,omitempty"` + PolicyEngineMode *PolicyEngineMode `json:"policy_engine_mode,omitempty"` + UserMatchingMode *UserMatchingModeEnum `json:"user_matching_mode,omitempty"` + UserPathTemplate *string `json:"user_path_template,omitempty"` + ProviderType *ProviderTypeEnum `json:"provider_type,omitempty"` // URL used to request the initial token. This URL is only required for OAuth 1. RequestTokenUrl NullableString `json:"request_token_url,omitempty"` // URL the user is redirect to to conest the flow. @@ -66,7 +68,7 @@ func NewPatchedOAuthSourceRequestWithDefaults() *PatchedOAuthSourceRequest { // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedOAuthSourceRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -76,7 +78,7 @@ func (o *PatchedOAuthSourceRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedOAuthSourceRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -84,7 +86,7 @@ func (o *PatchedOAuthSourceRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedOAuthSourceRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -98,7 +100,7 @@ func (o *PatchedOAuthSourceRequest) SetName(v string) { // GetSlug returns the Slug field value if set, zero value otherwise. func (o *PatchedOAuthSourceRequest) GetSlug() string { - if o == nil || o.Slug == nil { + if o == nil || IsNil(o.Slug) { var ret string return ret } @@ -108,7 +110,7 @@ func (o *PatchedOAuthSourceRequest) GetSlug() string { // GetSlugOk returns a tuple with the Slug field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedOAuthSourceRequest) GetSlugOk() (*string, bool) { - if o == nil || o.Slug == nil { + if o == nil || IsNil(o.Slug) { return nil, false } return o.Slug, true @@ -116,7 +118,7 @@ func (o *PatchedOAuthSourceRequest) GetSlugOk() (*string, bool) { // HasSlug returns a boolean if a field has been set. func (o *PatchedOAuthSourceRequest) HasSlug() bool { - if o != nil && o.Slug != nil { + if o != nil && !IsNil(o.Slug) { return true } @@ -130,7 +132,7 @@ func (o *PatchedOAuthSourceRequest) SetSlug(v string) { // GetEnabled returns the Enabled field value if set, zero value otherwise. func (o *PatchedOAuthSourceRequest) GetEnabled() bool { - if o == nil || o.Enabled == nil { + if o == nil || IsNil(o.Enabled) { var ret bool return ret } @@ -140,7 +142,7 @@ func (o *PatchedOAuthSourceRequest) GetEnabled() bool { // GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedOAuthSourceRequest) GetEnabledOk() (*bool, bool) { - if o == nil || o.Enabled == nil { + if o == nil || IsNil(o.Enabled) { return nil, false } return o.Enabled, true @@ -148,7 +150,7 @@ func (o *PatchedOAuthSourceRequest) GetEnabledOk() (*bool, bool) { // HasEnabled returns a boolean if a field has been set. func (o *PatchedOAuthSourceRequest) HasEnabled() bool { - if o != nil && o.Enabled != nil { + if o != nil && !IsNil(o.Enabled) { return true } @@ -162,7 +164,7 @@ func (o *PatchedOAuthSourceRequest) SetEnabled(v bool) { // GetAuthenticationFlow returns the AuthenticationFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedOAuthSourceRequest) GetAuthenticationFlow() string { - if o == nil || o.AuthenticationFlow.Get() == nil { + if o == nil || IsNil(o.AuthenticationFlow.Get()) { var ret string return ret } @@ -205,7 +207,7 @@ func (o *PatchedOAuthSourceRequest) UnsetAuthenticationFlow() { // GetEnrollmentFlow returns the EnrollmentFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedOAuthSourceRequest) GetEnrollmentFlow() string { - if o == nil || o.EnrollmentFlow.Get() == nil { + if o == nil || IsNil(o.EnrollmentFlow.Get()) { var ret string return ret } @@ -248,7 +250,7 @@ func (o *PatchedOAuthSourceRequest) UnsetEnrollmentFlow() { // GetPolicyEngineMode returns the PolicyEngineMode field value if set, zero value otherwise. func (o *PatchedOAuthSourceRequest) GetPolicyEngineMode() PolicyEngineMode { - if o == nil || o.PolicyEngineMode == nil { + if o == nil || IsNil(o.PolicyEngineMode) { var ret PolicyEngineMode return ret } @@ -258,7 +260,7 @@ func (o *PatchedOAuthSourceRequest) GetPolicyEngineMode() PolicyEngineMode { // GetPolicyEngineModeOk returns a tuple with the PolicyEngineMode field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedOAuthSourceRequest) GetPolicyEngineModeOk() (*PolicyEngineMode, bool) { - if o == nil || o.PolicyEngineMode == nil { + if o == nil || IsNil(o.PolicyEngineMode) { return nil, false } return o.PolicyEngineMode, true @@ -266,7 +268,7 @@ func (o *PatchedOAuthSourceRequest) GetPolicyEngineModeOk() (*PolicyEngineMode, // HasPolicyEngineMode returns a boolean if a field has been set. func (o *PatchedOAuthSourceRequest) HasPolicyEngineMode() bool { - if o != nil && o.PolicyEngineMode != nil { + if o != nil && !IsNil(o.PolicyEngineMode) { return true } @@ -278,52 +280,41 @@ func (o *PatchedOAuthSourceRequest) SetPolicyEngineMode(v PolicyEngineMode) { o.PolicyEngineMode = &v } -// GetUserMatchingMode returns the UserMatchingMode field value if set, zero value otherwise (both if not set or set to explicit null). +// GetUserMatchingMode returns the UserMatchingMode field value if set, zero value otherwise. func (o *PatchedOAuthSourceRequest) GetUserMatchingMode() UserMatchingModeEnum { - if o == nil || o.UserMatchingMode.Get() == nil { + if o == nil || IsNil(o.UserMatchingMode) { var ret UserMatchingModeEnum return ret } - return *o.UserMatchingMode.Get() + return *o.UserMatchingMode } // GetUserMatchingModeOk returns a tuple with the UserMatchingMode field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PatchedOAuthSourceRequest) GetUserMatchingModeOk() (*UserMatchingModeEnum, bool) { - if o == nil { + if o == nil || IsNil(o.UserMatchingMode) { return nil, false } - return o.UserMatchingMode.Get(), o.UserMatchingMode.IsSet() + return o.UserMatchingMode, true } // HasUserMatchingMode returns a boolean if a field has been set. func (o *PatchedOAuthSourceRequest) HasUserMatchingMode() bool { - if o != nil && o.UserMatchingMode.IsSet() { + if o != nil && !IsNil(o.UserMatchingMode) { return true } return false } -// SetUserMatchingMode gets a reference to the given NullableUserMatchingModeEnum and assigns it to the UserMatchingMode field. +// SetUserMatchingMode gets a reference to the given UserMatchingModeEnum and assigns it to the UserMatchingMode field. func (o *PatchedOAuthSourceRequest) SetUserMatchingMode(v UserMatchingModeEnum) { - o.UserMatchingMode.Set(&v) -} - -// SetUserMatchingModeNil sets the value for UserMatchingMode to be an explicit nil -func (o *PatchedOAuthSourceRequest) SetUserMatchingModeNil() { - o.UserMatchingMode.Set(nil) -} - -// UnsetUserMatchingMode ensures that no value is present for UserMatchingMode, not even an explicit nil -func (o *PatchedOAuthSourceRequest) UnsetUserMatchingMode() { - o.UserMatchingMode.Unset() + o.UserMatchingMode = &v } // GetUserPathTemplate returns the UserPathTemplate field value if set, zero value otherwise. func (o *PatchedOAuthSourceRequest) GetUserPathTemplate() string { - if o == nil || o.UserPathTemplate == nil { + if o == nil || IsNil(o.UserPathTemplate) { var ret string return ret } @@ -333,7 +324,7 @@ func (o *PatchedOAuthSourceRequest) GetUserPathTemplate() string { // GetUserPathTemplateOk returns a tuple with the UserPathTemplate field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedOAuthSourceRequest) GetUserPathTemplateOk() (*string, bool) { - if o == nil || o.UserPathTemplate == nil { + if o == nil || IsNil(o.UserPathTemplate) { return nil, false } return o.UserPathTemplate, true @@ -341,7 +332,7 @@ func (o *PatchedOAuthSourceRequest) GetUserPathTemplateOk() (*string, bool) { // HasUserPathTemplate returns a boolean if a field has been set. func (o *PatchedOAuthSourceRequest) HasUserPathTemplate() bool { - if o != nil && o.UserPathTemplate != nil { + if o != nil && !IsNil(o.UserPathTemplate) { return true } @@ -355,7 +346,7 @@ func (o *PatchedOAuthSourceRequest) SetUserPathTemplate(v string) { // GetProviderType returns the ProviderType field value if set, zero value otherwise. func (o *PatchedOAuthSourceRequest) GetProviderType() ProviderTypeEnum { - if o == nil || o.ProviderType == nil { + if o == nil || IsNil(o.ProviderType) { var ret ProviderTypeEnum return ret } @@ -365,7 +356,7 @@ func (o *PatchedOAuthSourceRequest) GetProviderType() ProviderTypeEnum { // GetProviderTypeOk returns a tuple with the ProviderType field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedOAuthSourceRequest) GetProviderTypeOk() (*ProviderTypeEnum, bool) { - if o == nil || o.ProviderType == nil { + if o == nil || IsNil(o.ProviderType) { return nil, false } return o.ProviderType, true @@ -373,7 +364,7 @@ func (o *PatchedOAuthSourceRequest) GetProviderTypeOk() (*ProviderTypeEnum, bool // HasProviderType returns a boolean if a field has been set. func (o *PatchedOAuthSourceRequest) HasProviderType() bool { - if o != nil && o.ProviderType != nil { + if o != nil && !IsNil(o.ProviderType) { return true } @@ -387,7 +378,7 @@ func (o *PatchedOAuthSourceRequest) SetProviderType(v ProviderTypeEnum) { // GetRequestTokenUrl returns the RequestTokenUrl field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedOAuthSourceRequest) GetRequestTokenUrl() string { - if o == nil || o.RequestTokenUrl.Get() == nil { + if o == nil || IsNil(o.RequestTokenUrl.Get()) { var ret string return ret } @@ -430,7 +421,7 @@ func (o *PatchedOAuthSourceRequest) UnsetRequestTokenUrl() { // GetAuthorizationUrl returns the AuthorizationUrl field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedOAuthSourceRequest) GetAuthorizationUrl() string { - if o == nil || o.AuthorizationUrl.Get() == nil { + if o == nil || IsNil(o.AuthorizationUrl.Get()) { var ret string return ret } @@ -473,7 +464,7 @@ func (o *PatchedOAuthSourceRequest) UnsetAuthorizationUrl() { // GetAccessTokenUrl returns the AccessTokenUrl field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedOAuthSourceRequest) GetAccessTokenUrl() string { - if o == nil || o.AccessTokenUrl.Get() == nil { + if o == nil || IsNil(o.AccessTokenUrl.Get()) { var ret string return ret } @@ -516,7 +507,7 @@ func (o *PatchedOAuthSourceRequest) UnsetAccessTokenUrl() { // GetProfileUrl returns the ProfileUrl field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedOAuthSourceRequest) GetProfileUrl() string { - if o == nil || o.ProfileUrl.Get() == nil { + if o == nil || IsNil(o.ProfileUrl.Get()) { var ret string return ret } @@ -559,7 +550,7 @@ func (o *PatchedOAuthSourceRequest) UnsetProfileUrl() { // GetConsumerKey returns the ConsumerKey field value if set, zero value otherwise. func (o *PatchedOAuthSourceRequest) GetConsumerKey() string { - if o == nil || o.ConsumerKey == nil { + if o == nil || IsNil(o.ConsumerKey) { var ret string return ret } @@ -569,7 +560,7 @@ func (o *PatchedOAuthSourceRequest) GetConsumerKey() string { // GetConsumerKeyOk returns a tuple with the ConsumerKey field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedOAuthSourceRequest) GetConsumerKeyOk() (*string, bool) { - if o == nil || o.ConsumerKey == nil { + if o == nil || IsNil(o.ConsumerKey) { return nil, false } return o.ConsumerKey, true @@ -577,7 +568,7 @@ func (o *PatchedOAuthSourceRequest) GetConsumerKeyOk() (*string, bool) { // HasConsumerKey returns a boolean if a field has been set. func (o *PatchedOAuthSourceRequest) HasConsumerKey() bool { - if o != nil && o.ConsumerKey != nil { + if o != nil && !IsNil(o.ConsumerKey) { return true } @@ -591,7 +582,7 @@ func (o *PatchedOAuthSourceRequest) SetConsumerKey(v string) { // GetConsumerSecret returns the ConsumerSecret field value if set, zero value otherwise. func (o *PatchedOAuthSourceRequest) GetConsumerSecret() string { - if o == nil || o.ConsumerSecret == nil { + if o == nil || IsNil(o.ConsumerSecret) { var ret string return ret } @@ -601,7 +592,7 @@ func (o *PatchedOAuthSourceRequest) GetConsumerSecret() string { // GetConsumerSecretOk returns a tuple with the ConsumerSecret field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedOAuthSourceRequest) GetConsumerSecretOk() (*string, bool) { - if o == nil || o.ConsumerSecret == nil { + if o == nil || IsNil(o.ConsumerSecret) { return nil, false } return o.ConsumerSecret, true @@ -609,7 +600,7 @@ func (o *PatchedOAuthSourceRequest) GetConsumerSecretOk() (*string, bool) { // HasConsumerSecret returns a boolean if a field has been set. func (o *PatchedOAuthSourceRequest) HasConsumerSecret() bool { - if o != nil && o.ConsumerSecret != nil { + if o != nil && !IsNil(o.ConsumerSecret) { return true } @@ -623,7 +614,7 @@ func (o *PatchedOAuthSourceRequest) SetConsumerSecret(v string) { // GetAdditionalScopes returns the AdditionalScopes field value if set, zero value otherwise. func (o *PatchedOAuthSourceRequest) GetAdditionalScopes() string { - if o == nil || o.AdditionalScopes == nil { + if o == nil || IsNil(o.AdditionalScopes) { var ret string return ret } @@ -633,7 +624,7 @@ func (o *PatchedOAuthSourceRequest) GetAdditionalScopes() string { // GetAdditionalScopesOk returns a tuple with the AdditionalScopes field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedOAuthSourceRequest) GetAdditionalScopesOk() (*string, bool) { - if o == nil || o.AdditionalScopes == nil { + if o == nil || IsNil(o.AdditionalScopes) { return nil, false } return o.AdditionalScopes, true @@ -641,7 +632,7 @@ func (o *PatchedOAuthSourceRequest) GetAdditionalScopesOk() (*string, bool) { // HasAdditionalScopes returns a boolean if a field has been set. func (o *PatchedOAuthSourceRequest) HasAdditionalScopes() bool { - if o != nil && o.AdditionalScopes != nil { + if o != nil && !IsNil(o.AdditionalScopes) { return true } @@ -655,7 +646,7 @@ func (o *PatchedOAuthSourceRequest) SetAdditionalScopes(v string) { // GetOidcWellKnownUrl returns the OidcWellKnownUrl field value if set, zero value otherwise. func (o *PatchedOAuthSourceRequest) GetOidcWellKnownUrl() string { - if o == nil || o.OidcWellKnownUrl == nil { + if o == nil || IsNil(o.OidcWellKnownUrl) { var ret string return ret } @@ -665,7 +656,7 @@ func (o *PatchedOAuthSourceRequest) GetOidcWellKnownUrl() string { // GetOidcWellKnownUrlOk returns a tuple with the OidcWellKnownUrl field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedOAuthSourceRequest) GetOidcWellKnownUrlOk() (*string, bool) { - if o == nil || o.OidcWellKnownUrl == nil { + if o == nil || IsNil(o.OidcWellKnownUrl) { return nil, false } return o.OidcWellKnownUrl, true @@ -673,7 +664,7 @@ func (o *PatchedOAuthSourceRequest) GetOidcWellKnownUrlOk() (*string, bool) { // HasOidcWellKnownUrl returns a boolean if a field has been set. func (o *PatchedOAuthSourceRequest) HasOidcWellKnownUrl() bool { - if o != nil && o.OidcWellKnownUrl != nil { + if o != nil && !IsNil(o.OidcWellKnownUrl) { return true } @@ -687,7 +678,7 @@ func (o *PatchedOAuthSourceRequest) SetOidcWellKnownUrl(v string) { // GetOidcJwksUrl returns the OidcJwksUrl field value if set, zero value otherwise. func (o *PatchedOAuthSourceRequest) GetOidcJwksUrl() string { - if o == nil || o.OidcJwksUrl == nil { + if o == nil || IsNil(o.OidcJwksUrl) { var ret string return ret } @@ -697,7 +688,7 @@ func (o *PatchedOAuthSourceRequest) GetOidcJwksUrl() string { // GetOidcJwksUrlOk returns a tuple with the OidcJwksUrl field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedOAuthSourceRequest) GetOidcJwksUrlOk() (*string, bool) { - if o == nil || o.OidcJwksUrl == nil { + if o == nil || IsNil(o.OidcJwksUrl) { return nil, false } return o.OidcJwksUrl, true @@ -705,7 +696,7 @@ func (o *PatchedOAuthSourceRequest) GetOidcJwksUrlOk() (*string, bool) { // HasOidcJwksUrl returns a boolean if a field has been set. func (o *PatchedOAuthSourceRequest) HasOidcJwksUrl() bool { - if o != nil && o.OidcJwksUrl != nil { + if o != nil && !IsNil(o.OidcJwksUrl) { return true } @@ -719,7 +710,7 @@ func (o *PatchedOAuthSourceRequest) SetOidcJwksUrl(v string) { // GetOidcJwks returns the OidcJwks field value if set, zero value otherwise. func (o *PatchedOAuthSourceRequest) GetOidcJwks() map[string]interface{} { - if o == nil || o.OidcJwks == nil { + if o == nil || IsNil(o.OidcJwks) { var ret map[string]interface{} return ret } @@ -729,15 +720,15 @@ func (o *PatchedOAuthSourceRequest) GetOidcJwks() map[string]interface{} { // GetOidcJwksOk returns a tuple with the OidcJwks field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedOAuthSourceRequest) GetOidcJwksOk() (map[string]interface{}, bool) { - if o == nil || o.OidcJwks == nil { - return nil, false + if o == nil || IsNil(o.OidcJwks) { + return map[string]interface{}{}, false } return o.OidcJwks, true } // HasOidcJwks returns a boolean if a field has been set. func (o *PatchedOAuthSourceRequest) HasOidcJwks() bool { - if o != nil && o.OidcJwks != nil { + if o != nil && !IsNil(o.OidcJwks) { return true } @@ -750,14 +741,22 @@ func (o *PatchedOAuthSourceRequest) SetOidcJwks(v map[string]interface{}) { } func (o PatchedOAuthSourceRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedOAuthSourceRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.Slug != nil { + if !IsNil(o.Slug) { toSerialize["slug"] = o.Slug } - if o.Enabled != nil { + if !IsNil(o.Enabled) { toSerialize["enabled"] = o.Enabled } if o.AuthenticationFlow.IsSet() { @@ -766,16 +765,16 @@ func (o PatchedOAuthSourceRequest) MarshalJSON() ([]byte, error) { if o.EnrollmentFlow.IsSet() { toSerialize["enrollment_flow"] = o.EnrollmentFlow.Get() } - if o.PolicyEngineMode != nil { + if !IsNil(o.PolicyEngineMode) { toSerialize["policy_engine_mode"] = o.PolicyEngineMode } - if o.UserMatchingMode.IsSet() { - toSerialize["user_matching_mode"] = o.UserMatchingMode.Get() + if !IsNil(o.UserMatchingMode) { + toSerialize["user_matching_mode"] = o.UserMatchingMode } - if o.UserPathTemplate != nil { + if !IsNil(o.UserPathTemplate) { toSerialize["user_path_template"] = o.UserPathTemplate } - if o.ProviderType != nil { + if !IsNil(o.ProviderType) { toSerialize["provider_type"] = o.ProviderType } if o.RequestTokenUrl.IsSet() { @@ -790,25 +789,25 @@ func (o PatchedOAuthSourceRequest) MarshalJSON() ([]byte, error) { if o.ProfileUrl.IsSet() { toSerialize["profile_url"] = o.ProfileUrl.Get() } - if o.ConsumerKey != nil { + if !IsNil(o.ConsumerKey) { toSerialize["consumer_key"] = o.ConsumerKey } - if o.ConsumerSecret != nil { + if !IsNil(o.ConsumerSecret) { toSerialize["consumer_secret"] = o.ConsumerSecret } - if o.AdditionalScopes != nil { + if !IsNil(o.AdditionalScopes) { toSerialize["additional_scopes"] = o.AdditionalScopes } - if o.OidcWellKnownUrl != nil { + if !IsNil(o.OidcWellKnownUrl) { toSerialize["oidc_well_known_url"] = o.OidcWellKnownUrl } - if o.OidcJwksUrl != nil { + if !IsNil(o.OidcJwksUrl) { toSerialize["oidc_jwks_url"] = o.OidcJwksUrl } - if o.OidcJwks != nil { + if !IsNil(o.OidcJwks) { toSerialize["oidc_jwks"] = o.OidcJwks } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedOAuthSourceRequest struct { diff --git a/model_patched_outpost_request.go b/model_patched_outpost_request.go index a59ac13cd..7e3f06074 100644 --- a/model_patched_outpost_request.go +++ b/model_patched_outpost_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedOutpostRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedOutpostRequest{} + // PatchedOutpostRequest Outpost Serializer type PatchedOutpostRequest struct { Name *string `json:"name,omitempty"` @@ -46,7 +49,7 @@ func NewPatchedOutpostRequestWithDefaults() *PatchedOutpostRequest { // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedOutpostRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -56,7 +59,7 @@ func (o *PatchedOutpostRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedOutpostRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -64,7 +67,7 @@ func (o *PatchedOutpostRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedOutpostRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -78,7 +81,7 @@ func (o *PatchedOutpostRequest) SetName(v string) { // GetType returns the Type field value if set, zero value otherwise. func (o *PatchedOutpostRequest) GetType() OutpostTypeEnum { - if o == nil || o.Type == nil { + if o == nil || IsNil(o.Type) { var ret OutpostTypeEnum return ret } @@ -88,7 +91,7 @@ func (o *PatchedOutpostRequest) GetType() OutpostTypeEnum { // GetTypeOk returns a tuple with the Type field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedOutpostRequest) GetTypeOk() (*OutpostTypeEnum, bool) { - if o == nil || o.Type == nil { + if o == nil || IsNil(o.Type) { return nil, false } return o.Type, true @@ -96,7 +99,7 @@ func (o *PatchedOutpostRequest) GetTypeOk() (*OutpostTypeEnum, bool) { // HasType returns a boolean if a field has been set. func (o *PatchedOutpostRequest) HasType() bool { - if o != nil && o.Type != nil { + if o != nil && !IsNil(o.Type) { return true } @@ -110,7 +113,7 @@ func (o *PatchedOutpostRequest) SetType(v OutpostTypeEnum) { // GetProviders returns the Providers field value if set, zero value otherwise. func (o *PatchedOutpostRequest) GetProviders() []int32 { - if o == nil || o.Providers == nil { + if o == nil || IsNil(o.Providers) { var ret []int32 return ret } @@ -120,7 +123,7 @@ func (o *PatchedOutpostRequest) GetProviders() []int32 { // GetProvidersOk returns a tuple with the Providers field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedOutpostRequest) GetProvidersOk() ([]int32, bool) { - if o == nil || o.Providers == nil { + if o == nil || IsNil(o.Providers) { return nil, false } return o.Providers, true @@ -128,7 +131,7 @@ func (o *PatchedOutpostRequest) GetProvidersOk() ([]int32, bool) { // HasProviders returns a boolean if a field has been set. func (o *PatchedOutpostRequest) HasProviders() bool { - if o != nil && o.Providers != nil { + if o != nil && !IsNil(o.Providers) { return true } @@ -142,7 +145,7 @@ func (o *PatchedOutpostRequest) SetProviders(v []int32) { // GetServiceConnection returns the ServiceConnection field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedOutpostRequest) GetServiceConnection() string { - if o == nil || o.ServiceConnection.Get() == nil { + if o == nil || IsNil(o.ServiceConnection.Get()) { var ret string return ret } @@ -185,7 +188,7 @@ func (o *PatchedOutpostRequest) UnsetServiceConnection() { // GetConfig returns the Config field value if set, zero value otherwise. func (o *PatchedOutpostRequest) GetConfig() map[string]interface{} { - if o == nil || o.Config == nil { + if o == nil || IsNil(o.Config) { var ret map[string]interface{} return ret } @@ -195,15 +198,15 @@ func (o *PatchedOutpostRequest) GetConfig() map[string]interface{} { // GetConfigOk returns a tuple with the Config field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedOutpostRequest) GetConfigOk() (map[string]interface{}, bool) { - if o == nil || o.Config == nil { - return nil, false + if o == nil || IsNil(o.Config) { + return map[string]interface{}{}, false } return o.Config, true } // HasConfig returns a boolean if a field has been set. func (o *PatchedOutpostRequest) HasConfig() bool { - if o != nil && o.Config != nil { + if o != nil && !IsNil(o.Config) { return true } @@ -217,7 +220,7 @@ func (o *PatchedOutpostRequest) SetConfig(v map[string]interface{}) { // GetManaged returns the Managed field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedOutpostRequest) GetManaged() string { - if o == nil || o.Managed.Get() == nil { + if o == nil || IsNil(o.Managed.Get()) { var ret string return ret } @@ -259,26 +262,34 @@ func (o *PatchedOutpostRequest) UnsetManaged() { } func (o PatchedOutpostRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedOutpostRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.Type != nil { + if !IsNil(o.Type) { toSerialize["type"] = o.Type } - if o.Providers != nil { + if !IsNil(o.Providers) { toSerialize["providers"] = o.Providers } if o.ServiceConnection.IsSet() { toSerialize["service_connection"] = o.ServiceConnection.Get() } - if o.Config != nil { + if !IsNil(o.Config) { toSerialize["config"] = o.Config } if o.Managed.IsSet() { toSerialize["managed"] = o.Managed.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedOutpostRequest struct { diff --git a/model_patched_password_expiry_policy_request.go b/model_patched_password_expiry_policy_request.go index f2204f1f1..22b2515f5 100644 --- a/model_patched_password_expiry_policy_request.go +++ b/model_patched_password_expiry_policy_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedPasswordExpiryPolicyRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedPasswordExpiryPolicyRequest{} + // PatchedPasswordExpiryPolicyRequest Password Expiry Policy Serializer type PatchedPasswordExpiryPolicyRequest struct { Name *string `json:"name,omitempty"` @@ -43,7 +46,7 @@ func NewPatchedPasswordExpiryPolicyRequestWithDefaults() *PatchedPasswordExpiryP // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedPasswordExpiryPolicyRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -53,7 +56,7 @@ func (o *PatchedPasswordExpiryPolicyRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedPasswordExpiryPolicyRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -61,7 +64,7 @@ func (o *PatchedPasswordExpiryPolicyRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedPasswordExpiryPolicyRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -75,7 +78,7 @@ func (o *PatchedPasswordExpiryPolicyRequest) SetName(v string) { // GetExecutionLogging returns the ExecutionLogging field value if set, zero value otherwise. func (o *PatchedPasswordExpiryPolicyRequest) GetExecutionLogging() bool { - if o == nil || o.ExecutionLogging == nil { + if o == nil || IsNil(o.ExecutionLogging) { var ret bool return ret } @@ -85,7 +88,7 @@ func (o *PatchedPasswordExpiryPolicyRequest) GetExecutionLogging() bool { // GetExecutionLoggingOk returns a tuple with the ExecutionLogging field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedPasswordExpiryPolicyRequest) GetExecutionLoggingOk() (*bool, bool) { - if o == nil || o.ExecutionLogging == nil { + if o == nil || IsNil(o.ExecutionLogging) { return nil, false } return o.ExecutionLogging, true @@ -93,7 +96,7 @@ func (o *PatchedPasswordExpiryPolicyRequest) GetExecutionLoggingOk() (*bool, boo // HasExecutionLogging returns a boolean if a field has been set. func (o *PatchedPasswordExpiryPolicyRequest) HasExecutionLogging() bool { - if o != nil && o.ExecutionLogging != nil { + if o != nil && !IsNil(o.ExecutionLogging) { return true } @@ -107,7 +110,7 @@ func (o *PatchedPasswordExpiryPolicyRequest) SetExecutionLogging(v bool) { // GetDays returns the Days field value if set, zero value otherwise. func (o *PatchedPasswordExpiryPolicyRequest) GetDays() int32 { - if o == nil || o.Days == nil { + if o == nil || IsNil(o.Days) { var ret int32 return ret } @@ -117,7 +120,7 @@ func (o *PatchedPasswordExpiryPolicyRequest) GetDays() int32 { // GetDaysOk returns a tuple with the Days field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedPasswordExpiryPolicyRequest) GetDaysOk() (*int32, bool) { - if o == nil || o.Days == nil { + if o == nil || IsNil(o.Days) { return nil, false } return o.Days, true @@ -125,7 +128,7 @@ func (o *PatchedPasswordExpiryPolicyRequest) GetDaysOk() (*int32, bool) { // HasDays returns a boolean if a field has been set. func (o *PatchedPasswordExpiryPolicyRequest) HasDays() bool { - if o != nil && o.Days != nil { + if o != nil && !IsNil(o.Days) { return true } @@ -139,7 +142,7 @@ func (o *PatchedPasswordExpiryPolicyRequest) SetDays(v int32) { // GetDenyOnly returns the DenyOnly field value if set, zero value otherwise. func (o *PatchedPasswordExpiryPolicyRequest) GetDenyOnly() bool { - if o == nil || o.DenyOnly == nil { + if o == nil || IsNil(o.DenyOnly) { var ret bool return ret } @@ -149,7 +152,7 @@ func (o *PatchedPasswordExpiryPolicyRequest) GetDenyOnly() bool { // GetDenyOnlyOk returns a tuple with the DenyOnly field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedPasswordExpiryPolicyRequest) GetDenyOnlyOk() (*bool, bool) { - if o == nil || o.DenyOnly == nil { + if o == nil || IsNil(o.DenyOnly) { return nil, false } return o.DenyOnly, true @@ -157,7 +160,7 @@ func (o *PatchedPasswordExpiryPolicyRequest) GetDenyOnlyOk() (*bool, bool) { // HasDenyOnly returns a boolean if a field has been set. func (o *PatchedPasswordExpiryPolicyRequest) HasDenyOnly() bool { - if o != nil && o.DenyOnly != nil { + if o != nil && !IsNil(o.DenyOnly) { return true } @@ -170,20 +173,28 @@ func (o *PatchedPasswordExpiryPolicyRequest) SetDenyOnly(v bool) { } func (o PatchedPasswordExpiryPolicyRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedPasswordExpiryPolicyRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.ExecutionLogging != nil { + if !IsNil(o.ExecutionLogging) { toSerialize["execution_logging"] = o.ExecutionLogging } - if o.Days != nil { + if !IsNil(o.Days) { toSerialize["days"] = o.Days } - if o.DenyOnly != nil { + if !IsNil(o.DenyOnly) { toSerialize["deny_only"] = o.DenyOnly } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedPasswordExpiryPolicyRequest struct { diff --git a/model_patched_password_policy_request.go b/model_patched_password_policy_request.go index c2db1ae64..6b86ddf22 100644 --- a/model_patched_password_policy_request.go +++ b/model_patched_password_policy_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedPasswordPolicyRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedPasswordPolicyRequest{} + // PatchedPasswordPolicyRequest Password Policy Serializer type PatchedPasswordPolicyRequest struct { Name *string `json:"name,omitempty"` @@ -57,7 +60,7 @@ func NewPatchedPasswordPolicyRequestWithDefaults() *PatchedPasswordPolicyRequest // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedPasswordPolicyRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -67,7 +70,7 @@ func (o *PatchedPasswordPolicyRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedPasswordPolicyRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -75,7 +78,7 @@ func (o *PatchedPasswordPolicyRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedPasswordPolicyRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -89,7 +92,7 @@ func (o *PatchedPasswordPolicyRequest) SetName(v string) { // GetExecutionLogging returns the ExecutionLogging field value if set, zero value otherwise. func (o *PatchedPasswordPolicyRequest) GetExecutionLogging() bool { - if o == nil || o.ExecutionLogging == nil { + if o == nil || IsNil(o.ExecutionLogging) { var ret bool return ret } @@ -99,7 +102,7 @@ func (o *PatchedPasswordPolicyRequest) GetExecutionLogging() bool { // GetExecutionLoggingOk returns a tuple with the ExecutionLogging field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedPasswordPolicyRequest) GetExecutionLoggingOk() (*bool, bool) { - if o == nil || o.ExecutionLogging == nil { + if o == nil || IsNil(o.ExecutionLogging) { return nil, false } return o.ExecutionLogging, true @@ -107,7 +110,7 @@ func (o *PatchedPasswordPolicyRequest) GetExecutionLoggingOk() (*bool, bool) { // HasExecutionLogging returns a boolean if a field has been set. func (o *PatchedPasswordPolicyRequest) HasExecutionLogging() bool { - if o != nil && o.ExecutionLogging != nil { + if o != nil && !IsNil(o.ExecutionLogging) { return true } @@ -121,7 +124,7 @@ func (o *PatchedPasswordPolicyRequest) SetExecutionLogging(v bool) { // GetPasswordField returns the PasswordField field value if set, zero value otherwise. func (o *PatchedPasswordPolicyRequest) GetPasswordField() string { - if o == nil || o.PasswordField == nil { + if o == nil || IsNil(o.PasswordField) { var ret string return ret } @@ -131,7 +134,7 @@ func (o *PatchedPasswordPolicyRequest) GetPasswordField() string { // GetPasswordFieldOk returns a tuple with the PasswordField field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedPasswordPolicyRequest) GetPasswordFieldOk() (*string, bool) { - if o == nil || o.PasswordField == nil { + if o == nil || IsNil(o.PasswordField) { return nil, false } return o.PasswordField, true @@ -139,7 +142,7 @@ func (o *PatchedPasswordPolicyRequest) GetPasswordFieldOk() (*string, bool) { // HasPasswordField returns a boolean if a field has been set. func (o *PatchedPasswordPolicyRequest) HasPasswordField() bool { - if o != nil && o.PasswordField != nil { + if o != nil && !IsNil(o.PasswordField) { return true } @@ -153,7 +156,7 @@ func (o *PatchedPasswordPolicyRequest) SetPasswordField(v string) { // GetAmountDigits returns the AmountDigits field value if set, zero value otherwise. func (o *PatchedPasswordPolicyRequest) GetAmountDigits() int32 { - if o == nil || o.AmountDigits == nil { + if o == nil || IsNil(o.AmountDigits) { var ret int32 return ret } @@ -163,7 +166,7 @@ func (o *PatchedPasswordPolicyRequest) GetAmountDigits() int32 { // GetAmountDigitsOk returns a tuple with the AmountDigits field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedPasswordPolicyRequest) GetAmountDigitsOk() (*int32, bool) { - if o == nil || o.AmountDigits == nil { + if o == nil || IsNil(o.AmountDigits) { return nil, false } return o.AmountDigits, true @@ -171,7 +174,7 @@ func (o *PatchedPasswordPolicyRequest) GetAmountDigitsOk() (*int32, bool) { // HasAmountDigits returns a boolean if a field has been set. func (o *PatchedPasswordPolicyRequest) HasAmountDigits() bool { - if o != nil && o.AmountDigits != nil { + if o != nil && !IsNil(o.AmountDigits) { return true } @@ -185,7 +188,7 @@ func (o *PatchedPasswordPolicyRequest) SetAmountDigits(v int32) { // GetAmountUppercase returns the AmountUppercase field value if set, zero value otherwise. func (o *PatchedPasswordPolicyRequest) GetAmountUppercase() int32 { - if o == nil || o.AmountUppercase == nil { + if o == nil || IsNil(o.AmountUppercase) { var ret int32 return ret } @@ -195,7 +198,7 @@ func (o *PatchedPasswordPolicyRequest) GetAmountUppercase() int32 { // GetAmountUppercaseOk returns a tuple with the AmountUppercase field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedPasswordPolicyRequest) GetAmountUppercaseOk() (*int32, bool) { - if o == nil || o.AmountUppercase == nil { + if o == nil || IsNil(o.AmountUppercase) { return nil, false } return o.AmountUppercase, true @@ -203,7 +206,7 @@ func (o *PatchedPasswordPolicyRequest) GetAmountUppercaseOk() (*int32, bool) { // HasAmountUppercase returns a boolean if a field has been set. func (o *PatchedPasswordPolicyRequest) HasAmountUppercase() bool { - if o != nil && o.AmountUppercase != nil { + if o != nil && !IsNil(o.AmountUppercase) { return true } @@ -217,7 +220,7 @@ func (o *PatchedPasswordPolicyRequest) SetAmountUppercase(v int32) { // GetAmountLowercase returns the AmountLowercase field value if set, zero value otherwise. func (o *PatchedPasswordPolicyRequest) GetAmountLowercase() int32 { - if o == nil || o.AmountLowercase == nil { + if o == nil || IsNil(o.AmountLowercase) { var ret int32 return ret } @@ -227,7 +230,7 @@ func (o *PatchedPasswordPolicyRequest) GetAmountLowercase() int32 { // GetAmountLowercaseOk returns a tuple with the AmountLowercase field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedPasswordPolicyRequest) GetAmountLowercaseOk() (*int32, bool) { - if o == nil || o.AmountLowercase == nil { + if o == nil || IsNil(o.AmountLowercase) { return nil, false } return o.AmountLowercase, true @@ -235,7 +238,7 @@ func (o *PatchedPasswordPolicyRequest) GetAmountLowercaseOk() (*int32, bool) { // HasAmountLowercase returns a boolean if a field has been set. func (o *PatchedPasswordPolicyRequest) HasAmountLowercase() bool { - if o != nil && o.AmountLowercase != nil { + if o != nil && !IsNil(o.AmountLowercase) { return true } @@ -249,7 +252,7 @@ func (o *PatchedPasswordPolicyRequest) SetAmountLowercase(v int32) { // GetAmountSymbols returns the AmountSymbols field value if set, zero value otherwise. func (o *PatchedPasswordPolicyRequest) GetAmountSymbols() int32 { - if o == nil || o.AmountSymbols == nil { + if o == nil || IsNil(o.AmountSymbols) { var ret int32 return ret } @@ -259,7 +262,7 @@ func (o *PatchedPasswordPolicyRequest) GetAmountSymbols() int32 { // GetAmountSymbolsOk returns a tuple with the AmountSymbols field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedPasswordPolicyRequest) GetAmountSymbolsOk() (*int32, bool) { - if o == nil || o.AmountSymbols == nil { + if o == nil || IsNil(o.AmountSymbols) { return nil, false } return o.AmountSymbols, true @@ -267,7 +270,7 @@ func (o *PatchedPasswordPolicyRequest) GetAmountSymbolsOk() (*int32, bool) { // HasAmountSymbols returns a boolean if a field has been set. func (o *PatchedPasswordPolicyRequest) HasAmountSymbols() bool { - if o != nil && o.AmountSymbols != nil { + if o != nil && !IsNil(o.AmountSymbols) { return true } @@ -281,7 +284,7 @@ func (o *PatchedPasswordPolicyRequest) SetAmountSymbols(v int32) { // GetLengthMin returns the LengthMin field value if set, zero value otherwise. func (o *PatchedPasswordPolicyRequest) GetLengthMin() int32 { - if o == nil || o.LengthMin == nil { + if o == nil || IsNil(o.LengthMin) { var ret int32 return ret } @@ -291,7 +294,7 @@ func (o *PatchedPasswordPolicyRequest) GetLengthMin() int32 { // GetLengthMinOk returns a tuple with the LengthMin field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedPasswordPolicyRequest) GetLengthMinOk() (*int32, bool) { - if o == nil || o.LengthMin == nil { + if o == nil || IsNil(o.LengthMin) { return nil, false } return o.LengthMin, true @@ -299,7 +302,7 @@ func (o *PatchedPasswordPolicyRequest) GetLengthMinOk() (*int32, bool) { // HasLengthMin returns a boolean if a field has been set. func (o *PatchedPasswordPolicyRequest) HasLengthMin() bool { - if o != nil && o.LengthMin != nil { + if o != nil && !IsNil(o.LengthMin) { return true } @@ -313,7 +316,7 @@ func (o *PatchedPasswordPolicyRequest) SetLengthMin(v int32) { // GetSymbolCharset returns the SymbolCharset field value if set, zero value otherwise. func (o *PatchedPasswordPolicyRequest) GetSymbolCharset() string { - if o == nil || o.SymbolCharset == nil { + if o == nil || IsNil(o.SymbolCharset) { var ret string return ret } @@ -323,7 +326,7 @@ func (o *PatchedPasswordPolicyRequest) GetSymbolCharset() string { // GetSymbolCharsetOk returns a tuple with the SymbolCharset field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedPasswordPolicyRequest) GetSymbolCharsetOk() (*string, bool) { - if o == nil || o.SymbolCharset == nil { + if o == nil || IsNil(o.SymbolCharset) { return nil, false } return o.SymbolCharset, true @@ -331,7 +334,7 @@ func (o *PatchedPasswordPolicyRequest) GetSymbolCharsetOk() (*string, bool) { // HasSymbolCharset returns a boolean if a field has been set. func (o *PatchedPasswordPolicyRequest) HasSymbolCharset() bool { - if o != nil && o.SymbolCharset != nil { + if o != nil && !IsNil(o.SymbolCharset) { return true } @@ -345,7 +348,7 @@ func (o *PatchedPasswordPolicyRequest) SetSymbolCharset(v string) { // GetErrorMessage returns the ErrorMessage field value if set, zero value otherwise. func (o *PatchedPasswordPolicyRequest) GetErrorMessage() string { - if o == nil || o.ErrorMessage == nil { + if o == nil || IsNil(o.ErrorMessage) { var ret string return ret } @@ -355,7 +358,7 @@ func (o *PatchedPasswordPolicyRequest) GetErrorMessage() string { // GetErrorMessageOk returns a tuple with the ErrorMessage field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedPasswordPolicyRequest) GetErrorMessageOk() (*string, bool) { - if o == nil || o.ErrorMessage == nil { + if o == nil || IsNil(o.ErrorMessage) { return nil, false } return o.ErrorMessage, true @@ -363,7 +366,7 @@ func (o *PatchedPasswordPolicyRequest) GetErrorMessageOk() (*string, bool) { // HasErrorMessage returns a boolean if a field has been set. func (o *PatchedPasswordPolicyRequest) HasErrorMessage() bool { - if o != nil && o.ErrorMessage != nil { + if o != nil && !IsNil(o.ErrorMessage) { return true } @@ -377,7 +380,7 @@ func (o *PatchedPasswordPolicyRequest) SetErrorMessage(v string) { // GetCheckStaticRules returns the CheckStaticRules field value if set, zero value otherwise. func (o *PatchedPasswordPolicyRequest) GetCheckStaticRules() bool { - if o == nil || o.CheckStaticRules == nil { + if o == nil || IsNil(o.CheckStaticRules) { var ret bool return ret } @@ -387,7 +390,7 @@ func (o *PatchedPasswordPolicyRequest) GetCheckStaticRules() bool { // GetCheckStaticRulesOk returns a tuple with the CheckStaticRules field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedPasswordPolicyRequest) GetCheckStaticRulesOk() (*bool, bool) { - if o == nil || o.CheckStaticRules == nil { + if o == nil || IsNil(o.CheckStaticRules) { return nil, false } return o.CheckStaticRules, true @@ -395,7 +398,7 @@ func (o *PatchedPasswordPolicyRequest) GetCheckStaticRulesOk() (*bool, bool) { // HasCheckStaticRules returns a boolean if a field has been set. func (o *PatchedPasswordPolicyRequest) HasCheckStaticRules() bool { - if o != nil && o.CheckStaticRules != nil { + if o != nil && !IsNil(o.CheckStaticRules) { return true } @@ -409,7 +412,7 @@ func (o *PatchedPasswordPolicyRequest) SetCheckStaticRules(v bool) { // GetCheckHaveIBeenPwned returns the CheckHaveIBeenPwned field value if set, zero value otherwise. func (o *PatchedPasswordPolicyRequest) GetCheckHaveIBeenPwned() bool { - if o == nil || o.CheckHaveIBeenPwned == nil { + if o == nil || IsNil(o.CheckHaveIBeenPwned) { var ret bool return ret } @@ -419,7 +422,7 @@ func (o *PatchedPasswordPolicyRequest) GetCheckHaveIBeenPwned() bool { // GetCheckHaveIBeenPwnedOk returns a tuple with the CheckHaveIBeenPwned field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedPasswordPolicyRequest) GetCheckHaveIBeenPwnedOk() (*bool, bool) { - if o == nil || o.CheckHaveIBeenPwned == nil { + if o == nil || IsNil(o.CheckHaveIBeenPwned) { return nil, false } return o.CheckHaveIBeenPwned, true @@ -427,7 +430,7 @@ func (o *PatchedPasswordPolicyRequest) GetCheckHaveIBeenPwnedOk() (*bool, bool) // HasCheckHaveIBeenPwned returns a boolean if a field has been set. func (o *PatchedPasswordPolicyRequest) HasCheckHaveIBeenPwned() bool { - if o != nil && o.CheckHaveIBeenPwned != nil { + if o != nil && !IsNil(o.CheckHaveIBeenPwned) { return true } @@ -441,7 +444,7 @@ func (o *PatchedPasswordPolicyRequest) SetCheckHaveIBeenPwned(v bool) { // GetCheckZxcvbn returns the CheckZxcvbn field value if set, zero value otherwise. func (o *PatchedPasswordPolicyRequest) GetCheckZxcvbn() bool { - if o == nil || o.CheckZxcvbn == nil { + if o == nil || IsNil(o.CheckZxcvbn) { var ret bool return ret } @@ -451,7 +454,7 @@ func (o *PatchedPasswordPolicyRequest) GetCheckZxcvbn() bool { // GetCheckZxcvbnOk returns a tuple with the CheckZxcvbn field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedPasswordPolicyRequest) GetCheckZxcvbnOk() (*bool, bool) { - if o == nil || o.CheckZxcvbn == nil { + if o == nil || IsNil(o.CheckZxcvbn) { return nil, false } return o.CheckZxcvbn, true @@ -459,7 +462,7 @@ func (o *PatchedPasswordPolicyRequest) GetCheckZxcvbnOk() (*bool, bool) { // HasCheckZxcvbn returns a boolean if a field has been set. func (o *PatchedPasswordPolicyRequest) HasCheckZxcvbn() bool { - if o != nil && o.CheckZxcvbn != nil { + if o != nil && !IsNil(o.CheckZxcvbn) { return true } @@ -473,7 +476,7 @@ func (o *PatchedPasswordPolicyRequest) SetCheckZxcvbn(v bool) { // GetHibpAllowedCount returns the HibpAllowedCount field value if set, zero value otherwise. func (o *PatchedPasswordPolicyRequest) GetHibpAllowedCount() int32 { - if o == nil || o.HibpAllowedCount == nil { + if o == nil || IsNil(o.HibpAllowedCount) { var ret int32 return ret } @@ -483,7 +486,7 @@ func (o *PatchedPasswordPolicyRequest) GetHibpAllowedCount() int32 { // GetHibpAllowedCountOk returns a tuple with the HibpAllowedCount field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedPasswordPolicyRequest) GetHibpAllowedCountOk() (*int32, bool) { - if o == nil || o.HibpAllowedCount == nil { + if o == nil || IsNil(o.HibpAllowedCount) { return nil, false } return o.HibpAllowedCount, true @@ -491,7 +494,7 @@ func (o *PatchedPasswordPolicyRequest) GetHibpAllowedCountOk() (*int32, bool) { // HasHibpAllowedCount returns a boolean if a field has been set. func (o *PatchedPasswordPolicyRequest) HasHibpAllowedCount() bool { - if o != nil && o.HibpAllowedCount != nil { + if o != nil && !IsNil(o.HibpAllowedCount) { return true } @@ -505,7 +508,7 @@ func (o *PatchedPasswordPolicyRequest) SetHibpAllowedCount(v int32) { // GetZxcvbnScoreThreshold returns the ZxcvbnScoreThreshold field value if set, zero value otherwise. func (o *PatchedPasswordPolicyRequest) GetZxcvbnScoreThreshold() int32 { - if o == nil || o.ZxcvbnScoreThreshold == nil { + if o == nil || IsNil(o.ZxcvbnScoreThreshold) { var ret int32 return ret } @@ -515,7 +518,7 @@ func (o *PatchedPasswordPolicyRequest) GetZxcvbnScoreThreshold() int32 { // GetZxcvbnScoreThresholdOk returns a tuple with the ZxcvbnScoreThreshold field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedPasswordPolicyRequest) GetZxcvbnScoreThresholdOk() (*int32, bool) { - if o == nil || o.ZxcvbnScoreThreshold == nil { + if o == nil || IsNil(o.ZxcvbnScoreThreshold) { return nil, false } return o.ZxcvbnScoreThreshold, true @@ -523,7 +526,7 @@ func (o *PatchedPasswordPolicyRequest) GetZxcvbnScoreThresholdOk() (*int32, bool // HasZxcvbnScoreThreshold returns a boolean if a field has been set. func (o *PatchedPasswordPolicyRequest) HasZxcvbnScoreThreshold() bool { - if o != nil && o.ZxcvbnScoreThreshold != nil { + if o != nil && !IsNil(o.ZxcvbnScoreThreshold) { return true } @@ -536,53 +539,61 @@ func (o *PatchedPasswordPolicyRequest) SetZxcvbnScoreThreshold(v int32) { } func (o PatchedPasswordPolicyRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedPasswordPolicyRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.ExecutionLogging != nil { + if !IsNil(o.ExecutionLogging) { toSerialize["execution_logging"] = o.ExecutionLogging } - if o.PasswordField != nil { + if !IsNil(o.PasswordField) { toSerialize["password_field"] = o.PasswordField } - if o.AmountDigits != nil { + if !IsNil(o.AmountDigits) { toSerialize["amount_digits"] = o.AmountDigits } - if o.AmountUppercase != nil { + if !IsNil(o.AmountUppercase) { toSerialize["amount_uppercase"] = o.AmountUppercase } - if o.AmountLowercase != nil { + if !IsNil(o.AmountLowercase) { toSerialize["amount_lowercase"] = o.AmountLowercase } - if o.AmountSymbols != nil { + if !IsNil(o.AmountSymbols) { toSerialize["amount_symbols"] = o.AmountSymbols } - if o.LengthMin != nil { + if !IsNil(o.LengthMin) { toSerialize["length_min"] = o.LengthMin } - if o.SymbolCharset != nil { + if !IsNil(o.SymbolCharset) { toSerialize["symbol_charset"] = o.SymbolCharset } - if o.ErrorMessage != nil { + if !IsNil(o.ErrorMessage) { toSerialize["error_message"] = o.ErrorMessage } - if o.CheckStaticRules != nil { + if !IsNil(o.CheckStaticRules) { toSerialize["check_static_rules"] = o.CheckStaticRules } - if o.CheckHaveIBeenPwned != nil { + if !IsNil(o.CheckHaveIBeenPwned) { toSerialize["check_have_i_been_pwned"] = o.CheckHaveIBeenPwned } - if o.CheckZxcvbn != nil { + if !IsNil(o.CheckZxcvbn) { toSerialize["check_zxcvbn"] = o.CheckZxcvbn } - if o.HibpAllowedCount != nil { + if !IsNil(o.HibpAllowedCount) { toSerialize["hibp_allowed_count"] = o.HibpAllowedCount } - if o.ZxcvbnScoreThreshold != nil { + if !IsNil(o.ZxcvbnScoreThreshold) { toSerialize["zxcvbn_score_threshold"] = o.ZxcvbnScoreThreshold } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedPasswordPolicyRequest struct { diff --git a/model_patched_password_stage_request.go b/model_patched_password_stage_request.go index 6a01a3504..f1dea4191 100644 --- a/model_patched_password_stage_request.go +++ b/model_patched_password_stage_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedPasswordStageRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedPasswordStageRequest{} + // PatchedPasswordStageRequest PasswordStage Serializer type PatchedPasswordStageRequest struct { Name *string `json:"name,omitempty"` @@ -46,7 +49,7 @@ func NewPatchedPasswordStageRequestWithDefaults() *PatchedPasswordStageRequest { // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedPasswordStageRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -56,7 +59,7 @@ func (o *PatchedPasswordStageRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedPasswordStageRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -64,7 +67,7 @@ func (o *PatchedPasswordStageRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedPasswordStageRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -78,7 +81,7 @@ func (o *PatchedPasswordStageRequest) SetName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *PatchedPasswordStageRequest) GetFlowSet() []FlowSetRequest { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSetRequest return ret } @@ -88,7 +91,7 @@ func (o *PatchedPasswordStageRequest) GetFlowSet() []FlowSetRequest { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedPasswordStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -96,7 +99,7 @@ func (o *PatchedPasswordStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { // HasFlowSet returns a boolean if a field has been set. func (o *PatchedPasswordStageRequest) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -110,7 +113,7 @@ func (o *PatchedPasswordStageRequest) SetFlowSet(v []FlowSetRequest) { // GetBackends returns the Backends field value if set, zero value otherwise. func (o *PatchedPasswordStageRequest) GetBackends() []BackendsEnum { - if o == nil || o.Backends == nil { + if o == nil || IsNil(o.Backends) { var ret []BackendsEnum return ret } @@ -120,7 +123,7 @@ func (o *PatchedPasswordStageRequest) GetBackends() []BackendsEnum { // GetBackendsOk returns a tuple with the Backends field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedPasswordStageRequest) GetBackendsOk() ([]BackendsEnum, bool) { - if o == nil || o.Backends == nil { + if o == nil || IsNil(o.Backends) { return nil, false } return o.Backends, true @@ -128,7 +131,7 @@ func (o *PatchedPasswordStageRequest) GetBackendsOk() ([]BackendsEnum, bool) { // HasBackends returns a boolean if a field has been set. func (o *PatchedPasswordStageRequest) HasBackends() bool { - if o != nil && o.Backends != nil { + if o != nil && !IsNil(o.Backends) { return true } @@ -142,7 +145,7 @@ func (o *PatchedPasswordStageRequest) SetBackends(v []BackendsEnum) { // GetConfigureFlow returns the ConfigureFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedPasswordStageRequest) GetConfigureFlow() string { - if o == nil || o.ConfigureFlow.Get() == nil { + if o == nil || IsNil(o.ConfigureFlow.Get()) { var ret string return ret } @@ -185,7 +188,7 @@ func (o *PatchedPasswordStageRequest) UnsetConfigureFlow() { // GetFailedAttemptsBeforeCancel returns the FailedAttemptsBeforeCancel field value if set, zero value otherwise. func (o *PatchedPasswordStageRequest) GetFailedAttemptsBeforeCancel() int32 { - if o == nil || o.FailedAttemptsBeforeCancel == nil { + if o == nil || IsNil(o.FailedAttemptsBeforeCancel) { var ret int32 return ret } @@ -195,7 +198,7 @@ func (o *PatchedPasswordStageRequest) GetFailedAttemptsBeforeCancel() int32 { // GetFailedAttemptsBeforeCancelOk returns a tuple with the FailedAttemptsBeforeCancel field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedPasswordStageRequest) GetFailedAttemptsBeforeCancelOk() (*int32, bool) { - if o == nil || o.FailedAttemptsBeforeCancel == nil { + if o == nil || IsNil(o.FailedAttemptsBeforeCancel) { return nil, false } return o.FailedAttemptsBeforeCancel, true @@ -203,7 +206,7 @@ func (o *PatchedPasswordStageRequest) GetFailedAttemptsBeforeCancelOk() (*int32, // HasFailedAttemptsBeforeCancel returns a boolean if a field has been set. func (o *PatchedPasswordStageRequest) HasFailedAttemptsBeforeCancel() bool { - if o != nil && o.FailedAttemptsBeforeCancel != nil { + if o != nil && !IsNil(o.FailedAttemptsBeforeCancel) { return true } @@ -216,23 +219,31 @@ func (o *PatchedPasswordStageRequest) SetFailedAttemptsBeforeCancel(v int32) { } func (o PatchedPasswordStageRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedPasswordStageRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.FlowSet != nil { + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } - if o.Backends != nil { + if !IsNil(o.Backends) { toSerialize["backends"] = o.Backends } if o.ConfigureFlow.IsSet() { toSerialize["configure_flow"] = o.ConfigureFlow.Get() } - if o.FailedAttemptsBeforeCancel != nil { + if !IsNil(o.FailedAttemptsBeforeCancel) { toSerialize["failed_attempts_before_cancel"] = o.FailedAttemptsBeforeCancel } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedPasswordStageRequest struct { diff --git a/model_patched_plex_source_connection_request.go b/model_patched_plex_source_connection_request.go index 2ebe16ea8..d5465dfeb 100644 --- a/model_patched_plex_source_connection_request.go +++ b/model_patched_plex_source_connection_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedPlexSourceConnectionRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedPlexSourceConnectionRequest{} + // PatchedPlexSourceConnectionRequest Plex Source connection Serializer type PatchedPlexSourceConnectionRequest struct { Identifier *string `json:"identifier,omitempty"` @@ -40,7 +43,7 @@ func NewPatchedPlexSourceConnectionRequestWithDefaults() *PatchedPlexSourceConne // GetIdentifier returns the Identifier field value if set, zero value otherwise. func (o *PatchedPlexSourceConnectionRequest) GetIdentifier() string { - if o == nil || o.Identifier == nil { + if o == nil || IsNil(o.Identifier) { var ret string return ret } @@ -50,7 +53,7 @@ func (o *PatchedPlexSourceConnectionRequest) GetIdentifier() string { // GetIdentifierOk returns a tuple with the Identifier field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedPlexSourceConnectionRequest) GetIdentifierOk() (*string, bool) { - if o == nil || o.Identifier == nil { + if o == nil || IsNil(o.Identifier) { return nil, false } return o.Identifier, true @@ -58,7 +61,7 @@ func (o *PatchedPlexSourceConnectionRequest) GetIdentifierOk() (*string, bool) { // HasIdentifier returns a boolean if a field has been set. func (o *PatchedPlexSourceConnectionRequest) HasIdentifier() bool { - if o != nil && o.Identifier != nil { + if o != nil && !IsNil(o.Identifier) { return true } @@ -72,7 +75,7 @@ func (o *PatchedPlexSourceConnectionRequest) SetIdentifier(v string) { // GetPlexToken returns the PlexToken field value if set, zero value otherwise. func (o *PatchedPlexSourceConnectionRequest) GetPlexToken() string { - if o == nil || o.PlexToken == nil { + if o == nil || IsNil(o.PlexToken) { var ret string return ret } @@ -82,7 +85,7 @@ func (o *PatchedPlexSourceConnectionRequest) GetPlexToken() string { // GetPlexTokenOk returns a tuple with the PlexToken field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedPlexSourceConnectionRequest) GetPlexTokenOk() (*string, bool) { - if o == nil || o.PlexToken == nil { + if o == nil || IsNil(o.PlexToken) { return nil, false } return o.PlexToken, true @@ -90,7 +93,7 @@ func (o *PatchedPlexSourceConnectionRequest) GetPlexTokenOk() (*string, bool) { // HasPlexToken returns a boolean if a field has been set. func (o *PatchedPlexSourceConnectionRequest) HasPlexToken() bool { - if o != nil && o.PlexToken != nil { + if o != nil && !IsNil(o.PlexToken) { return true } @@ -103,14 +106,22 @@ func (o *PatchedPlexSourceConnectionRequest) SetPlexToken(v string) { } func (o PatchedPlexSourceConnectionRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedPlexSourceConnectionRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Identifier != nil { + if !IsNil(o.Identifier) { toSerialize["identifier"] = o.Identifier } - if o.PlexToken != nil { + if !IsNil(o.PlexToken) { toSerialize["plex_token"] = o.PlexToken } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedPlexSourceConnectionRequest struct { diff --git a/model_patched_plex_source_request.go b/model_patched_plex_source_request.go index 4f6e40b33..bddcaf9a1 100644 --- a/model_patched_plex_source_request.go +++ b/model_patched_plex_source_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedPlexSourceRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedPlexSourceRequest{} + // PatchedPlexSourceRequest Plex Source Serializer type PatchedPlexSourceRequest struct { // Source's display Name. @@ -25,11 +28,10 @@ type PatchedPlexSourceRequest struct { // Flow to use when authenticating existing users. AuthenticationFlow NullableString `json:"authentication_flow,omitempty"` // Flow to use when enrolling new users. - EnrollmentFlow NullableString `json:"enrollment_flow,omitempty"` - PolicyEngineMode *PolicyEngineMode `json:"policy_engine_mode,omitempty"` - // How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. - UserMatchingMode NullableUserMatchingModeEnum `json:"user_matching_mode,omitempty"` - UserPathTemplate *string `json:"user_path_template,omitempty"` + EnrollmentFlow NullableString `json:"enrollment_flow,omitempty"` + PolicyEngineMode *PolicyEngineMode `json:"policy_engine_mode,omitempty"` + UserMatchingMode *UserMatchingModeEnum `json:"user_matching_mode,omitempty"` + UserPathTemplate *string `json:"user_path_template,omitempty"` // Client identifier used to talk to Plex. ClientId *string `json:"client_id,omitempty"` // Which servers a user has to be a member of to be granted access. Empty list allows every server. @@ -59,7 +61,7 @@ func NewPatchedPlexSourceRequestWithDefaults() *PatchedPlexSourceRequest { // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedPlexSourceRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -69,7 +71,7 @@ func (o *PatchedPlexSourceRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedPlexSourceRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -77,7 +79,7 @@ func (o *PatchedPlexSourceRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedPlexSourceRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -91,7 +93,7 @@ func (o *PatchedPlexSourceRequest) SetName(v string) { // GetSlug returns the Slug field value if set, zero value otherwise. func (o *PatchedPlexSourceRequest) GetSlug() string { - if o == nil || o.Slug == nil { + if o == nil || IsNil(o.Slug) { var ret string return ret } @@ -101,7 +103,7 @@ func (o *PatchedPlexSourceRequest) GetSlug() string { // GetSlugOk returns a tuple with the Slug field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedPlexSourceRequest) GetSlugOk() (*string, bool) { - if o == nil || o.Slug == nil { + if o == nil || IsNil(o.Slug) { return nil, false } return o.Slug, true @@ -109,7 +111,7 @@ func (o *PatchedPlexSourceRequest) GetSlugOk() (*string, bool) { // HasSlug returns a boolean if a field has been set. func (o *PatchedPlexSourceRequest) HasSlug() bool { - if o != nil && o.Slug != nil { + if o != nil && !IsNil(o.Slug) { return true } @@ -123,7 +125,7 @@ func (o *PatchedPlexSourceRequest) SetSlug(v string) { // GetEnabled returns the Enabled field value if set, zero value otherwise. func (o *PatchedPlexSourceRequest) GetEnabled() bool { - if o == nil || o.Enabled == nil { + if o == nil || IsNil(o.Enabled) { var ret bool return ret } @@ -133,7 +135,7 @@ func (o *PatchedPlexSourceRequest) GetEnabled() bool { // GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedPlexSourceRequest) GetEnabledOk() (*bool, bool) { - if o == nil || o.Enabled == nil { + if o == nil || IsNil(o.Enabled) { return nil, false } return o.Enabled, true @@ -141,7 +143,7 @@ func (o *PatchedPlexSourceRequest) GetEnabledOk() (*bool, bool) { // HasEnabled returns a boolean if a field has been set. func (o *PatchedPlexSourceRequest) HasEnabled() bool { - if o != nil && o.Enabled != nil { + if o != nil && !IsNil(o.Enabled) { return true } @@ -155,7 +157,7 @@ func (o *PatchedPlexSourceRequest) SetEnabled(v bool) { // GetAuthenticationFlow returns the AuthenticationFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedPlexSourceRequest) GetAuthenticationFlow() string { - if o == nil || o.AuthenticationFlow.Get() == nil { + if o == nil || IsNil(o.AuthenticationFlow.Get()) { var ret string return ret } @@ -198,7 +200,7 @@ func (o *PatchedPlexSourceRequest) UnsetAuthenticationFlow() { // GetEnrollmentFlow returns the EnrollmentFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedPlexSourceRequest) GetEnrollmentFlow() string { - if o == nil || o.EnrollmentFlow.Get() == nil { + if o == nil || IsNil(o.EnrollmentFlow.Get()) { var ret string return ret } @@ -241,7 +243,7 @@ func (o *PatchedPlexSourceRequest) UnsetEnrollmentFlow() { // GetPolicyEngineMode returns the PolicyEngineMode field value if set, zero value otherwise. func (o *PatchedPlexSourceRequest) GetPolicyEngineMode() PolicyEngineMode { - if o == nil || o.PolicyEngineMode == nil { + if o == nil || IsNil(o.PolicyEngineMode) { var ret PolicyEngineMode return ret } @@ -251,7 +253,7 @@ func (o *PatchedPlexSourceRequest) GetPolicyEngineMode() PolicyEngineMode { // GetPolicyEngineModeOk returns a tuple with the PolicyEngineMode field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedPlexSourceRequest) GetPolicyEngineModeOk() (*PolicyEngineMode, bool) { - if o == nil || o.PolicyEngineMode == nil { + if o == nil || IsNil(o.PolicyEngineMode) { return nil, false } return o.PolicyEngineMode, true @@ -259,7 +261,7 @@ func (o *PatchedPlexSourceRequest) GetPolicyEngineModeOk() (*PolicyEngineMode, b // HasPolicyEngineMode returns a boolean if a field has been set. func (o *PatchedPlexSourceRequest) HasPolicyEngineMode() bool { - if o != nil && o.PolicyEngineMode != nil { + if o != nil && !IsNil(o.PolicyEngineMode) { return true } @@ -271,52 +273,41 @@ func (o *PatchedPlexSourceRequest) SetPolicyEngineMode(v PolicyEngineMode) { o.PolicyEngineMode = &v } -// GetUserMatchingMode returns the UserMatchingMode field value if set, zero value otherwise (both if not set or set to explicit null). +// GetUserMatchingMode returns the UserMatchingMode field value if set, zero value otherwise. func (o *PatchedPlexSourceRequest) GetUserMatchingMode() UserMatchingModeEnum { - if o == nil || o.UserMatchingMode.Get() == nil { + if o == nil || IsNil(o.UserMatchingMode) { var ret UserMatchingModeEnum return ret } - return *o.UserMatchingMode.Get() + return *o.UserMatchingMode } // GetUserMatchingModeOk returns a tuple with the UserMatchingMode field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PatchedPlexSourceRequest) GetUserMatchingModeOk() (*UserMatchingModeEnum, bool) { - if o == nil { + if o == nil || IsNil(o.UserMatchingMode) { return nil, false } - return o.UserMatchingMode.Get(), o.UserMatchingMode.IsSet() + return o.UserMatchingMode, true } // HasUserMatchingMode returns a boolean if a field has been set. func (o *PatchedPlexSourceRequest) HasUserMatchingMode() bool { - if o != nil && o.UserMatchingMode.IsSet() { + if o != nil && !IsNil(o.UserMatchingMode) { return true } return false } -// SetUserMatchingMode gets a reference to the given NullableUserMatchingModeEnum and assigns it to the UserMatchingMode field. +// SetUserMatchingMode gets a reference to the given UserMatchingModeEnum and assigns it to the UserMatchingMode field. func (o *PatchedPlexSourceRequest) SetUserMatchingMode(v UserMatchingModeEnum) { - o.UserMatchingMode.Set(&v) -} - -// SetUserMatchingModeNil sets the value for UserMatchingMode to be an explicit nil -func (o *PatchedPlexSourceRequest) SetUserMatchingModeNil() { - o.UserMatchingMode.Set(nil) -} - -// UnsetUserMatchingMode ensures that no value is present for UserMatchingMode, not even an explicit nil -func (o *PatchedPlexSourceRequest) UnsetUserMatchingMode() { - o.UserMatchingMode.Unset() + o.UserMatchingMode = &v } // GetUserPathTemplate returns the UserPathTemplate field value if set, zero value otherwise. func (o *PatchedPlexSourceRequest) GetUserPathTemplate() string { - if o == nil || o.UserPathTemplate == nil { + if o == nil || IsNil(o.UserPathTemplate) { var ret string return ret } @@ -326,7 +317,7 @@ func (o *PatchedPlexSourceRequest) GetUserPathTemplate() string { // GetUserPathTemplateOk returns a tuple with the UserPathTemplate field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedPlexSourceRequest) GetUserPathTemplateOk() (*string, bool) { - if o == nil || o.UserPathTemplate == nil { + if o == nil || IsNil(o.UserPathTemplate) { return nil, false } return o.UserPathTemplate, true @@ -334,7 +325,7 @@ func (o *PatchedPlexSourceRequest) GetUserPathTemplateOk() (*string, bool) { // HasUserPathTemplate returns a boolean if a field has been set. func (o *PatchedPlexSourceRequest) HasUserPathTemplate() bool { - if o != nil && o.UserPathTemplate != nil { + if o != nil && !IsNil(o.UserPathTemplate) { return true } @@ -348,7 +339,7 @@ func (o *PatchedPlexSourceRequest) SetUserPathTemplate(v string) { // GetClientId returns the ClientId field value if set, zero value otherwise. func (o *PatchedPlexSourceRequest) GetClientId() string { - if o == nil || o.ClientId == nil { + if o == nil || IsNil(o.ClientId) { var ret string return ret } @@ -358,7 +349,7 @@ func (o *PatchedPlexSourceRequest) GetClientId() string { // GetClientIdOk returns a tuple with the ClientId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedPlexSourceRequest) GetClientIdOk() (*string, bool) { - if o == nil || o.ClientId == nil { + if o == nil || IsNil(o.ClientId) { return nil, false } return o.ClientId, true @@ -366,7 +357,7 @@ func (o *PatchedPlexSourceRequest) GetClientIdOk() (*string, bool) { // HasClientId returns a boolean if a field has been set. func (o *PatchedPlexSourceRequest) HasClientId() bool { - if o != nil && o.ClientId != nil { + if o != nil && !IsNil(o.ClientId) { return true } @@ -380,7 +371,7 @@ func (o *PatchedPlexSourceRequest) SetClientId(v string) { // GetAllowedServers returns the AllowedServers field value if set, zero value otherwise. func (o *PatchedPlexSourceRequest) GetAllowedServers() []string { - if o == nil || o.AllowedServers == nil { + if o == nil || IsNil(o.AllowedServers) { var ret []string return ret } @@ -390,7 +381,7 @@ func (o *PatchedPlexSourceRequest) GetAllowedServers() []string { // GetAllowedServersOk returns a tuple with the AllowedServers field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedPlexSourceRequest) GetAllowedServersOk() ([]string, bool) { - if o == nil || o.AllowedServers == nil { + if o == nil || IsNil(o.AllowedServers) { return nil, false } return o.AllowedServers, true @@ -398,7 +389,7 @@ func (o *PatchedPlexSourceRequest) GetAllowedServersOk() ([]string, bool) { // HasAllowedServers returns a boolean if a field has been set. func (o *PatchedPlexSourceRequest) HasAllowedServers() bool { - if o != nil && o.AllowedServers != nil { + if o != nil && !IsNil(o.AllowedServers) { return true } @@ -412,7 +403,7 @@ func (o *PatchedPlexSourceRequest) SetAllowedServers(v []string) { // GetAllowFriends returns the AllowFriends field value if set, zero value otherwise. func (o *PatchedPlexSourceRequest) GetAllowFriends() bool { - if o == nil || o.AllowFriends == nil { + if o == nil || IsNil(o.AllowFriends) { var ret bool return ret } @@ -422,7 +413,7 @@ func (o *PatchedPlexSourceRequest) GetAllowFriends() bool { // GetAllowFriendsOk returns a tuple with the AllowFriends field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedPlexSourceRequest) GetAllowFriendsOk() (*bool, bool) { - if o == nil || o.AllowFriends == nil { + if o == nil || IsNil(o.AllowFriends) { return nil, false } return o.AllowFriends, true @@ -430,7 +421,7 @@ func (o *PatchedPlexSourceRequest) GetAllowFriendsOk() (*bool, bool) { // HasAllowFriends returns a boolean if a field has been set. func (o *PatchedPlexSourceRequest) HasAllowFriends() bool { - if o != nil && o.AllowFriends != nil { + if o != nil && !IsNil(o.AllowFriends) { return true } @@ -444,7 +435,7 @@ func (o *PatchedPlexSourceRequest) SetAllowFriends(v bool) { // GetPlexToken returns the PlexToken field value if set, zero value otherwise. func (o *PatchedPlexSourceRequest) GetPlexToken() string { - if o == nil || o.PlexToken == nil { + if o == nil || IsNil(o.PlexToken) { var ret string return ret } @@ -454,7 +445,7 @@ func (o *PatchedPlexSourceRequest) GetPlexToken() string { // GetPlexTokenOk returns a tuple with the PlexToken field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedPlexSourceRequest) GetPlexTokenOk() (*string, bool) { - if o == nil || o.PlexToken == nil { + if o == nil || IsNil(o.PlexToken) { return nil, false } return o.PlexToken, true @@ -462,7 +453,7 @@ func (o *PatchedPlexSourceRequest) GetPlexTokenOk() (*string, bool) { // HasPlexToken returns a boolean if a field has been set. func (o *PatchedPlexSourceRequest) HasPlexToken() bool { - if o != nil && o.PlexToken != nil { + if o != nil && !IsNil(o.PlexToken) { return true } @@ -475,14 +466,22 @@ func (o *PatchedPlexSourceRequest) SetPlexToken(v string) { } func (o PatchedPlexSourceRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedPlexSourceRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.Slug != nil { + if !IsNil(o.Slug) { toSerialize["slug"] = o.Slug } - if o.Enabled != nil { + if !IsNil(o.Enabled) { toSerialize["enabled"] = o.Enabled } if o.AuthenticationFlow.IsSet() { @@ -491,28 +490,28 @@ func (o PatchedPlexSourceRequest) MarshalJSON() ([]byte, error) { if o.EnrollmentFlow.IsSet() { toSerialize["enrollment_flow"] = o.EnrollmentFlow.Get() } - if o.PolicyEngineMode != nil { + if !IsNil(o.PolicyEngineMode) { toSerialize["policy_engine_mode"] = o.PolicyEngineMode } - if o.UserMatchingMode.IsSet() { - toSerialize["user_matching_mode"] = o.UserMatchingMode.Get() + if !IsNil(o.UserMatchingMode) { + toSerialize["user_matching_mode"] = o.UserMatchingMode } - if o.UserPathTemplate != nil { + if !IsNil(o.UserPathTemplate) { toSerialize["user_path_template"] = o.UserPathTemplate } - if o.ClientId != nil { + if !IsNil(o.ClientId) { toSerialize["client_id"] = o.ClientId } - if o.AllowedServers != nil { + if !IsNil(o.AllowedServers) { toSerialize["allowed_servers"] = o.AllowedServers } - if o.AllowFriends != nil { + if !IsNil(o.AllowFriends) { toSerialize["allow_friends"] = o.AllowFriends } - if o.PlexToken != nil { + if !IsNil(o.PlexToken) { toSerialize["plex_token"] = o.PlexToken } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedPlexSourceRequest struct { diff --git a/model_patched_policy_binding_request.go b/model_patched_policy_binding_request.go index edbaae170..78751b3c5 100644 --- a/model_patched_policy_binding_request.go +++ b/model_patched_policy_binding_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedPolicyBindingRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedPolicyBindingRequest{} + // PatchedPolicyBindingRequest PolicyBinding Serializer type PatchedPolicyBindingRequest struct { Policy NullableString `json:"policy,omitempty"` @@ -48,7 +51,7 @@ func NewPatchedPolicyBindingRequestWithDefaults() *PatchedPolicyBindingRequest { // GetPolicy returns the Policy field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedPolicyBindingRequest) GetPolicy() string { - if o == nil || o.Policy.Get() == nil { + if o == nil || IsNil(o.Policy.Get()) { var ret string return ret } @@ -91,7 +94,7 @@ func (o *PatchedPolicyBindingRequest) UnsetPolicy() { // GetGroup returns the Group field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedPolicyBindingRequest) GetGroup() string { - if o == nil || o.Group.Get() == nil { + if o == nil || IsNil(o.Group.Get()) { var ret string return ret } @@ -134,7 +137,7 @@ func (o *PatchedPolicyBindingRequest) UnsetGroup() { // GetUser returns the User field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedPolicyBindingRequest) GetUser() int32 { - if o == nil || o.User.Get() == nil { + if o == nil || IsNil(o.User.Get()) { var ret int32 return ret } @@ -177,7 +180,7 @@ func (o *PatchedPolicyBindingRequest) UnsetUser() { // GetTarget returns the Target field value if set, zero value otherwise. func (o *PatchedPolicyBindingRequest) GetTarget() string { - if o == nil || o.Target == nil { + if o == nil || IsNil(o.Target) { var ret string return ret } @@ -187,7 +190,7 @@ func (o *PatchedPolicyBindingRequest) GetTarget() string { // GetTargetOk returns a tuple with the Target field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedPolicyBindingRequest) GetTargetOk() (*string, bool) { - if o == nil || o.Target == nil { + if o == nil || IsNil(o.Target) { return nil, false } return o.Target, true @@ -195,7 +198,7 @@ func (o *PatchedPolicyBindingRequest) GetTargetOk() (*string, bool) { // HasTarget returns a boolean if a field has been set. func (o *PatchedPolicyBindingRequest) HasTarget() bool { - if o != nil && o.Target != nil { + if o != nil && !IsNil(o.Target) { return true } @@ -209,7 +212,7 @@ func (o *PatchedPolicyBindingRequest) SetTarget(v string) { // GetNegate returns the Negate field value if set, zero value otherwise. func (o *PatchedPolicyBindingRequest) GetNegate() bool { - if o == nil || o.Negate == nil { + if o == nil || IsNil(o.Negate) { var ret bool return ret } @@ -219,7 +222,7 @@ func (o *PatchedPolicyBindingRequest) GetNegate() bool { // GetNegateOk returns a tuple with the Negate field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedPolicyBindingRequest) GetNegateOk() (*bool, bool) { - if o == nil || o.Negate == nil { + if o == nil || IsNil(o.Negate) { return nil, false } return o.Negate, true @@ -227,7 +230,7 @@ func (o *PatchedPolicyBindingRequest) GetNegateOk() (*bool, bool) { // HasNegate returns a boolean if a field has been set. func (o *PatchedPolicyBindingRequest) HasNegate() bool { - if o != nil && o.Negate != nil { + if o != nil && !IsNil(o.Negate) { return true } @@ -241,7 +244,7 @@ func (o *PatchedPolicyBindingRequest) SetNegate(v bool) { // GetEnabled returns the Enabled field value if set, zero value otherwise. func (o *PatchedPolicyBindingRequest) GetEnabled() bool { - if o == nil || o.Enabled == nil { + if o == nil || IsNil(o.Enabled) { var ret bool return ret } @@ -251,7 +254,7 @@ func (o *PatchedPolicyBindingRequest) GetEnabled() bool { // GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedPolicyBindingRequest) GetEnabledOk() (*bool, bool) { - if o == nil || o.Enabled == nil { + if o == nil || IsNil(o.Enabled) { return nil, false } return o.Enabled, true @@ -259,7 +262,7 @@ func (o *PatchedPolicyBindingRequest) GetEnabledOk() (*bool, bool) { // HasEnabled returns a boolean if a field has been set. func (o *PatchedPolicyBindingRequest) HasEnabled() bool { - if o != nil && o.Enabled != nil { + if o != nil && !IsNil(o.Enabled) { return true } @@ -273,7 +276,7 @@ func (o *PatchedPolicyBindingRequest) SetEnabled(v bool) { // GetOrder returns the Order field value if set, zero value otherwise. func (o *PatchedPolicyBindingRequest) GetOrder() int32 { - if o == nil || o.Order == nil { + if o == nil || IsNil(o.Order) { var ret int32 return ret } @@ -283,7 +286,7 @@ func (o *PatchedPolicyBindingRequest) GetOrder() int32 { // GetOrderOk returns a tuple with the Order field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedPolicyBindingRequest) GetOrderOk() (*int32, bool) { - if o == nil || o.Order == nil { + if o == nil || IsNil(o.Order) { return nil, false } return o.Order, true @@ -291,7 +294,7 @@ func (o *PatchedPolicyBindingRequest) GetOrderOk() (*int32, bool) { // HasOrder returns a boolean if a field has been set. func (o *PatchedPolicyBindingRequest) HasOrder() bool { - if o != nil && o.Order != nil { + if o != nil && !IsNil(o.Order) { return true } @@ -305,7 +308,7 @@ func (o *PatchedPolicyBindingRequest) SetOrder(v int32) { // GetTimeout returns the Timeout field value if set, zero value otherwise. func (o *PatchedPolicyBindingRequest) GetTimeout() int32 { - if o == nil || o.Timeout == nil { + if o == nil || IsNil(o.Timeout) { var ret int32 return ret } @@ -315,7 +318,7 @@ func (o *PatchedPolicyBindingRequest) GetTimeout() int32 { // GetTimeoutOk returns a tuple with the Timeout field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedPolicyBindingRequest) GetTimeoutOk() (*int32, bool) { - if o == nil || o.Timeout == nil { + if o == nil || IsNil(o.Timeout) { return nil, false } return o.Timeout, true @@ -323,7 +326,7 @@ func (o *PatchedPolicyBindingRequest) GetTimeoutOk() (*int32, bool) { // HasTimeout returns a boolean if a field has been set. func (o *PatchedPolicyBindingRequest) HasTimeout() bool { - if o != nil && o.Timeout != nil { + if o != nil && !IsNil(o.Timeout) { return true } @@ -336,6 +339,14 @@ func (o *PatchedPolicyBindingRequest) SetTimeout(v int32) { } func (o PatchedPolicyBindingRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedPolicyBindingRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Policy.IsSet() { toSerialize["policy"] = o.Policy.Get() @@ -346,22 +357,22 @@ func (o PatchedPolicyBindingRequest) MarshalJSON() ([]byte, error) { if o.User.IsSet() { toSerialize["user"] = o.User.Get() } - if o.Target != nil { + if !IsNil(o.Target) { toSerialize["target"] = o.Target } - if o.Negate != nil { + if !IsNil(o.Negate) { toSerialize["negate"] = o.Negate } - if o.Enabled != nil { + if !IsNil(o.Enabled) { toSerialize["enabled"] = o.Enabled } - if o.Order != nil { + if !IsNil(o.Order) { toSerialize["order"] = o.Order } - if o.Timeout != nil { + if !IsNil(o.Timeout) { toSerialize["timeout"] = o.Timeout } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedPolicyBindingRequest struct { diff --git a/model_patched_prompt_request.go b/model_patched_prompt_request.go index 6551ee028..b747ae69b 100644 --- a/model_patched_prompt_request.go +++ b/model_patched_prompt_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedPromptRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedPromptRequest{} + // PatchedPromptRequest Prompt Serializer type PatchedPromptRequest struct { Name *string `json:"name,omitempty"` @@ -50,7 +53,7 @@ func NewPatchedPromptRequestWithDefaults() *PatchedPromptRequest { // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedPromptRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -60,7 +63,7 @@ func (o *PatchedPromptRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedPromptRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -68,7 +71,7 @@ func (o *PatchedPromptRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedPromptRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -82,7 +85,7 @@ func (o *PatchedPromptRequest) SetName(v string) { // GetFieldKey returns the FieldKey field value if set, zero value otherwise. func (o *PatchedPromptRequest) GetFieldKey() string { - if o == nil || o.FieldKey == nil { + if o == nil || IsNil(o.FieldKey) { var ret string return ret } @@ -92,7 +95,7 @@ func (o *PatchedPromptRequest) GetFieldKey() string { // GetFieldKeyOk returns a tuple with the FieldKey field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedPromptRequest) GetFieldKeyOk() (*string, bool) { - if o == nil || o.FieldKey == nil { + if o == nil || IsNil(o.FieldKey) { return nil, false } return o.FieldKey, true @@ -100,7 +103,7 @@ func (o *PatchedPromptRequest) GetFieldKeyOk() (*string, bool) { // HasFieldKey returns a boolean if a field has been set. func (o *PatchedPromptRequest) HasFieldKey() bool { - if o != nil && o.FieldKey != nil { + if o != nil && !IsNil(o.FieldKey) { return true } @@ -114,7 +117,7 @@ func (o *PatchedPromptRequest) SetFieldKey(v string) { // GetLabel returns the Label field value if set, zero value otherwise. func (o *PatchedPromptRequest) GetLabel() string { - if o == nil || o.Label == nil { + if o == nil || IsNil(o.Label) { var ret string return ret } @@ -124,7 +127,7 @@ func (o *PatchedPromptRequest) GetLabel() string { // GetLabelOk returns a tuple with the Label field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedPromptRequest) GetLabelOk() (*string, bool) { - if o == nil || o.Label == nil { + if o == nil || IsNil(o.Label) { return nil, false } return o.Label, true @@ -132,7 +135,7 @@ func (o *PatchedPromptRequest) GetLabelOk() (*string, bool) { // HasLabel returns a boolean if a field has been set. func (o *PatchedPromptRequest) HasLabel() bool { - if o != nil && o.Label != nil { + if o != nil && !IsNil(o.Label) { return true } @@ -146,7 +149,7 @@ func (o *PatchedPromptRequest) SetLabel(v string) { // GetType returns the Type field value if set, zero value otherwise. func (o *PatchedPromptRequest) GetType() PromptTypeEnum { - if o == nil || o.Type == nil { + if o == nil || IsNil(o.Type) { var ret PromptTypeEnum return ret } @@ -156,7 +159,7 @@ func (o *PatchedPromptRequest) GetType() PromptTypeEnum { // GetTypeOk returns a tuple with the Type field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedPromptRequest) GetTypeOk() (*PromptTypeEnum, bool) { - if o == nil || o.Type == nil { + if o == nil || IsNil(o.Type) { return nil, false } return o.Type, true @@ -164,7 +167,7 @@ func (o *PatchedPromptRequest) GetTypeOk() (*PromptTypeEnum, bool) { // HasType returns a boolean if a field has been set. func (o *PatchedPromptRequest) HasType() bool { - if o != nil && o.Type != nil { + if o != nil && !IsNil(o.Type) { return true } @@ -178,7 +181,7 @@ func (o *PatchedPromptRequest) SetType(v PromptTypeEnum) { // GetRequired returns the Required field value if set, zero value otherwise. func (o *PatchedPromptRequest) GetRequired() bool { - if o == nil || o.Required == nil { + if o == nil || IsNil(o.Required) { var ret bool return ret } @@ -188,7 +191,7 @@ func (o *PatchedPromptRequest) GetRequired() bool { // GetRequiredOk returns a tuple with the Required field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedPromptRequest) GetRequiredOk() (*bool, bool) { - if o == nil || o.Required == nil { + if o == nil || IsNil(o.Required) { return nil, false } return o.Required, true @@ -196,7 +199,7 @@ func (o *PatchedPromptRequest) GetRequiredOk() (*bool, bool) { // HasRequired returns a boolean if a field has been set. func (o *PatchedPromptRequest) HasRequired() bool { - if o != nil && o.Required != nil { + if o != nil && !IsNil(o.Required) { return true } @@ -210,7 +213,7 @@ func (o *PatchedPromptRequest) SetRequired(v bool) { // GetPlaceholder returns the Placeholder field value if set, zero value otherwise. func (o *PatchedPromptRequest) GetPlaceholder() string { - if o == nil || o.Placeholder == nil { + if o == nil || IsNil(o.Placeholder) { var ret string return ret } @@ -220,7 +223,7 @@ func (o *PatchedPromptRequest) GetPlaceholder() string { // GetPlaceholderOk returns a tuple with the Placeholder field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedPromptRequest) GetPlaceholderOk() (*string, bool) { - if o == nil || o.Placeholder == nil { + if o == nil || IsNil(o.Placeholder) { return nil, false } return o.Placeholder, true @@ -228,7 +231,7 @@ func (o *PatchedPromptRequest) GetPlaceholderOk() (*string, bool) { // HasPlaceholder returns a boolean if a field has been set. func (o *PatchedPromptRequest) HasPlaceholder() bool { - if o != nil && o.Placeholder != nil { + if o != nil && !IsNil(o.Placeholder) { return true } @@ -242,7 +245,7 @@ func (o *PatchedPromptRequest) SetPlaceholder(v string) { // GetOrder returns the Order field value if set, zero value otherwise. func (o *PatchedPromptRequest) GetOrder() int32 { - if o == nil || o.Order == nil { + if o == nil || IsNil(o.Order) { var ret int32 return ret } @@ -252,7 +255,7 @@ func (o *PatchedPromptRequest) GetOrder() int32 { // GetOrderOk returns a tuple with the Order field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedPromptRequest) GetOrderOk() (*int32, bool) { - if o == nil || o.Order == nil { + if o == nil || IsNil(o.Order) { return nil, false } return o.Order, true @@ -260,7 +263,7 @@ func (o *PatchedPromptRequest) GetOrderOk() (*int32, bool) { // HasOrder returns a boolean if a field has been set. func (o *PatchedPromptRequest) HasOrder() bool { - if o != nil && o.Order != nil { + if o != nil && !IsNil(o.Order) { return true } @@ -274,7 +277,7 @@ func (o *PatchedPromptRequest) SetOrder(v int32) { // GetPromptstageSet returns the PromptstageSet field value if set, zero value otherwise. func (o *PatchedPromptRequest) GetPromptstageSet() []StageRequest { - if o == nil || o.PromptstageSet == nil { + if o == nil || IsNil(o.PromptstageSet) { var ret []StageRequest return ret } @@ -284,7 +287,7 @@ func (o *PatchedPromptRequest) GetPromptstageSet() []StageRequest { // GetPromptstageSetOk returns a tuple with the PromptstageSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedPromptRequest) GetPromptstageSetOk() ([]StageRequest, bool) { - if o == nil || o.PromptstageSet == nil { + if o == nil || IsNil(o.PromptstageSet) { return nil, false } return o.PromptstageSet, true @@ -292,7 +295,7 @@ func (o *PatchedPromptRequest) GetPromptstageSetOk() ([]StageRequest, bool) { // HasPromptstageSet returns a boolean if a field has been set. func (o *PatchedPromptRequest) HasPromptstageSet() bool { - if o != nil && o.PromptstageSet != nil { + if o != nil && !IsNil(o.PromptstageSet) { return true } @@ -306,7 +309,7 @@ func (o *PatchedPromptRequest) SetPromptstageSet(v []StageRequest) { // GetSubText returns the SubText field value if set, zero value otherwise. func (o *PatchedPromptRequest) GetSubText() string { - if o == nil || o.SubText == nil { + if o == nil || IsNil(o.SubText) { var ret string return ret } @@ -316,7 +319,7 @@ func (o *PatchedPromptRequest) GetSubText() string { // GetSubTextOk returns a tuple with the SubText field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedPromptRequest) GetSubTextOk() (*string, bool) { - if o == nil || o.SubText == nil { + if o == nil || IsNil(o.SubText) { return nil, false } return o.SubText, true @@ -324,7 +327,7 @@ func (o *PatchedPromptRequest) GetSubTextOk() (*string, bool) { // HasSubText returns a boolean if a field has been set. func (o *PatchedPromptRequest) HasSubText() bool { - if o != nil && o.SubText != nil { + if o != nil && !IsNil(o.SubText) { return true } @@ -338,7 +341,7 @@ func (o *PatchedPromptRequest) SetSubText(v string) { // GetPlaceholderExpression returns the PlaceholderExpression field value if set, zero value otherwise. func (o *PatchedPromptRequest) GetPlaceholderExpression() bool { - if o == nil || o.PlaceholderExpression == nil { + if o == nil || IsNil(o.PlaceholderExpression) { var ret bool return ret } @@ -348,7 +351,7 @@ func (o *PatchedPromptRequest) GetPlaceholderExpression() bool { // GetPlaceholderExpressionOk returns a tuple with the PlaceholderExpression field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedPromptRequest) GetPlaceholderExpressionOk() (*bool, bool) { - if o == nil || o.PlaceholderExpression == nil { + if o == nil || IsNil(o.PlaceholderExpression) { return nil, false } return o.PlaceholderExpression, true @@ -356,7 +359,7 @@ func (o *PatchedPromptRequest) GetPlaceholderExpressionOk() (*bool, bool) { // HasPlaceholderExpression returns a boolean if a field has been set. func (o *PatchedPromptRequest) HasPlaceholderExpression() bool { - if o != nil && o.PlaceholderExpression != nil { + if o != nil && !IsNil(o.PlaceholderExpression) { return true } @@ -369,38 +372,46 @@ func (o *PatchedPromptRequest) SetPlaceholderExpression(v bool) { } func (o PatchedPromptRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedPromptRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.FieldKey != nil { + if !IsNil(o.FieldKey) { toSerialize["field_key"] = o.FieldKey } - if o.Label != nil { + if !IsNil(o.Label) { toSerialize["label"] = o.Label } - if o.Type != nil { + if !IsNil(o.Type) { toSerialize["type"] = o.Type } - if o.Required != nil { + if !IsNil(o.Required) { toSerialize["required"] = o.Required } - if o.Placeholder != nil { + if !IsNil(o.Placeholder) { toSerialize["placeholder"] = o.Placeholder } - if o.Order != nil { + if !IsNil(o.Order) { toSerialize["order"] = o.Order } - if o.PromptstageSet != nil { + if !IsNil(o.PromptstageSet) { toSerialize["promptstage_set"] = o.PromptstageSet } - if o.SubText != nil { + if !IsNil(o.SubText) { toSerialize["sub_text"] = o.SubText } - if o.PlaceholderExpression != nil { + if !IsNil(o.PlaceholderExpression) { toSerialize["placeholder_expression"] = o.PlaceholderExpression } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedPromptRequest struct { diff --git a/model_patched_prompt_stage_request.go b/model_patched_prompt_stage_request.go index 6e8bbc4f2..7b5678758 100644 --- a/model_patched_prompt_stage_request.go +++ b/model_patched_prompt_stage_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedPromptStageRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedPromptStageRequest{} + // PatchedPromptStageRequest PromptStage Serializer type PatchedPromptStageRequest struct { Name *string `json:"name,omitempty"` @@ -42,7 +45,7 @@ func NewPatchedPromptStageRequestWithDefaults() *PatchedPromptStageRequest { // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedPromptStageRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -52,7 +55,7 @@ func (o *PatchedPromptStageRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedPromptStageRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -60,7 +63,7 @@ func (o *PatchedPromptStageRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedPromptStageRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -74,7 +77,7 @@ func (o *PatchedPromptStageRequest) SetName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *PatchedPromptStageRequest) GetFlowSet() []FlowSetRequest { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSetRequest return ret } @@ -84,7 +87,7 @@ func (o *PatchedPromptStageRequest) GetFlowSet() []FlowSetRequest { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedPromptStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -92,7 +95,7 @@ func (o *PatchedPromptStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { // HasFlowSet returns a boolean if a field has been set. func (o *PatchedPromptStageRequest) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -106,7 +109,7 @@ func (o *PatchedPromptStageRequest) SetFlowSet(v []FlowSetRequest) { // GetFields returns the Fields field value if set, zero value otherwise. func (o *PatchedPromptStageRequest) GetFields() []string { - if o == nil || o.Fields == nil { + if o == nil || IsNil(o.Fields) { var ret []string return ret } @@ -116,7 +119,7 @@ func (o *PatchedPromptStageRequest) GetFields() []string { // GetFieldsOk returns a tuple with the Fields field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedPromptStageRequest) GetFieldsOk() ([]string, bool) { - if o == nil || o.Fields == nil { + if o == nil || IsNil(o.Fields) { return nil, false } return o.Fields, true @@ -124,7 +127,7 @@ func (o *PatchedPromptStageRequest) GetFieldsOk() ([]string, bool) { // HasFields returns a boolean if a field has been set. func (o *PatchedPromptStageRequest) HasFields() bool { - if o != nil && o.Fields != nil { + if o != nil && !IsNil(o.Fields) { return true } @@ -138,7 +141,7 @@ func (o *PatchedPromptStageRequest) SetFields(v []string) { // GetValidationPolicies returns the ValidationPolicies field value if set, zero value otherwise. func (o *PatchedPromptStageRequest) GetValidationPolicies() []string { - if o == nil || o.ValidationPolicies == nil { + if o == nil || IsNil(o.ValidationPolicies) { var ret []string return ret } @@ -148,7 +151,7 @@ func (o *PatchedPromptStageRequest) GetValidationPolicies() []string { // GetValidationPoliciesOk returns a tuple with the ValidationPolicies field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedPromptStageRequest) GetValidationPoliciesOk() ([]string, bool) { - if o == nil || o.ValidationPolicies == nil { + if o == nil || IsNil(o.ValidationPolicies) { return nil, false } return o.ValidationPolicies, true @@ -156,7 +159,7 @@ func (o *PatchedPromptStageRequest) GetValidationPoliciesOk() ([]string, bool) { // HasValidationPolicies returns a boolean if a field has been set. func (o *PatchedPromptStageRequest) HasValidationPolicies() bool { - if o != nil && o.ValidationPolicies != nil { + if o != nil && !IsNil(o.ValidationPolicies) { return true } @@ -169,20 +172,28 @@ func (o *PatchedPromptStageRequest) SetValidationPolicies(v []string) { } func (o PatchedPromptStageRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedPromptStageRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.FlowSet != nil { + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } - if o.Fields != nil { + if !IsNil(o.Fields) { toSerialize["fields"] = o.Fields } - if o.ValidationPolicies != nil { + if !IsNil(o.ValidationPolicies) { toSerialize["validation_policies"] = o.ValidationPolicies } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedPromptStageRequest struct { diff --git a/model_patched_proxy_provider_request.go b/model_patched_proxy_provider_request.go index 681290976..7a954b48b 100644 --- a/model_patched_proxy_provider_request.go +++ b/model_patched_proxy_provider_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedProxyProviderRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedProxyProviderRequest{} + // PatchedProxyProviderRequest ProxyProvider Serializer type PatchedProxyProviderRequest struct { Name *string `json:"name,omitempty"` @@ -35,9 +38,8 @@ type PatchedProxyProviderRequest struct { // User/Group Attribute used for the password part of the HTTP-Basic Header. BasicAuthPasswordAttribute *string `json:"basic_auth_password_attribute,omitempty"` // User/Group Attribute used for the user part of the HTTP-Basic Header. If not set, the user's Email address is used. - BasicAuthUserAttribute *string `json:"basic_auth_user_attribute,omitempty"` - // Enable support for forwardAuth in traefik and nginx auth_request. Exclusive with internal_host. * `proxy` - Proxy * `forward_single` - Forward Single * `forward_domain` - Forward Domain - Mode NullableProxyMode `json:"mode,omitempty"` + BasicAuthUserAttribute *string `json:"basic_auth_user_attribute,omitempty"` + Mode *ProxyMode `json:"mode,omitempty"` // When enabled, this provider will intercept the authorization header and authenticate requests based on its value. InterceptHeaderAuth *bool `json:"intercept_header_auth,omitempty"` CookieDomain *string `json:"cookie_domain,omitempty"` @@ -67,7 +69,7 @@ func NewPatchedProxyProviderRequestWithDefaults() *PatchedProxyProviderRequest { // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedProxyProviderRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -77,7 +79,7 @@ func (o *PatchedProxyProviderRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedProxyProviderRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -85,7 +87,7 @@ func (o *PatchedProxyProviderRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedProxyProviderRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -99,7 +101,7 @@ func (o *PatchedProxyProviderRequest) SetName(v string) { // GetAuthenticationFlow returns the AuthenticationFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedProxyProviderRequest) GetAuthenticationFlow() string { - if o == nil || o.AuthenticationFlow.Get() == nil { + if o == nil || IsNil(o.AuthenticationFlow.Get()) { var ret string return ret } @@ -142,7 +144,7 @@ func (o *PatchedProxyProviderRequest) UnsetAuthenticationFlow() { // GetAuthorizationFlow returns the AuthorizationFlow field value if set, zero value otherwise. func (o *PatchedProxyProviderRequest) GetAuthorizationFlow() string { - if o == nil || o.AuthorizationFlow == nil { + if o == nil || IsNil(o.AuthorizationFlow) { var ret string return ret } @@ -152,7 +154,7 @@ func (o *PatchedProxyProviderRequest) GetAuthorizationFlow() string { // GetAuthorizationFlowOk returns a tuple with the AuthorizationFlow field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedProxyProviderRequest) GetAuthorizationFlowOk() (*string, bool) { - if o == nil || o.AuthorizationFlow == nil { + if o == nil || IsNil(o.AuthorizationFlow) { return nil, false } return o.AuthorizationFlow, true @@ -160,7 +162,7 @@ func (o *PatchedProxyProviderRequest) GetAuthorizationFlowOk() (*string, bool) { // HasAuthorizationFlow returns a boolean if a field has been set. func (o *PatchedProxyProviderRequest) HasAuthorizationFlow() bool { - if o != nil && o.AuthorizationFlow != nil { + if o != nil && !IsNil(o.AuthorizationFlow) { return true } @@ -174,7 +176,7 @@ func (o *PatchedProxyProviderRequest) SetAuthorizationFlow(v string) { // GetPropertyMappings returns the PropertyMappings field value if set, zero value otherwise. func (o *PatchedProxyProviderRequest) GetPropertyMappings() []string { - if o == nil || o.PropertyMappings == nil { + if o == nil || IsNil(o.PropertyMappings) { var ret []string return ret } @@ -184,7 +186,7 @@ func (o *PatchedProxyProviderRequest) GetPropertyMappings() []string { // GetPropertyMappingsOk returns a tuple with the PropertyMappings field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedProxyProviderRequest) GetPropertyMappingsOk() ([]string, bool) { - if o == nil || o.PropertyMappings == nil { + if o == nil || IsNil(o.PropertyMappings) { return nil, false } return o.PropertyMappings, true @@ -192,7 +194,7 @@ func (o *PatchedProxyProviderRequest) GetPropertyMappingsOk() ([]string, bool) { // HasPropertyMappings returns a boolean if a field has been set. func (o *PatchedProxyProviderRequest) HasPropertyMappings() bool { - if o != nil && o.PropertyMappings != nil { + if o != nil && !IsNil(o.PropertyMappings) { return true } @@ -206,7 +208,7 @@ func (o *PatchedProxyProviderRequest) SetPropertyMappings(v []string) { // GetInternalHost returns the InternalHost field value if set, zero value otherwise. func (o *PatchedProxyProviderRequest) GetInternalHost() string { - if o == nil || o.InternalHost == nil { + if o == nil || IsNil(o.InternalHost) { var ret string return ret } @@ -216,7 +218,7 @@ func (o *PatchedProxyProviderRequest) GetInternalHost() string { // GetInternalHostOk returns a tuple with the InternalHost field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedProxyProviderRequest) GetInternalHostOk() (*string, bool) { - if o == nil || o.InternalHost == nil { + if o == nil || IsNil(o.InternalHost) { return nil, false } return o.InternalHost, true @@ -224,7 +226,7 @@ func (o *PatchedProxyProviderRequest) GetInternalHostOk() (*string, bool) { // HasInternalHost returns a boolean if a field has been set. func (o *PatchedProxyProviderRequest) HasInternalHost() bool { - if o != nil && o.InternalHost != nil { + if o != nil && !IsNil(o.InternalHost) { return true } @@ -238,7 +240,7 @@ func (o *PatchedProxyProviderRequest) SetInternalHost(v string) { // GetExternalHost returns the ExternalHost field value if set, zero value otherwise. func (o *PatchedProxyProviderRequest) GetExternalHost() string { - if o == nil || o.ExternalHost == nil { + if o == nil || IsNil(o.ExternalHost) { var ret string return ret } @@ -248,7 +250,7 @@ func (o *PatchedProxyProviderRequest) GetExternalHost() string { // GetExternalHostOk returns a tuple with the ExternalHost field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedProxyProviderRequest) GetExternalHostOk() (*string, bool) { - if o == nil || o.ExternalHost == nil { + if o == nil || IsNil(o.ExternalHost) { return nil, false } return o.ExternalHost, true @@ -256,7 +258,7 @@ func (o *PatchedProxyProviderRequest) GetExternalHostOk() (*string, bool) { // HasExternalHost returns a boolean if a field has been set. func (o *PatchedProxyProviderRequest) HasExternalHost() bool { - if o != nil && o.ExternalHost != nil { + if o != nil && !IsNil(o.ExternalHost) { return true } @@ -270,7 +272,7 @@ func (o *PatchedProxyProviderRequest) SetExternalHost(v string) { // GetInternalHostSslValidation returns the InternalHostSslValidation field value if set, zero value otherwise. func (o *PatchedProxyProviderRequest) GetInternalHostSslValidation() bool { - if o == nil || o.InternalHostSslValidation == nil { + if o == nil || IsNil(o.InternalHostSslValidation) { var ret bool return ret } @@ -280,7 +282,7 @@ func (o *PatchedProxyProviderRequest) GetInternalHostSslValidation() bool { // GetInternalHostSslValidationOk returns a tuple with the InternalHostSslValidation field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedProxyProviderRequest) GetInternalHostSslValidationOk() (*bool, bool) { - if o == nil || o.InternalHostSslValidation == nil { + if o == nil || IsNil(o.InternalHostSslValidation) { return nil, false } return o.InternalHostSslValidation, true @@ -288,7 +290,7 @@ func (o *PatchedProxyProviderRequest) GetInternalHostSslValidationOk() (*bool, b // HasInternalHostSslValidation returns a boolean if a field has been set. func (o *PatchedProxyProviderRequest) HasInternalHostSslValidation() bool { - if o != nil && o.InternalHostSslValidation != nil { + if o != nil && !IsNil(o.InternalHostSslValidation) { return true } @@ -302,7 +304,7 @@ func (o *PatchedProxyProviderRequest) SetInternalHostSslValidation(v bool) { // GetCertificate returns the Certificate field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedProxyProviderRequest) GetCertificate() string { - if o == nil || o.Certificate.Get() == nil { + if o == nil || IsNil(o.Certificate.Get()) { var ret string return ret } @@ -345,7 +347,7 @@ func (o *PatchedProxyProviderRequest) UnsetCertificate() { // GetSkipPathRegex returns the SkipPathRegex field value if set, zero value otherwise. func (o *PatchedProxyProviderRequest) GetSkipPathRegex() string { - if o == nil || o.SkipPathRegex == nil { + if o == nil || IsNil(o.SkipPathRegex) { var ret string return ret } @@ -355,7 +357,7 @@ func (o *PatchedProxyProviderRequest) GetSkipPathRegex() string { // GetSkipPathRegexOk returns a tuple with the SkipPathRegex field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedProxyProviderRequest) GetSkipPathRegexOk() (*string, bool) { - if o == nil || o.SkipPathRegex == nil { + if o == nil || IsNil(o.SkipPathRegex) { return nil, false } return o.SkipPathRegex, true @@ -363,7 +365,7 @@ func (o *PatchedProxyProviderRequest) GetSkipPathRegexOk() (*string, bool) { // HasSkipPathRegex returns a boolean if a field has been set. func (o *PatchedProxyProviderRequest) HasSkipPathRegex() bool { - if o != nil && o.SkipPathRegex != nil { + if o != nil && !IsNil(o.SkipPathRegex) { return true } @@ -377,7 +379,7 @@ func (o *PatchedProxyProviderRequest) SetSkipPathRegex(v string) { // GetBasicAuthEnabled returns the BasicAuthEnabled field value if set, zero value otherwise. func (o *PatchedProxyProviderRequest) GetBasicAuthEnabled() bool { - if o == nil || o.BasicAuthEnabled == nil { + if o == nil || IsNil(o.BasicAuthEnabled) { var ret bool return ret } @@ -387,7 +389,7 @@ func (o *PatchedProxyProviderRequest) GetBasicAuthEnabled() bool { // GetBasicAuthEnabledOk returns a tuple with the BasicAuthEnabled field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedProxyProviderRequest) GetBasicAuthEnabledOk() (*bool, bool) { - if o == nil || o.BasicAuthEnabled == nil { + if o == nil || IsNil(o.BasicAuthEnabled) { return nil, false } return o.BasicAuthEnabled, true @@ -395,7 +397,7 @@ func (o *PatchedProxyProviderRequest) GetBasicAuthEnabledOk() (*bool, bool) { // HasBasicAuthEnabled returns a boolean if a field has been set. func (o *PatchedProxyProviderRequest) HasBasicAuthEnabled() bool { - if o != nil && o.BasicAuthEnabled != nil { + if o != nil && !IsNil(o.BasicAuthEnabled) { return true } @@ -409,7 +411,7 @@ func (o *PatchedProxyProviderRequest) SetBasicAuthEnabled(v bool) { // GetBasicAuthPasswordAttribute returns the BasicAuthPasswordAttribute field value if set, zero value otherwise. func (o *PatchedProxyProviderRequest) GetBasicAuthPasswordAttribute() string { - if o == nil || o.BasicAuthPasswordAttribute == nil { + if o == nil || IsNil(o.BasicAuthPasswordAttribute) { var ret string return ret } @@ -419,7 +421,7 @@ func (o *PatchedProxyProviderRequest) GetBasicAuthPasswordAttribute() string { // GetBasicAuthPasswordAttributeOk returns a tuple with the BasicAuthPasswordAttribute field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedProxyProviderRequest) GetBasicAuthPasswordAttributeOk() (*string, bool) { - if o == nil || o.BasicAuthPasswordAttribute == nil { + if o == nil || IsNil(o.BasicAuthPasswordAttribute) { return nil, false } return o.BasicAuthPasswordAttribute, true @@ -427,7 +429,7 @@ func (o *PatchedProxyProviderRequest) GetBasicAuthPasswordAttributeOk() (*string // HasBasicAuthPasswordAttribute returns a boolean if a field has been set. func (o *PatchedProxyProviderRequest) HasBasicAuthPasswordAttribute() bool { - if o != nil && o.BasicAuthPasswordAttribute != nil { + if o != nil && !IsNil(o.BasicAuthPasswordAttribute) { return true } @@ -441,7 +443,7 @@ func (o *PatchedProxyProviderRequest) SetBasicAuthPasswordAttribute(v string) { // GetBasicAuthUserAttribute returns the BasicAuthUserAttribute field value if set, zero value otherwise. func (o *PatchedProxyProviderRequest) GetBasicAuthUserAttribute() string { - if o == nil || o.BasicAuthUserAttribute == nil { + if o == nil || IsNil(o.BasicAuthUserAttribute) { var ret string return ret } @@ -451,7 +453,7 @@ func (o *PatchedProxyProviderRequest) GetBasicAuthUserAttribute() string { // GetBasicAuthUserAttributeOk returns a tuple with the BasicAuthUserAttribute field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedProxyProviderRequest) GetBasicAuthUserAttributeOk() (*string, bool) { - if o == nil || o.BasicAuthUserAttribute == nil { + if o == nil || IsNil(o.BasicAuthUserAttribute) { return nil, false } return o.BasicAuthUserAttribute, true @@ -459,7 +461,7 @@ func (o *PatchedProxyProviderRequest) GetBasicAuthUserAttributeOk() (*string, bo // HasBasicAuthUserAttribute returns a boolean if a field has been set. func (o *PatchedProxyProviderRequest) HasBasicAuthUserAttribute() bool { - if o != nil && o.BasicAuthUserAttribute != nil { + if o != nil && !IsNil(o.BasicAuthUserAttribute) { return true } @@ -471,52 +473,41 @@ func (o *PatchedProxyProviderRequest) SetBasicAuthUserAttribute(v string) { o.BasicAuthUserAttribute = &v } -// GetMode returns the Mode field value if set, zero value otherwise (both if not set or set to explicit null). +// GetMode returns the Mode field value if set, zero value otherwise. func (o *PatchedProxyProviderRequest) GetMode() ProxyMode { - if o == nil || o.Mode.Get() == nil { + if o == nil || IsNil(o.Mode) { var ret ProxyMode return ret } - return *o.Mode.Get() + return *o.Mode } // GetModeOk returns a tuple with the Mode field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PatchedProxyProviderRequest) GetModeOk() (*ProxyMode, bool) { - if o == nil { + if o == nil || IsNil(o.Mode) { return nil, false } - return o.Mode.Get(), o.Mode.IsSet() + return o.Mode, true } // HasMode returns a boolean if a field has been set. func (o *PatchedProxyProviderRequest) HasMode() bool { - if o != nil && o.Mode.IsSet() { + if o != nil && !IsNil(o.Mode) { return true } return false } -// SetMode gets a reference to the given NullableProxyMode and assigns it to the Mode field. +// SetMode gets a reference to the given ProxyMode and assigns it to the Mode field. func (o *PatchedProxyProviderRequest) SetMode(v ProxyMode) { - o.Mode.Set(&v) -} - -// SetModeNil sets the value for Mode to be an explicit nil -func (o *PatchedProxyProviderRequest) SetModeNil() { - o.Mode.Set(nil) -} - -// UnsetMode ensures that no value is present for Mode, not even an explicit nil -func (o *PatchedProxyProviderRequest) UnsetMode() { - o.Mode.Unset() + o.Mode = &v } // GetInterceptHeaderAuth returns the InterceptHeaderAuth field value if set, zero value otherwise. func (o *PatchedProxyProviderRequest) GetInterceptHeaderAuth() bool { - if o == nil || o.InterceptHeaderAuth == nil { + if o == nil || IsNil(o.InterceptHeaderAuth) { var ret bool return ret } @@ -526,7 +517,7 @@ func (o *PatchedProxyProviderRequest) GetInterceptHeaderAuth() bool { // GetInterceptHeaderAuthOk returns a tuple with the InterceptHeaderAuth field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedProxyProviderRequest) GetInterceptHeaderAuthOk() (*bool, bool) { - if o == nil || o.InterceptHeaderAuth == nil { + if o == nil || IsNil(o.InterceptHeaderAuth) { return nil, false } return o.InterceptHeaderAuth, true @@ -534,7 +525,7 @@ func (o *PatchedProxyProviderRequest) GetInterceptHeaderAuthOk() (*bool, bool) { // HasInterceptHeaderAuth returns a boolean if a field has been set. func (o *PatchedProxyProviderRequest) HasInterceptHeaderAuth() bool { - if o != nil && o.InterceptHeaderAuth != nil { + if o != nil && !IsNil(o.InterceptHeaderAuth) { return true } @@ -548,7 +539,7 @@ func (o *PatchedProxyProviderRequest) SetInterceptHeaderAuth(v bool) { // GetCookieDomain returns the CookieDomain field value if set, zero value otherwise. func (o *PatchedProxyProviderRequest) GetCookieDomain() string { - if o == nil || o.CookieDomain == nil { + if o == nil || IsNil(o.CookieDomain) { var ret string return ret } @@ -558,7 +549,7 @@ func (o *PatchedProxyProviderRequest) GetCookieDomain() string { // GetCookieDomainOk returns a tuple with the CookieDomain field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedProxyProviderRequest) GetCookieDomainOk() (*string, bool) { - if o == nil || o.CookieDomain == nil { + if o == nil || IsNil(o.CookieDomain) { return nil, false } return o.CookieDomain, true @@ -566,7 +557,7 @@ func (o *PatchedProxyProviderRequest) GetCookieDomainOk() (*string, bool) { // HasCookieDomain returns a boolean if a field has been set. func (o *PatchedProxyProviderRequest) HasCookieDomain() bool { - if o != nil && o.CookieDomain != nil { + if o != nil && !IsNil(o.CookieDomain) { return true } @@ -580,7 +571,7 @@ func (o *PatchedProxyProviderRequest) SetCookieDomain(v string) { // GetJwksSources returns the JwksSources field value if set, zero value otherwise. func (o *PatchedProxyProviderRequest) GetJwksSources() []string { - if o == nil || o.JwksSources == nil { + if o == nil || IsNil(o.JwksSources) { var ret []string return ret } @@ -590,7 +581,7 @@ func (o *PatchedProxyProviderRequest) GetJwksSources() []string { // GetJwksSourcesOk returns a tuple with the JwksSources field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedProxyProviderRequest) GetJwksSourcesOk() ([]string, bool) { - if o == nil || o.JwksSources == nil { + if o == nil || IsNil(o.JwksSources) { return nil, false } return o.JwksSources, true @@ -598,7 +589,7 @@ func (o *PatchedProxyProviderRequest) GetJwksSourcesOk() ([]string, bool) { // HasJwksSources returns a boolean if a field has been set. func (o *PatchedProxyProviderRequest) HasJwksSources() bool { - if o != nil && o.JwksSources != nil { + if o != nil && !IsNil(o.JwksSources) { return true } @@ -612,7 +603,7 @@ func (o *PatchedProxyProviderRequest) SetJwksSources(v []string) { // GetAccessTokenValidity returns the AccessTokenValidity field value if set, zero value otherwise. func (o *PatchedProxyProviderRequest) GetAccessTokenValidity() string { - if o == nil || o.AccessTokenValidity == nil { + if o == nil || IsNil(o.AccessTokenValidity) { var ret string return ret } @@ -622,7 +613,7 @@ func (o *PatchedProxyProviderRequest) GetAccessTokenValidity() string { // GetAccessTokenValidityOk returns a tuple with the AccessTokenValidity field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedProxyProviderRequest) GetAccessTokenValidityOk() (*string, bool) { - if o == nil || o.AccessTokenValidity == nil { + if o == nil || IsNil(o.AccessTokenValidity) { return nil, false } return o.AccessTokenValidity, true @@ -630,7 +621,7 @@ func (o *PatchedProxyProviderRequest) GetAccessTokenValidityOk() (*string, bool) // HasAccessTokenValidity returns a boolean if a field has been set. func (o *PatchedProxyProviderRequest) HasAccessTokenValidity() bool { - if o != nil && o.AccessTokenValidity != nil { + if o != nil && !IsNil(o.AccessTokenValidity) { return true } @@ -644,7 +635,7 @@ func (o *PatchedProxyProviderRequest) SetAccessTokenValidity(v string) { // GetRefreshTokenValidity returns the RefreshTokenValidity field value if set, zero value otherwise. func (o *PatchedProxyProviderRequest) GetRefreshTokenValidity() string { - if o == nil || o.RefreshTokenValidity == nil { + if o == nil || IsNil(o.RefreshTokenValidity) { var ret string return ret } @@ -654,7 +645,7 @@ func (o *PatchedProxyProviderRequest) GetRefreshTokenValidity() string { // GetRefreshTokenValidityOk returns a tuple with the RefreshTokenValidity field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedProxyProviderRequest) GetRefreshTokenValidityOk() (*string, bool) { - if o == nil || o.RefreshTokenValidity == nil { + if o == nil || IsNil(o.RefreshTokenValidity) { return nil, false } return o.RefreshTokenValidity, true @@ -662,7 +653,7 @@ func (o *PatchedProxyProviderRequest) GetRefreshTokenValidityOk() (*string, bool // HasRefreshTokenValidity returns a boolean if a field has been set. func (o *PatchedProxyProviderRequest) HasRefreshTokenValidity() bool { - if o != nil && o.RefreshTokenValidity != nil { + if o != nil && !IsNil(o.RefreshTokenValidity) { return true } @@ -675,62 +666,70 @@ func (o *PatchedProxyProviderRequest) SetRefreshTokenValidity(v string) { } func (o PatchedProxyProviderRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedProxyProviderRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } if o.AuthenticationFlow.IsSet() { toSerialize["authentication_flow"] = o.AuthenticationFlow.Get() } - if o.AuthorizationFlow != nil { + if !IsNil(o.AuthorizationFlow) { toSerialize["authorization_flow"] = o.AuthorizationFlow } - if o.PropertyMappings != nil { + if !IsNil(o.PropertyMappings) { toSerialize["property_mappings"] = o.PropertyMappings } - if o.InternalHost != nil { + if !IsNil(o.InternalHost) { toSerialize["internal_host"] = o.InternalHost } - if o.ExternalHost != nil { + if !IsNil(o.ExternalHost) { toSerialize["external_host"] = o.ExternalHost } - if o.InternalHostSslValidation != nil { + if !IsNil(o.InternalHostSslValidation) { toSerialize["internal_host_ssl_validation"] = o.InternalHostSslValidation } if o.Certificate.IsSet() { toSerialize["certificate"] = o.Certificate.Get() } - if o.SkipPathRegex != nil { + if !IsNil(o.SkipPathRegex) { toSerialize["skip_path_regex"] = o.SkipPathRegex } - if o.BasicAuthEnabled != nil { + if !IsNil(o.BasicAuthEnabled) { toSerialize["basic_auth_enabled"] = o.BasicAuthEnabled } - if o.BasicAuthPasswordAttribute != nil { + if !IsNil(o.BasicAuthPasswordAttribute) { toSerialize["basic_auth_password_attribute"] = o.BasicAuthPasswordAttribute } - if o.BasicAuthUserAttribute != nil { + if !IsNil(o.BasicAuthUserAttribute) { toSerialize["basic_auth_user_attribute"] = o.BasicAuthUserAttribute } - if o.Mode.IsSet() { - toSerialize["mode"] = o.Mode.Get() + if !IsNil(o.Mode) { + toSerialize["mode"] = o.Mode } - if o.InterceptHeaderAuth != nil { + if !IsNil(o.InterceptHeaderAuth) { toSerialize["intercept_header_auth"] = o.InterceptHeaderAuth } - if o.CookieDomain != nil { + if !IsNil(o.CookieDomain) { toSerialize["cookie_domain"] = o.CookieDomain } - if o.JwksSources != nil { + if !IsNil(o.JwksSources) { toSerialize["jwks_sources"] = o.JwksSources } - if o.AccessTokenValidity != nil { + if !IsNil(o.AccessTokenValidity) { toSerialize["access_token_validity"] = o.AccessTokenValidity } - if o.RefreshTokenValidity != nil { + if !IsNil(o.RefreshTokenValidity) { toSerialize["refresh_token_validity"] = o.RefreshTokenValidity } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedProxyProviderRequest struct { diff --git a/model_patched_radius_provider_request.go b/model_patched_radius_provider_request.go index 1aacfe424..4c20bd7c4 100644 --- a/model_patched_radius_provider_request.go +++ b/model_patched_radius_provider_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedRadiusProviderRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedRadiusProviderRequest{} + // PatchedRadiusProviderRequest RadiusProvider Serializer type PatchedRadiusProviderRequest struct { Name *string `json:"name,omitempty"` @@ -48,7 +51,7 @@ func NewPatchedRadiusProviderRequestWithDefaults() *PatchedRadiusProviderRequest // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedRadiusProviderRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -58,7 +61,7 @@ func (o *PatchedRadiusProviderRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedRadiusProviderRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -66,7 +69,7 @@ func (o *PatchedRadiusProviderRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedRadiusProviderRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -80,7 +83,7 @@ func (o *PatchedRadiusProviderRequest) SetName(v string) { // GetAuthenticationFlow returns the AuthenticationFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedRadiusProviderRequest) GetAuthenticationFlow() string { - if o == nil || o.AuthenticationFlow.Get() == nil { + if o == nil || IsNil(o.AuthenticationFlow.Get()) { var ret string return ret } @@ -123,7 +126,7 @@ func (o *PatchedRadiusProviderRequest) UnsetAuthenticationFlow() { // GetAuthorizationFlow returns the AuthorizationFlow field value if set, zero value otherwise. func (o *PatchedRadiusProviderRequest) GetAuthorizationFlow() string { - if o == nil || o.AuthorizationFlow == nil { + if o == nil || IsNil(o.AuthorizationFlow) { var ret string return ret } @@ -133,7 +136,7 @@ func (o *PatchedRadiusProviderRequest) GetAuthorizationFlow() string { // GetAuthorizationFlowOk returns a tuple with the AuthorizationFlow field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedRadiusProviderRequest) GetAuthorizationFlowOk() (*string, bool) { - if o == nil || o.AuthorizationFlow == nil { + if o == nil || IsNil(o.AuthorizationFlow) { return nil, false } return o.AuthorizationFlow, true @@ -141,7 +144,7 @@ func (o *PatchedRadiusProviderRequest) GetAuthorizationFlowOk() (*string, bool) // HasAuthorizationFlow returns a boolean if a field has been set. func (o *PatchedRadiusProviderRequest) HasAuthorizationFlow() bool { - if o != nil && o.AuthorizationFlow != nil { + if o != nil && !IsNil(o.AuthorizationFlow) { return true } @@ -155,7 +158,7 @@ func (o *PatchedRadiusProviderRequest) SetAuthorizationFlow(v string) { // GetPropertyMappings returns the PropertyMappings field value if set, zero value otherwise. func (o *PatchedRadiusProviderRequest) GetPropertyMappings() []string { - if o == nil || o.PropertyMappings == nil { + if o == nil || IsNil(o.PropertyMappings) { var ret []string return ret } @@ -165,7 +168,7 @@ func (o *PatchedRadiusProviderRequest) GetPropertyMappings() []string { // GetPropertyMappingsOk returns a tuple with the PropertyMappings field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedRadiusProviderRequest) GetPropertyMappingsOk() ([]string, bool) { - if o == nil || o.PropertyMappings == nil { + if o == nil || IsNil(o.PropertyMappings) { return nil, false } return o.PropertyMappings, true @@ -173,7 +176,7 @@ func (o *PatchedRadiusProviderRequest) GetPropertyMappingsOk() ([]string, bool) // HasPropertyMappings returns a boolean if a field has been set. func (o *PatchedRadiusProviderRequest) HasPropertyMappings() bool { - if o != nil && o.PropertyMappings != nil { + if o != nil && !IsNil(o.PropertyMappings) { return true } @@ -187,7 +190,7 @@ func (o *PatchedRadiusProviderRequest) SetPropertyMappings(v []string) { // GetClientNetworks returns the ClientNetworks field value if set, zero value otherwise. func (o *PatchedRadiusProviderRequest) GetClientNetworks() string { - if o == nil || o.ClientNetworks == nil { + if o == nil || IsNil(o.ClientNetworks) { var ret string return ret } @@ -197,7 +200,7 @@ func (o *PatchedRadiusProviderRequest) GetClientNetworks() string { // GetClientNetworksOk returns a tuple with the ClientNetworks field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedRadiusProviderRequest) GetClientNetworksOk() (*string, bool) { - if o == nil || o.ClientNetworks == nil { + if o == nil || IsNil(o.ClientNetworks) { return nil, false } return o.ClientNetworks, true @@ -205,7 +208,7 @@ func (o *PatchedRadiusProviderRequest) GetClientNetworksOk() (*string, bool) { // HasClientNetworks returns a boolean if a field has been set. func (o *PatchedRadiusProviderRequest) HasClientNetworks() bool { - if o != nil && o.ClientNetworks != nil { + if o != nil && !IsNil(o.ClientNetworks) { return true } @@ -219,7 +222,7 @@ func (o *PatchedRadiusProviderRequest) SetClientNetworks(v string) { // GetSharedSecret returns the SharedSecret field value if set, zero value otherwise. func (o *PatchedRadiusProviderRequest) GetSharedSecret() string { - if o == nil || o.SharedSecret == nil { + if o == nil || IsNil(o.SharedSecret) { var ret string return ret } @@ -229,7 +232,7 @@ func (o *PatchedRadiusProviderRequest) GetSharedSecret() string { // GetSharedSecretOk returns a tuple with the SharedSecret field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedRadiusProviderRequest) GetSharedSecretOk() (*string, bool) { - if o == nil || o.SharedSecret == nil { + if o == nil || IsNil(o.SharedSecret) { return nil, false } return o.SharedSecret, true @@ -237,7 +240,7 @@ func (o *PatchedRadiusProviderRequest) GetSharedSecretOk() (*string, bool) { // HasSharedSecret returns a boolean if a field has been set. func (o *PatchedRadiusProviderRequest) HasSharedSecret() bool { - if o != nil && o.SharedSecret != nil { + if o != nil && !IsNil(o.SharedSecret) { return true } @@ -250,26 +253,34 @@ func (o *PatchedRadiusProviderRequest) SetSharedSecret(v string) { } func (o PatchedRadiusProviderRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedRadiusProviderRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } if o.AuthenticationFlow.IsSet() { toSerialize["authentication_flow"] = o.AuthenticationFlow.Get() } - if o.AuthorizationFlow != nil { + if !IsNil(o.AuthorizationFlow) { toSerialize["authorization_flow"] = o.AuthorizationFlow } - if o.PropertyMappings != nil { + if !IsNil(o.PropertyMappings) { toSerialize["property_mappings"] = o.PropertyMappings } - if o.ClientNetworks != nil { + if !IsNil(o.ClientNetworks) { toSerialize["client_networks"] = o.ClientNetworks } - if o.SharedSecret != nil { + if !IsNil(o.SharedSecret) { toSerialize["shared_secret"] = o.SharedSecret } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedRadiusProviderRequest struct { diff --git a/model_patched_reputation_policy_request.go b/model_patched_reputation_policy_request.go index dc1664eff..39e53fd6a 100644 --- a/model_patched_reputation_policy_request.go +++ b/model_patched_reputation_policy_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedReputationPolicyRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedReputationPolicyRequest{} + // PatchedReputationPolicyRequest Reputation Policy Serializer type PatchedReputationPolicyRequest struct { Name *string `json:"name,omitempty"` @@ -44,7 +47,7 @@ func NewPatchedReputationPolicyRequestWithDefaults() *PatchedReputationPolicyReq // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedReputationPolicyRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -54,7 +57,7 @@ func (o *PatchedReputationPolicyRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedReputationPolicyRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -62,7 +65,7 @@ func (o *PatchedReputationPolicyRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedReputationPolicyRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -76,7 +79,7 @@ func (o *PatchedReputationPolicyRequest) SetName(v string) { // GetExecutionLogging returns the ExecutionLogging field value if set, zero value otherwise. func (o *PatchedReputationPolicyRequest) GetExecutionLogging() bool { - if o == nil || o.ExecutionLogging == nil { + if o == nil || IsNil(o.ExecutionLogging) { var ret bool return ret } @@ -86,7 +89,7 @@ func (o *PatchedReputationPolicyRequest) GetExecutionLogging() bool { // GetExecutionLoggingOk returns a tuple with the ExecutionLogging field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedReputationPolicyRequest) GetExecutionLoggingOk() (*bool, bool) { - if o == nil || o.ExecutionLogging == nil { + if o == nil || IsNil(o.ExecutionLogging) { return nil, false } return o.ExecutionLogging, true @@ -94,7 +97,7 @@ func (o *PatchedReputationPolicyRequest) GetExecutionLoggingOk() (*bool, bool) { // HasExecutionLogging returns a boolean if a field has been set. func (o *PatchedReputationPolicyRequest) HasExecutionLogging() bool { - if o != nil && o.ExecutionLogging != nil { + if o != nil && !IsNil(o.ExecutionLogging) { return true } @@ -108,7 +111,7 @@ func (o *PatchedReputationPolicyRequest) SetExecutionLogging(v bool) { // GetCheckIp returns the CheckIp field value if set, zero value otherwise. func (o *PatchedReputationPolicyRequest) GetCheckIp() bool { - if o == nil || o.CheckIp == nil { + if o == nil || IsNil(o.CheckIp) { var ret bool return ret } @@ -118,7 +121,7 @@ func (o *PatchedReputationPolicyRequest) GetCheckIp() bool { // GetCheckIpOk returns a tuple with the CheckIp field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedReputationPolicyRequest) GetCheckIpOk() (*bool, bool) { - if o == nil || o.CheckIp == nil { + if o == nil || IsNil(o.CheckIp) { return nil, false } return o.CheckIp, true @@ -126,7 +129,7 @@ func (o *PatchedReputationPolicyRequest) GetCheckIpOk() (*bool, bool) { // HasCheckIp returns a boolean if a field has been set. func (o *PatchedReputationPolicyRequest) HasCheckIp() bool { - if o != nil && o.CheckIp != nil { + if o != nil && !IsNil(o.CheckIp) { return true } @@ -140,7 +143,7 @@ func (o *PatchedReputationPolicyRequest) SetCheckIp(v bool) { // GetCheckUsername returns the CheckUsername field value if set, zero value otherwise. func (o *PatchedReputationPolicyRequest) GetCheckUsername() bool { - if o == nil || o.CheckUsername == nil { + if o == nil || IsNil(o.CheckUsername) { var ret bool return ret } @@ -150,7 +153,7 @@ func (o *PatchedReputationPolicyRequest) GetCheckUsername() bool { // GetCheckUsernameOk returns a tuple with the CheckUsername field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedReputationPolicyRequest) GetCheckUsernameOk() (*bool, bool) { - if o == nil || o.CheckUsername == nil { + if o == nil || IsNil(o.CheckUsername) { return nil, false } return o.CheckUsername, true @@ -158,7 +161,7 @@ func (o *PatchedReputationPolicyRequest) GetCheckUsernameOk() (*bool, bool) { // HasCheckUsername returns a boolean if a field has been set. func (o *PatchedReputationPolicyRequest) HasCheckUsername() bool { - if o != nil && o.CheckUsername != nil { + if o != nil && !IsNil(o.CheckUsername) { return true } @@ -172,7 +175,7 @@ func (o *PatchedReputationPolicyRequest) SetCheckUsername(v bool) { // GetThreshold returns the Threshold field value if set, zero value otherwise. func (o *PatchedReputationPolicyRequest) GetThreshold() int32 { - if o == nil || o.Threshold == nil { + if o == nil || IsNil(o.Threshold) { var ret int32 return ret } @@ -182,7 +185,7 @@ func (o *PatchedReputationPolicyRequest) GetThreshold() int32 { // GetThresholdOk returns a tuple with the Threshold field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedReputationPolicyRequest) GetThresholdOk() (*int32, bool) { - if o == nil || o.Threshold == nil { + if o == nil || IsNil(o.Threshold) { return nil, false } return o.Threshold, true @@ -190,7 +193,7 @@ func (o *PatchedReputationPolicyRequest) GetThresholdOk() (*int32, bool) { // HasThreshold returns a boolean if a field has been set. func (o *PatchedReputationPolicyRequest) HasThreshold() bool { - if o != nil && o.Threshold != nil { + if o != nil && !IsNil(o.Threshold) { return true } @@ -203,23 +206,31 @@ func (o *PatchedReputationPolicyRequest) SetThreshold(v int32) { } func (o PatchedReputationPolicyRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedReputationPolicyRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.ExecutionLogging != nil { + if !IsNil(o.ExecutionLogging) { toSerialize["execution_logging"] = o.ExecutionLogging } - if o.CheckIp != nil { + if !IsNil(o.CheckIp) { toSerialize["check_ip"] = o.CheckIp } - if o.CheckUsername != nil { + if !IsNil(o.CheckUsername) { toSerialize["check_username"] = o.CheckUsername } - if o.Threshold != nil { + if !IsNil(o.Threshold) { toSerialize["threshold"] = o.Threshold } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedReputationPolicyRequest struct { diff --git a/model_patched_saml_property_mapping_request.go b/model_patched_saml_property_mapping_request.go index 7523a8e1d..4aabe4956 100644 --- a/model_patched_saml_property_mapping_request.go +++ b/model_patched_saml_property_mapping_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedSAMLPropertyMappingRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedSAMLPropertyMappingRequest{} + // PatchedSAMLPropertyMappingRequest SAMLPropertyMapping Serializer type PatchedSAMLPropertyMappingRequest struct { // Objects which are managed by authentik. These objects are created and updated automatically. This is flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. @@ -44,7 +47,7 @@ func NewPatchedSAMLPropertyMappingRequestWithDefaults() *PatchedSAMLPropertyMapp // GetManaged returns the Managed field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedSAMLPropertyMappingRequest) GetManaged() string { - if o == nil || o.Managed.Get() == nil { + if o == nil || IsNil(o.Managed.Get()) { var ret string return ret } @@ -87,7 +90,7 @@ func (o *PatchedSAMLPropertyMappingRequest) UnsetManaged() { // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedSAMLPropertyMappingRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -97,7 +100,7 @@ func (o *PatchedSAMLPropertyMappingRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedSAMLPropertyMappingRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -105,7 +108,7 @@ func (o *PatchedSAMLPropertyMappingRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedSAMLPropertyMappingRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -119,7 +122,7 @@ func (o *PatchedSAMLPropertyMappingRequest) SetName(v string) { // GetExpression returns the Expression field value if set, zero value otherwise. func (o *PatchedSAMLPropertyMappingRequest) GetExpression() string { - if o == nil || o.Expression == nil { + if o == nil || IsNil(o.Expression) { var ret string return ret } @@ -129,7 +132,7 @@ func (o *PatchedSAMLPropertyMappingRequest) GetExpression() string { // GetExpressionOk returns a tuple with the Expression field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedSAMLPropertyMappingRequest) GetExpressionOk() (*string, bool) { - if o == nil || o.Expression == nil { + if o == nil || IsNil(o.Expression) { return nil, false } return o.Expression, true @@ -137,7 +140,7 @@ func (o *PatchedSAMLPropertyMappingRequest) GetExpressionOk() (*string, bool) { // HasExpression returns a boolean if a field has been set. func (o *PatchedSAMLPropertyMappingRequest) HasExpression() bool { - if o != nil && o.Expression != nil { + if o != nil && !IsNil(o.Expression) { return true } @@ -151,7 +154,7 @@ func (o *PatchedSAMLPropertyMappingRequest) SetExpression(v string) { // GetSamlName returns the SamlName field value if set, zero value otherwise. func (o *PatchedSAMLPropertyMappingRequest) GetSamlName() string { - if o == nil || o.SamlName == nil { + if o == nil || IsNil(o.SamlName) { var ret string return ret } @@ -161,7 +164,7 @@ func (o *PatchedSAMLPropertyMappingRequest) GetSamlName() string { // GetSamlNameOk returns a tuple with the SamlName field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedSAMLPropertyMappingRequest) GetSamlNameOk() (*string, bool) { - if o == nil || o.SamlName == nil { + if o == nil || IsNil(o.SamlName) { return nil, false } return o.SamlName, true @@ -169,7 +172,7 @@ func (o *PatchedSAMLPropertyMappingRequest) GetSamlNameOk() (*string, bool) { // HasSamlName returns a boolean if a field has been set. func (o *PatchedSAMLPropertyMappingRequest) HasSamlName() bool { - if o != nil && o.SamlName != nil { + if o != nil && !IsNil(o.SamlName) { return true } @@ -183,7 +186,7 @@ func (o *PatchedSAMLPropertyMappingRequest) SetSamlName(v string) { // GetFriendlyName returns the FriendlyName field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedSAMLPropertyMappingRequest) GetFriendlyName() string { - if o == nil || o.FriendlyName.Get() == nil { + if o == nil || IsNil(o.FriendlyName.Get()) { var ret string return ret } @@ -225,23 +228,31 @@ func (o *PatchedSAMLPropertyMappingRequest) UnsetFriendlyName() { } func (o PatchedSAMLPropertyMappingRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedSAMLPropertyMappingRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Managed.IsSet() { toSerialize["managed"] = o.Managed.Get() } - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.Expression != nil { + if !IsNil(o.Expression) { toSerialize["expression"] = o.Expression } - if o.SamlName != nil { + if !IsNil(o.SamlName) { toSerialize["saml_name"] = o.SamlName } if o.FriendlyName.IsSet() { toSerialize["friendly_name"] = o.FriendlyName.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedSAMLPropertyMappingRequest struct { diff --git a/model_patched_saml_provider_request.go b/model_patched_saml_provider_request.go index da4cf93a6..d70a9e2ea 100644 --- a/model_patched_saml_provider_request.go +++ b/model_patched_saml_provider_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedSAMLProviderRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedSAMLProviderRequest{} + // PatchedSAMLProviderRequest SAMLProvider Serializer type PatchedSAMLProviderRequest struct { Name *string `json:"name,omitempty"` @@ -42,8 +45,7 @@ type PatchedSAMLProviderRequest struct { SigningKp NullableString `json:"signing_kp,omitempty"` // When selected, incoming assertion's Signatures will be validated against this certificate. To allow unsigned Requests, leave on default. VerificationKp NullableString `json:"verification_kp,omitempty"` - // This determines how authentik sends the response back to the Service Provider. * `redirect` - Redirect * `post` - Post - SpBinding NullableSpBindingEnum `json:"sp_binding,omitempty"` + SpBinding *SpBindingEnum `json:"sp_binding,omitempty"` } // NewPatchedSAMLProviderRequest instantiates a new PatchedSAMLProviderRequest object @@ -65,7 +67,7 @@ func NewPatchedSAMLProviderRequestWithDefaults() *PatchedSAMLProviderRequest { // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedSAMLProviderRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -75,7 +77,7 @@ func (o *PatchedSAMLProviderRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedSAMLProviderRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -83,7 +85,7 @@ func (o *PatchedSAMLProviderRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedSAMLProviderRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -97,7 +99,7 @@ func (o *PatchedSAMLProviderRequest) SetName(v string) { // GetAuthenticationFlow returns the AuthenticationFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedSAMLProviderRequest) GetAuthenticationFlow() string { - if o == nil || o.AuthenticationFlow.Get() == nil { + if o == nil || IsNil(o.AuthenticationFlow.Get()) { var ret string return ret } @@ -140,7 +142,7 @@ func (o *PatchedSAMLProviderRequest) UnsetAuthenticationFlow() { // GetAuthorizationFlow returns the AuthorizationFlow field value if set, zero value otherwise. func (o *PatchedSAMLProviderRequest) GetAuthorizationFlow() string { - if o == nil || o.AuthorizationFlow == nil { + if o == nil || IsNil(o.AuthorizationFlow) { var ret string return ret } @@ -150,7 +152,7 @@ func (o *PatchedSAMLProviderRequest) GetAuthorizationFlow() string { // GetAuthorizationFlowOk returns a tuple with the AuthorizationFlow field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedSAMLProviderRequest) GetAuthorizationFlowOk() (*string, bool) { - if o == nil || o.AuthorizationFlow == nil { + if o == nil || IsNil(o.AuthorizationFlow) { return nil, false } return o.AuthorizationFlow, true @@ -158,7 +160,7 @@ func (o *PatchedSAMLProviderRequest) GetAuthorizationFlowOk() (*string, bool) { // HasAuthorizationFlow returns a boolean if a field has been set. func (o *PatchedSAMLProviderRequest) HasAuthorizationFlow() bool { - if o != nil && o.AuthorizationFlow != nil { + if o != nil && !IsNil(o.AuthorizationFlow) { return true } @@ -172,7 +174,7 @@ func (o *PatchedSAMLProviderRequest) SetAuthorizationFlow(v string) { // GetPropertyMappings returns the PropertyMappings field value if set, zero value otherwise. func (o *PatchedSAMLProviderRequest) GetPropertyMappings() []string { - if o == nil || o.PropertyMappings == nil { + if o == nil || IsNil(o.PropertyMappings) { var ret []string return ret } @@ -182,7 +184,7 @@ func (o *PatchedSAMLProviderRequest) GetPropertyMappings() []string { // GetPropertyMappingsOk returns a tuple with the PropertyMappings field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedSAMLProviderRequest) GetPropertyMappingsOk() ([]string, bool) { - if o == nil || o.PropertyMappings == nil { + if o == nil || IsNil(o.PropertyMappings) { return nil, false } return o.PropertyMappings, true @@ -190,7 +192,7 @@ func (o *PatchedSAMLProviderRequest) GetPropertyMappingsOk() ([]string, bool) { // HasPropertyMappings returns a boolean if a field has been set. func (o *PatchedSAMLProviderRequest) HasPropertyMappings() bool { - if o != nil && o.PropertyMappings != nil { + if o != nil && !IsNil(o.PropertyMappings) { return true } @@ -204,7 +206,7 @@ func (o *PatchedSAMLProviderRequest) SetPropertyMappings(v []string) { // GetAcsUrl returns the AcsUrl field value if set, zero value otherwise. func (o *PatchedSAMLProviderRequest) GetAcsUrl() string { - if o == nil || o.AcsUrl == nil { + if o == nil || IsNil(o.AcsUrl) { var ret string return ret } @@ -214,7 +216,7 @@ func (o *PatchedSAMLProviderRequest) GetAcsUrl() string { // GetAcsUrlOk returns a tuple with the AcsUrl field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedSAMLProviderRequest) GetAcsUrlOk() (*string, bool) { - if o == nil || o.AcsUrl == nil { + if o == nil || IsNil(o.AcsUrl) { return nil, false } return o.AcsUrl, true @@ -222,7 +224,7 @@ func (o *PatchedSAMLProviderRequest) GetAcsUrlOk() (*string, bool) { // HasAcsUrl returns a boolean if a field has been set. func (o *PatchedSAMLProviderRequest) HasAcsUrl() bool { - if o != nil && o.AcsUrl != nil { + if o != nil && !IsNil(o.AcsUrl) { return true } @@ -236,7 +238,7 @@ func (o *PatchedSAMLProviderRequest) SetAcsUrl(v string) { // GetAudience returns the Audience field value if set, zero value otherwise. func (o *PatchedSAMLProviderRequest) GetAudience() string { - if o == nil || o.Audience == nil { + if o == nil || IsNil(o.Audience) { var ret string return ret } @@ -246,7 +248,7 @@ func (o *PatchedSAMLProviderRequest) GetAudience() string { // GetAudienceOk returns a tuple with the Audience field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedSAMLProviderRequest) GetAudienceOk() (*string, bool) { - if o == nil || o.Audience == nil { + if o == nil || IsNil(o.Audience) { return nil, false } return o.Audience, true @@ -254,7 +256,7 @@ func (o *PatchedSAMLProviderRequest) GetAudienceOk() (*string, bool) { // HasAudience returns a boolean if a field has been set. func (o *PatchedSAMLProviderRequest) HasAudience() bool { - if o != nil && o.Audience != nil { + if o != nil && !IsNil(o.Audience) { return true } @@ -268,7 +270,7 @@ func (o *PatchedSAMLProviderRequest) SetAudience(v string) { // GetIssuer returns the Issuer field value if set, zero value otherwise. func (o *PatchedSAMLProviderRequest) GetIssuer() string { - if o == nil || o.Issuer == nil { + if o == nil || IsNil(o.Issuer) { var ret string return ret } @@ -278,7 +280,7 @@ func (o *PatchedSAMLProviderRequest) GetIssuer() string { // GetIssuerOk returns a tuple with the Issuer field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedSAMLProviderRequest) GetIssuerOk() (*string, bool) { - if o == nil || o.Issuer == nil { + if o == nil || IsNil(o.Issuer) { return nil, false } return o.Issuer, true @@ -286,7 +288,7 @@ func (o *PatchedSAMLProviderRequest) GetIssuerOk() (*string, bool) { // HasIssuer returns a boolean if a field has been set. func (o *PatchedSAMLProviderRequest) HasIssuer() bool { - if o != nil && o.Issuer != nil { + if o != nil && !IsNil(o.Issuer) { return true } @@ -300,7 +302,7 @@ func (o *PatchedSAMLProviderRequest) SetIssuer(v string) { // GetAssertionValidNotBefore returns the AssertionValidNotBefore field value if set, zero value otherwise. func (o *PatchedSAMLProviderRequest) GetAssertionValidNotBefore() string { - if o == nil || o.AssertionValidNotBefore == nil { + if o == nil || IsNil(o.AssertionValidNotBefore) { var ret string return ret } @@ -310,7 +312,7 @@ func (o *PatchedSAMLProviderRequest) GetAssertionValidNotBefore() string { // GetAssertionValidNotBeforeOk returns a tuple with the AssertionValidNotBefore field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedSAMLProviderRequest) GetAssertionValidNotBeforeOk() (*string, bool) { - if o == nil || o.AssertionValidNotBefore == nil { + if o == nil || IsNil(o.AssertionValidNotBefore) { return nil, false } return o.AssertionValidNotBefore, true @@ -318,7 +320,7 @@ func (o *PatchedSAMLProviderRequest) GetAssertionValidNotBeforeOk() (*string, bo // HasAssertionValidNotBefore returns a boolean if a field has been set. func (o *PatchedSAMLProviderRequest) HasAssertionValidNotBefore() bool { - if o != nil && o.AssertionValidNotBefore != nil { + if o != nil && !IsNil(o.AssertionValidNotBefore) { return true } @@ -332,7 +334,7 @@ func (o *PatchedSAMLProviderRequest) SetAssertionValidNotBefore(v string) { // GetAssertionValidNotOnOrAfter returns the AssertionValidNotOnOrAfter field value if set, zero value otherwise. func (o *PatchedSAMLProviderRequest) GetAssertionValidNotOnOrAfter() string { - if o == nil || o.AssertionValidNotOnOrAfter == nil { + if o == nil || IsNil(o.AssertionValidNotOnOrAfter) { var ret string return ret } @@ -342,7 +344,7 @@ func (o *PatchedSAMLProviderRequest) GetAssertionValidNotOnOrAfter() string { // GetAssertionValidNotOnOrAfterOk returns a tuple with the AssertionValidNotOnOrAfter field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedSAMLProviderRequest) GetAssertionValidNotOnOrAfterOk() (*string, bool) { - if o == nil || o.AssertionValidNotOnOrAfter == nil { + if o == nil || IsNil(o.AssertionValidNotOnOrAfter) { return nil, false } return o.AssertionValidNotOnOrAfter, true @@ -350,7 +352,7 @@ func (o *PatchedSAMLProviderRequest) GetAssertionValidNotOnOrAfterOk() (*string, // HasAssertionValidNotOnOrAfter returns a boolean if a field has been set. func (o *PatchedSAMLProviderRequest) HasAssertionValidNotOnOrAfter() bool { - if o != nil && o.AssertionValidNotOnOrAfter != nil { + if o != nil && !IsNil(o.AssertionValidNotOnOrAfter) { return true } @@ -364,7 +366,7 @@ func (o *PatchedSAMLProviderRequest) SetAssertionValidNotOnOrAfter(v string) { // GetSessionValidNotOnOrAfter returns the SessionValidNotOnOrAfter field value if set, zero value otherwise. func (o *PatchedSAMLProviderRequest) GetSessionValidNotOnOrAfter() string { - if o == nil || o.SessionValidNotOnOrAfter == nil { + if o == nil || IsNil(o.SessionValidNotOnOrAfter) { var ret string return ret } @@ -374,7 +376,7 @@ func (o *PatchedSAMLProviderRequest) GetSessionValidNotOnOrAfter() string { // GetSessionValidNotOnOrAfterOk returns a tuple with the SessionValidNotOnOrAfter field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedSAMLProviderRequest) GetSessionValidNotOnOrAfterOk() (*string, bool) { - if o == nil || o.SessionValidNotOnOrAfter == nil { + if o == nil || IsNil(o.SessionValidNotOnOrAfter) { return nil, false } return o.SessionValidNotOnOrAfter, true @@ -382,7 +384,7 @@ func (o *PatchedSAMLProviderRequest) GetSessionValidNotOnOrAfterOk() (*string, b // HasSessionValidNotOnOrAfter returns a boolean if a field has been set. func (o *PatchedSAMLProviderRequest) HasSessionValidNotOnOrAfter() bool { - if o != nil && o.SessionValidNotOnOrAfter != nil { + if o != nil && !IsNil(o.SessionValidNotOnOrAfter) { return true } @@ -396,7 +398,7 @@ func (o *PatchedSAMLProviderRequest) SetSessionValidNotOnOrAfter(v string) { // GetNameIdMapping returns the NameIdMapping field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedSAMLProviderRequest) GetNameIdMapping() string { - if o == nil || o.NameIdMapping.Get() == nil { + if o == nil || IsNil(o.NameIdMapping.Get()) { var ret string return ret } @@ -439,7 +441,7 @@ func (o *PatchedSAMLProviderRequest) UnsetNameIdMapping() { // GetDigestAlgorithm returns the DigestAlgorithm field value if set, zero value otherwise. func (o *PatchedSAMLProviderRequest) GetDigestAlgorithm() DigestAlgorithmEnum { - if o == nil || o.DigestAlgorithm == nil { + if o == nil || IsNil(o.DigestAlgorithm) { var ret DigestAlgorithmEnum return ret } @@ -449,7 +451,7 @@ func (o *PatchedSAMLProviderRequest) GetDigestAlgorithm() DigestAlgorithmEnum { // GetDigestAlgorithmOk returns a tuple with the DigestAlgorithm field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedSAMLProviderRequest) GetDigestAlgorithmOk() (*DigestAlgorithmEnum, bool) { - if o == nil || o.DigestAlgorithm == nil { + if o == nil || IsNil(o.DigestAlgorithm) { return nil, false } return o.DigestAlgorithm, true @@ -457,7 +459,7 @@ func (o *PatchedSAMLProviderRequest) GetDigestAlgorithmOk() (*DigestAlgorithmEnu // HasDigestAlgorithm returns a boolean if a field has been set. func (o *PatchedSAMLProviderRequest) HasDigestAlgorithm() bool { - if o != nil && o.DigestAlgorithm != nil { + if o != nil && !IsNil(o.DigestAlgorithm) { return true } @@ -471,7 +473,7 @@ func (o *PatchedSAMLProviderRequest) SetDigestAlgorithm(v DigestAlgorithmEnum) { // GetSignatureAlgorithm returns the SignatureAlgorithm field value if set, zero value otherwise. func (o *PatchedSAMLProviderRequest) GetSignatureAlgorithm() SignatureAlgorithmEnum { - if o == nil || o.SignatureAlgorithm == nil { + if o == nil || IsNil(o.SignatureAlgorithm) { var ret SignatureAlgorithmEnum return ret } @@ -481,7 +483,7 @@ func (o *PatchedSAMLProviderRequest) GetSignatureAlgorithm() SignatureAlgorithmE // GetSignatureAlgorithmOk returns a tuple with the SignatureAlgorithm field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedSAMLProviderRequest) GetSignatureAlgorithmOk() (*SignatureAlgorithmEnum, bool) { - if o == nil || o.SignatureAlgorithm == nil { + if o == nil || IsNil(o.SignatureAlgorithm) { return nil, false } return o.SignatureAlgorithm, true @@ -489,7 +491,7 @@ func (o *PatchedSAMLProviderRequest) GetSignatureAlgorithmOk() (*SignatureAlgori // HasSignatureAlgorithm returns a boolean if a field has been set. func (o *PatchedSAMLProviderRequest) HasSignatureAlgorithm() bool { - if o != nil && o.SignatureAlgorithm != nil { + if o != nil && !IsNil(o.SignatureAlgorithm) { return true } @@ -503,7 +505,7 @@ func (o *PatchedSAMLProviderRequest) SetSignatureAlgorithm(v SignatureAlgorithmE // GetSigningKp returns the SigningKp field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedSAMLProviderRequest) GetSigningKp() string { - if o == nil || o.SigningKp.Get() == nil { + if o == nil || IsNil(o.SigningKp.Get()) { var ret string return ret } @@ -546,7 +548,7 @@ func (o *PatchedSAMLProviderRequest) UnsetSigningKp() { // GetVerificationKp returns the VerificationKp field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedSAMLProviderRequest) GetVerificationKp() string { - if o == nil || o.VerificationKp.Get() == nil { + if o == nil || IsNil(o.VerificationKp.Get()) { var ret string return ret } @@ -587,88 +589,85 @@ func (o *PatchedSAMLProviderRequest) UnsetVerificationKp() { o.VerificationKp.Unset() } -// GetSpBinding returns the SpBinding field value if set, zero value otherwise (both if not set or set to explicit null). +// GetSpBinding returns the SpBinding field value if set, zero value otherwise. func (o *PatchedSAMLProviderRequest) GetSpBinding() SpBindingEnum { - if o == nil || o.SpBinding.Get() == nil { + if o == nil || IsNil(o.SpBinding) { var ret SpBindingEnum return ret } - return *o.SpBinding.Get() + return *o.SpBinding } // GetSpBindingOk returns a tuple with the SpBinding field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PatchedSAMLProviderRequest) GetSpBindingOk() (*SpBindingEnum, bool) { - if o == nil { + if o == nil || IsNil(o.SpBinding) { return nil, false } - return o.SpBinding.Get(), o.SpBinding.IsSet() + return o.SpBinding, true } // HasSpBinding returns a boolean if a field has been set. func (o *PatchedSAMLProviderRequest) HasSpBinding() bool { - if o != nil && o.SpBinding.IsSet() { + if o != nil && !IsNil(o.SpBinding) { return true } return false } -// SetSpBinding gets a reference to the given NullableSpBindingEnum and assigns it to the SpBinding field. +// SetSpBinding gets a reference to the given SpBindingEnum and assigns it to the SpBinding field. func (o *PatchedSAMLProviderRequest) SetSpBinding(v SpBindingEnum) { - o.SpBinding.Set(&v) -} - -// SetSpBindingNil sets the value for SpBinding to be an explicit nil -func (o *PatchedSAMLProviderRequest) SetSpBindingNil() { - o.SpBinding.Set(nil) + o.SpBinding = &v } -// UnsetSpBinding ensures that no value is present for SpBinding, not even an explicit nil -func (o *PatchedSAMLProviderRequest) UnsetSpBinding() { - o.SpBinding.Unset() +func (o PatchedSAMLProviderRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) } -func (o PatchedSAMLProviderRequest) MarshalJSON() ([]byte, error) { +func (o PatchedSAMLProviderRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } if o.AuthenticationFlow.IsSet() { toSerialize["authentication_flow"] = o.AuthenticationFlow.Get() } - if o.AuthorizationFlow != nil { + if !IsNil(o.AuthorizationFlow) { toSerialize["authorization_flow"] = o.AuthorizationFlow } - if o.PropertyMappings != nil { + if !IsNil(o.PropertyMappings) { toSerialize["property_mappings"] = o.PropertyMappings } - if o.AcsUrl != nil { + if !IsNil(o.AcsUrl) { toSerialize["acs_url"] = o.AcsUrl } - if o.Audience != nil { + if !IsNil(o.Audience) { toSerialize["audience"] = o.Audience } - if o.Issuer != nil { + if !IsNil(o.Issuer) { toSerialize["issuer"] = o.Issuer } - if o.AssertionValidNotBefore != nil { + if !IsNil(o.AssertionValidNotBefore) { toSerialize["assertion_valid_not_before"] = o.AssertionValidNotBefore } - if o.AssertionValidNotOnOrAfter != nil { + if !IsNil(o.AssertionValidNotOnOrAfter) { toSerialize["assertion_valid_not_on_or_after"] = o.AssertionValidNotOnOrAfter } - if o.SessionValidNotOnOrAfter != nil { + if !IsNil(o.SessionValidNotOnOrAfter) { toSerialize["session_valid_not_on_or_after"] = o.SessionValidNotOnOrAfter } if o.NameIdMapping.IsSet() { toSerialize["name_id_mapping"] = o.NameIdMapping.Get() } - if o.DigestAlgorithm != nil { + if !IsNil(o.DigestAlgorithm) { toSerialize["digest_algorithm"] = o.DigestAlgorithm } - if o.SignatureAlgorithm != nil { + if !IsNil(o.SignatureAlgorithm) { toSerialize["signature_algorithm"] = o.SignatureAlgorithm } if o.SigningKp.IsSet() { @@ -677,10 +676,10 @@ func (o PatchedSAMLProviderRequest) MarshalJSON() ([]byte, error) { if o.VerificationKp.IsSet() { toSerialize["verification_kp"] = o.VerificationKp.Get() } - if o.SpBinding.IsSet() { - toSerialize["sp_binding"] = o.SpBinding.Get() + if !IsNil(o.SpBinding) { + toSerialize["sp_binding"] = o.SpBinding } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedSAMLProviderRequest struct { diff --git a/model_patched_saml_source_request.go b/model_patched_saml_source_request.go index 60cacb2f8..9a7d87e71 100644 --- a/model_patched_saml_source_request.go +++ b/model_patched_saml_source_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedSAMLSourceRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedSAMLSourceRequest{} + // PatchedSAMLSourceRequest SAMLSource Serializer type PatchedSAMLSourceRequest struct { // Source's display Name. @@ -25,11 +28,10 @@ type PatchedSAMLSourceRequest struct { // Flow to use when authenticating existing users. AuthenticationFlow NullableString `json:"authentication_flow,omitempty"` // Flow to use when enrolling new users. - EnrollmentFlow NullableString `json:"enrollment_flow,omitempty"` - PolicyEngineMode *PolicyEngineMode `json:"policy_engine_mode,omitempty"` - // How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. - UserMatchingMode NullableUserMatchingModeEnum `json:"user_matching_mode,omitempty"` - UserPathTemplate *string `json:"user_path_template,omitempty"` + EnrollmentFlow NullableString `json:"enrollment_flow,omitempty"` + PolicyEngineMode *PolicyEngineMode `json:"policy_engine_mode,omitempty"` + UserMatchingMode *UserMatchingModeEnum `json:"user_matching_mode,omitempty"` + UserPathTemplate *string `json:"user_path_template,omitempty"` // Flow used before authentication. PreAuthenticationFlow *string `json:"pre_authentication_flow,omitempty"` // Also known as Entity ID. Defaults the Metadata URL. @@ -39,10 +41,9 @@ type PatchedSAMLSourceRequest struct { // Optional URL if your IDP supports Single-Logout. SloUrl NullableString `json:"slo_url,omitempty"` // Allows authentication flows initiated by the IdP. This can be a security risk, as no validation of the request ID is done. - AllowIdpInitiated *bool `json:"allow_idp_initiated,omitempty"` - // NameID Policy sent to the IdP. Can be unset, in which case no Policy is sent. * `urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress` - Email * `urn:oasis:names:tc:SAML:2.0:nameid-format:persistent` - Persistent * `urn:oasis:names:tc:SAML:2.0:nameid-format:X509SubjectName` - X509 * `urn:oasis:names:tc:SAML:2.0:nameid-format:WindowsDomainQualifiedName` - Windows * `urn:oasis:names:tc:SAML:2.0:nameid-format:transient` - Transient - NameIdPolicy NullableNameIdPolicyEnum `json:"name_id_policy,omitempty"` - BindingType *BindingTypeEnum `json:"binding_type,omitempty"` + AllowIdpInitiated *bool `json:"allow_idp_initiated,omitempty"` + NameIdPolicy *NameIdPolicyEnum `json:"name_id_policy,omitempty"` + BindingType *BindingTypeEnum `json:"binding_type,omitempty"` // Keypair which is used to sign outgoing requests. Leave empty to disable signing. SigningKp NullableString `json:"signing_kp,omitempty"` DigestAlgorithm *DigestAlgorithmEnum `json:"digest_algorithm,omitempty"` @@ -70,7 +71,7 @@ func NewPatchedSAMLSourceRequestWithDefaults() *PatchedSAMLSourceRequest { // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedSAMLSourceRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -80,7 +81,7 @@ func (o *PatchedSAMLSourceRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedSAMLSourceRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -88,7 +89,7 @@ func (o *PatchedSAMLSourceRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedSAMLSourceRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -102,7 +103,7 @@ func (o *PatchedSAMLSourceRequest) SetName(v string) { // GetSlug returns the Slug field value if set, zero value otherwise. func (o *PatchedSAMLSourceRequest) GetSlug() string { - if o == nil || o.Slug == nil { + if o == nil || IsNil(o.Slug) { var ret string return ret } @@ -112,7 +113,7 @@ func (o *PatchedSAMLSourceRequest) GetSlug() string { // GetSlugOk returns a tuple with the Slug field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedSAMLSourceRequest) GetSlugOk() (*string, bool) { - if o == nil || o.Slug == nil { + if o == nil || IsNil(o.Slug) { return nil, false } return o.Slug, true @@ -120,7 +121,7 @@ func (o *PatchedSAMLSourceRequest) GetSlugOk() (*string, bool) { // HasSlug returns a boolean if a field has been set. func (o *PatchedSAMLSourceRequest) HasSlug() bool { - if o != nil && o.Slug != nil { + if o != nil && !IsNil(o.Slug) { return true } @@ -134,7 +135,7 @@ func (o *PatchedSAMLSourceRequest) SetSlug(v string) { // GetEnabled returns the Enabled field value if set, zero value otherwise. func (o *PatchedSAMLSourceRequest) GetEnabled() bool { - if o == nil || o.Enabled == nil { + if o == nil || IsNil(o.Enabled) { var ret bool return ret } @@ -144,7 +145,7 @@ func (o *PatchedSAMLSourceRequest) GetEnabled() bool { // GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedSAMLSourceRequest) GetEnabledOk() (*bool, bool) { - if o == nil || o.Enabled == nil { + if o == nil || IsNil(o.Enabled) { return nil, false } return o.Enabled, true @@ -152,7 +153,7 @@ func (o *PatchedSAMLSourceRequest) GetEnabledOk() (*bool, bool) { // HasEnabled returns a boolean if a field has been set. func (o *PatchedSAMLSourceRequest) HasEnabled() bool { - if o != nil && o.Enabled != nil { + if o != nil && !IsNil(o.Enabled) { return true } @@ -166,7 +167,7 @@ func (o *PatchedSAMLSourceRequest) SetEnabled(v bool) { // GetAuthenticationFlow returns the AuthenticationFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedSAMLSourceRequest) GetAuthenticationFlow() string { - if o == nil || o.AuthenticationFlow.Get() == nil { + if o == nil || IsNil(o.AuthenticationFlow.Get()) { var ret string return ret } @@ -209,7 +210,7 @@ func (o *PatchedSAMLSourceRequest) UnsetAuthenticationFlow() { // GetEnrollmentFlow returns the EnrollmentFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedSAMLSourceRequest) GetEnrollmentFlow() string { - if o == nil || o.EnrollmentFlow.Get() == nil { + if o == nil || IsNil(o.EnrollmentFlow.Get()) { var ret string return ret } @@ -252,7 +253,7 @@ func (o *PatchedSAMLSourceRequest) UnsetEnrollmentFlow() { // GetPolicyEngineMode returns the PolicyEngineMode field value if set, zero value otherwise. func (o *PatchedSAMLSourceRequest) GetPolicyEngineMode() PolicyEngineMode { - if o == nil || o.PolicyEngineMode == nil { + if o == nil || IsNil(o.PolicyEngineMode) { var ret PolicyEngineMode return ret } @@ -262,7 +263,7 @@ func (o *PatchedSAMLSourceRequest) GetPolicyEngineMode() PolicyEngineMode { // GetPolicyEngineModeOk returns a tuple with the PolicyEngineMode field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedSAMLSourceRequest) GetPolicyEngineModeOk() (*PolicyEngineMode, bool) { - if o == nil || o.PolicyEngineMode == nil { + if o == nil || IsNil(o.PolicyEngineMode) { return nil, false } return o.PolicyEngineMode, true @@ -270,7 +271,7 @@ func (o *PatchedSAMLSourceRequest) GetPolicyEngineModeOk() (*PolicyEngineMode, b // HasPolicyEngineMode returns a boolean if a field has been set. func (o *PatchedSAMLSourceRequest) HasPolicyEngineMode() bool { - if o != nil && o.PolicyEngineMode != nil { + if o != nil && !IsNil(o.PolicyEngineMode) { return true } @@ -282,52 +283,41 @@ func (o *PatchedSAMLSourceRequest) SetPolicyEngineMode(v PolicyEngineMode) { o.PolicyEngineMode = &v } -// GetUserMatchingMode returns the UserMatchingMode field value if set, zero value otherwise (both if not set or set to explicit null). +// GetUserMatchingMode returns the UserMatchingMode field value if set, zero value otherwise. func (o *PatchedSAMLSourceRequest) GetUserMatchingMode() UserMatchingModeEnum { - if o == nil || o.UserMatchingMode.Get() == nil { + if o == nil || IsNil(o.UserMatchingMode) { var ret UserMatchingModeEnum return ret } - return *o.UserMatchingMode.Get() + return *o.UserMatchingMode } // GetUserMatchingModeOk returns a tuple with the UserMatchingMode field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PatchedSAMLSourceRequest) GetUserMatchingModeOk() (*UserMatchingModeEnum, bool) { - if o == nil { + if o == nil || IsNil(o.UserMatchingMode) { return nil, false } - return o.UserMatchingMode.Get(), o.UserMatchingMode.IsSet() + return o.UserMatchingMode, true } // HasUserMatchingMode returns a boolean if a field has been set. func (o *PatchedSAMLSourceRequest) HasUserMatchingMode() bool { - if o != nil && o.UserMatchingMode.IsSet() { + if o != nil && !IsNil(o.UserMatchingMode) { return true } return false } -// SetUserMatchingMode gets a reference to the given NullableUserMatchingModeEnum and assigns it to the UserMatchingMode field. +// SetUserMatchingMode gets a reference to the given UserMatchingModeEnum and assigns it to the UserMatchingMode field. func (o *PatchedSAMLSourceRequest) SetUserMatchingMode(v UserMatchingModeEnum) { - o.UserMatchingMode.Set(&v) -} - -// SetUserMatchingModeNil sets the value for UserMatchingMode to be an explicit nil -func (o *PatchedSAMLSourceRequest) SetUserMatchingModeNil() { - o.UserMatchingMode.Set(nil) -} - -// UnsetUserMatchingMode ensures that no value is present for UserMatchingMode, not even an explicit nil -func (o *PatchedSAMLSourceRequest) UnsetUserMatchingMode() { - o.UserMatchingMode.Unset() + o.UserMatchingMode = &v } // GetUserPathTemplate returns the UserPathTemplate field value if set, zero value otherwise. func (o *PatchedSAMLSourceRequest) GetUserPathTemplate() string { - if o == nil || o.UserPathTemplate == nil { + if o == nil || IsNil(o.UserPathTemplate) { var ret string return ret } @@ -337,7 +327,7 @@ func (o *PatchedSAMLSourceRequest) GetUserPathTemplate() string { // GetUserPathTemplateOk returns a tuple with the UserPathTemplate field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedSAMLSourceRequest) GetUserPathTemplateOk() (*string, bool) { - if o == nil || o.UserPathTemplate == nil { + if o == nil || IsNil(o.UserPathTemplate) { return nil, false } return o.UserPathTemplate, true @@ -345,7 +335,7 @@ func (o *PatchedSAMLSourceRequest) GetUserPathTemplateOk() (*string, bool) { // HasUserPathTemplate returns a boolean if a field has been set. func (o *PatchedSAMLSourceRequest) HasUserPathTemplate() bool { - if o != nil && o.UserPathTemplate != nil { + if o != nil && !IsNil(o.UserPathTemplate) { return true } @@ -359,7 +349,7 @@ func (o *PatchedSAMLSourceRequest) SetUserPathTemplate(v string) { // GetPreAuthenticationFlow returns the PreAuthenticationFlow field value if set, zero value otherwise. func (o *PatchedSAMLSourceRequest) GetPreAuthenticationFlow() string { - if o == nil || o.PreAuthenticationFlow == nil { + if o == nil || IsNil(o.PreAuthenticationFlow) { var ret string return ret } @@ -369,7 +359,7 @@ func (o *PatchedSAMLSourceRequest) GetPreAuthenticationFlow() string { // GetPreAuthenticationFlowOk returns a tuple with the PreAuthenticationFlow field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedSAMLSourceRequest) GetPreAuthenticationFlowOk() (*string, bool) { - if o == nil || o.PreAuthenticationFlow == nil { + if o == nil || IsNil(o.PreAuthenticationFlow) { return nil, false } return o.PreAuthenticationFlow, true @@ -377,7 +367,7 @@ func (o *PatchedSAMLSourceRequest) GetPreAuthenticationFlowOk() (*string, bool) // HasPreAuthenticationFlow returns a boolean if a field has been set. func (o *PatchedSAMLSourceRequest) HasPreAuthenticationFlow() bool { - if o != nil && o.PreAuthenticationFlow != nil { + if o != nil && !IsNil(o.PreAuthenticationFlow) { return true } @@ -391,7 +381,7 @@ func (o *PatchedSAMLSourceRequest) SetPreAuthenticationFlow(v string) { // GetIssuer returns the Issuer field value if set, zero value otherwise. func (o *PatchedSAMLSourceRequest) GetIssuer() string { - if o == nil || o.Issuer == nil { + if o == nil || IsNil(o.Issuer) { var ret string return ret } @@ -401,7 +391,7 @@ func (o *PatchedSAMLSourceRequest) GetIssuer() string { // GetIssuerOk returns a tuple with the Issuer field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedSAMLSourceRequest) GetIssuerOk() (*string, bool) { - if o == nil || o.Issuer == nil { + if o == nil || IsNil(o.Issuer) { return nil, false } return o.Issuer, true @@ -409,7 +399,7 @@ func (o *PatchedSAMLSourceRequest) GetIssuerOk() (*string, bool) { // HasIssuer returns a boolean if a field has been set. func (o *PatchedSAMLSourceRequest) HasIssuer() bool { - if o != nil && o.Issuer != nil { + if o != nil && !IsNil(o.Issuer) { return true } @@ -423,7 +413,7 @@ func (o *PatchedSAMLSourceRequest) SetIssuer(v string) { // GetSsoUrl returns the SsoUrl field value if set, zero value otherwise. func (o *PatchedSAMLSourceRequest) GetSsoUrl() string { - if o == nil || o.SsoUrl == nil { + if o == nil || IsNil(o.SsoUrl) { var ret string return ret } @@ -433,7 +423,7 @@ func (o *PatchedSAMLSourceRequest) GetSsoUrl() string { // GetSsoUrlOk returns a tuple with the SsoUrl field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedSAMLSourceRequest) GetSsoUrlOk() (*string, bool) { - if o == nil || o.SsoUrl == nil { + if o == nil || IsNil(o.SsoUrl) { return nil, false } return o.SsoUrl, true @@ -441,7 +431,7 @@ func (o *PatchedSAMLSourceRequest) GetSsoUrlOk() (*string, bool) { // HasSsoUrl returns a boolean if a field has been set. func (o *PatchedSAMLSourceRequest) HasSsoUrl() bool { - if o != nil && o.SsoUrl != nil { + if o != nil && !IsNil(o.SsoUrl) { return true } @@ -455,7 +445,7 @@ func (o *PatchedSAMLSourceRequest) SetSsoUrl(v string) { // GetSloUrl returns the SloUrl field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedSAMLSourceRequest) GetSloUrl() string { - if o == nil || o.SloUrl.Get() == nil { + if o == nil || IsNil(o.SloUrl.Get()) { var ret string return ret } @@ -498,7 +488,7 @@ func (o *PatchedSAMLSourceRequest) UnsetSloUrl() { // GetAllowIdpInitiated returns the AllowIdpInitiated field value if set, zero value otherwise. func (o *PatchedSAMLSourceRequest) GetAllowIdpInitiated() bool { - if o == nil || o.AllowIdpInitiated == nil { + if o == nil || IsNil(o.AllowIdpInitiated) { var ret bool return ret } @@ -508,7 +498,7 @@ func (o *PatchedSAMLSourceRequest) GetAllowIdpInitiated() bool { // GetAllowIdpInitiatedOk returns a tuple with the AllowIdpInitiated field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedSAMLSourceRequest) GetAllowIdpInitiatedOk() (*bool, bool) { - if o == nil || o.AllowIdpInitiated == nil { + if o == nil || IsNil(o.AllowIdpInitiated) { return nil, false } return o.AllowIdpInitiated, true @@ -516,7 +506,7 @@ func (o *PatchedSAMLSourceRequest) GetAllowIdpInitiatedOk() (*bool, bool) { // HasAllowIdpInitiated returns a boolean if a field has been set. func (o *PatchedSAMLSourceRequest) HasAllowIdpInitiated() bool { - if o != nil && o.AllowIdpInitiated != nil { + if o != nil && !IsNil(o.AllowIdpInitiated) { return true } @@ -528,52 +518,41 @@ func (o *PatchedSAMLSourceRequest) SetAllowIdpInitiated(v bool) { o.AllowIdpInitiated = &v } -// GetNameIdPolicy returns the NameIdPolicy field value if set, zero value otherwise (both if not set or set to explicit null). +// GetNameIdPolicy returns the NameIdPolicy field value if set, zero value otherwise. func (o *PatchedSAMLSourceRequest) GetNameIdPolicy() NameIdPolicyEnum { - if o == nil || o.NameIdPolicy.Get() == nil { + if o == nil || IsNil(o.NameIdPolicy) { var ret NameIdPolicyEnum return ret } - return *o.NameIdPolicy.Get() + return *o.NameIdPolicy } // GetNameIdPolicyOk returns a tuple with the NameIdPolicy field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PatchedSAMLSourceRequest) GetNameIdPolicyOk() (*NameIdPolicyEnum, bool) { - if o == nil { + if o == nil || IsNil(o.NameIdPolicy) { return nil, false } - return o.NameIdPolicy.Get(), o.NameIdPolicy.IsSet() + return o.NameIdPolicy, true } // HasNameIdPolicy returns a boolean if a field has been set. func (o *PatchedSAMLSourceRequest) HasNameIdPolicy() bool { - if o != nil && o.NameIdPolicy.IsSet() { + if o != nil && !IsNil(o.NameIdPolicy) { return true } return false } -// SetNameIdPolicy gets a reference to the given NullableNameIdPolicyEnum and assigns it to the NameIdPolicy field. +// SetNameIdPolicy gets a reference to the given NameIdPolicyEnum and assigns it to the NameIdPolicy field. func (o *PatchedSAMLSourceRequest) SetNameIdPolicy(v NameIdPolicyEnum) { - o.NameIdPolicy.Set(&v) -} - -// SetNameIdPolicyNil sets the value for NameIdPolicy to be an explicit nil -func (o *PatchedSAMLSourceRequest) SetNameIdPolicyNil() { - o.NameIdPolicy.Set(nil) -} - -// UnsetNameIdPolicy ensures that no value is present for NameIdPolicy, not even an explicit nil -func (o *PatchedSAMLSourceRequest) UnsetNameIdPolicy() { - o.NameIdPolicy.Unset() + o.NameIdPolicy = &v } // GetBindingType returns the BindingType field value if set, zero value otherwise. func (o *PatchedSAMLSourceRequest) GetBindingType() BindingTypeEnum { - if o == nil || o.BindingType == nil { + if o == nil || IsNil(o.BindingType) { var ret BindingTypeEnum return ret } @@ -583,7 +562,7 @@ func (o *PatchedSAMLSourceRequest) GetBindingType() BindingTypeEnum { // GetBindingTypeOk returns a tuple with the BindingType field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedSAMLSourceRequest) GetBindingTypeOk() (*BindingTypeEnum, bool) { - if o == nil || o.BindingType == nil { + if o == nil || IsNil(o.BindingType) { return nil, false } return o.BindingType, true @@ -591,7 +570,7 @@ func (o *PatchedSAMLSourceRequest) GetBindingTypeOk() (*BindingTypeEnum, bool) { // HasBindingType returns a boolean if a field has been set. func (o *PatchedSAMLSourceRequest) HasBindingType() bool { - if o != nil && o.BindingType != nil { + if o != nil && !IsNil(o.BindingType) { return true } @@ -605,7 +584,7 @@ func (o *PatchedSAMLSourceRequest) SetBindingType(v BindingTypeEnum) { // GetSigningKp returns the SigningKp field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedSAMLSourceRequest) GetSigningKp() string { - if o == nil || o.SigningKp.Get() == nil { + if o == nil || IsNil(o.SigningKp.Get()) { var ret string return ret } @@ -648,7 +627,7 @@ func (o *PatchedSAMLSourceRequest) UnsetSigningKp() { // GetDigestAlgorithm returns the DigestAlgorithm field value if set, zero value otherwise. func (o *PatchedSAMLSourceRequest) GetDigestAlgorithm() DigestAlgorithmEnum { - if o == nil || o.DigestAlgorithm == nil { + if o == nil || IsNil(o.DigestAlgorithm) { var ret DigestAlgorithmEnum return ret } @@ -658,7 +637,7 @@ func (o *PatchedSAMLSourceRequest) GetDigestAlgorithm() DigestAlgorithmEnum { // GetDigestAlgorithmOk returns a tuple with the DigestAlgorithm field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedSAMLSourceRequest) GetDigestAlgorithmOk() (*DigestAlgorithmEnum, bool) { - if o == nil || o.DigestAlgorithm == nil { + if o == nil || IsNil(o.DigestAlgorithm) { return nil, false } return o.DigestAlgorithm, true @@ -666,7 +645,7 @@ func (o *PatchedSAMLSourceRequest) GetDigestAlgorithmOk() (*DigestAlgorithmEnum, // HasDigestAlgorithm returns a boolean if a field has been set. func (o *PatchedSAMLSourceRequest) HasDigestAlgorithm() bool { - if o != nil && o.DigestAlgorithm != nil { + if o != nil && !IsNil(o.DigestAlgorithm) { return true } @@ -680,7 +659,7 @@ func (o *PatchedSAMLSourceRequest) SetDigestAlgorithm(v DigestAlgorithmEnum) { // GetSignatureAlgorithm returns the SignatureAlgorithm field value if set, zero value otherwise. func (o *PatchedSAMLSourceRequest) GetSignatureAlgorithm() SignatureAlgorithmEnum { - if o == nil || o.SignatureAlgorithm == nil { + if o == nil || IsNil(o.SignatureAlgorithm) { var ret SignatureAlgorithmEnum return ret } @@ -690,7 +669,7 @@ func (o *PatchedSAMLSourceRequest) GetSignatureAlgorithm() SignatureAlgorithmEnu // GetSignatureAlgorithmOk returns a tuple with the SignatureAlgorithm field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedSAMLSourceRequest) GetSignatureAlgorithmOk() (*SignatureAlgorithmEnum, bool) { - if o == nil || o.SignatureAlgorithm == nil { + if o == nil || IsNil(o.SignatureAlgorithm) { return nil, false } return o.SignatureAlgorithm, true @@ -698,7 +677,7 @@ func (o *PatchedSAMLSourceRequest) GetSignatureAlgorithmOk() (*SignatureAlgorith // HasSignatureAlgorithm returns a boolean if a field has been set. func (o *PatchedSAMLSourceRequest) HasSignatureAlgorithm() bool { - if o != nil && o.SignatureAlgorithm != nil { + if o != nil && !IsNil(o.SignatureAlgorithm) { return true } @@ -712,7 +691,7 @@ func (o *PatchedSAMLSourceRequest) SetSignatureAlgorithm(v SignatureAlgorithmEnu // GetTemporaryUserDeleteAfter returns the TemporaryUserDeleteAfter field value if set, zero value otherwise. func (o *PatchedSAMLSourceRequest) GetTemporaryUserDeleteAfter() string { - if o == nil || o.TemporaryUserDeleteAfter == nil { + if o == nil || IsNil(o.TemporaryUserDeleteAfter) { var ret string return ret } @@ -722,7 +701,7 @@ func (o *PatchedSAMLSourceRequest) GetTemporaryUserDeleteAfter() string { // GetTemporaryUserDeleteAfterOk returns a tuple with the TemporaryUserDeleteAfter field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedSAMLSourceRequest) GetTemporaryUserDeleteAfterOk() (*string, bool) { - if o == nil || o.TemporaryUserDeleteAfter == nil { + if o == nil || IsNil(o.TemporaryUserDeleteAfter) { return nil, false } return o.TemporaryUserDeleteAfter, true @@ -730,7 +709,7 @@ func (o *PatchedSAMLSourceRequest) GetTemporaryUserDeleteAfterOk() (*string, boo // HasTemporaryUserDeleteAfter returns a boolean if a field has been set. func (o *PatchedSAMLSourceRequest) HasTemporaryUserDeleteAfter() bool { - if o != nil && o.TemporaryUserDeleteAfter != nil { + if o != nil && !IsNil(o.TemporaryUserDeleteAfter) { return true } @@ -743,14 +722,22 @@ func (o *PatchedSAMLSourceRequest) SetTemporaryUserDeleteAfter(v string) { } func (o PatchedSAMLSourceRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedSAMLSourceRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.Slug != nil { + if !IsNil(o.Slug) { toSerialize["slug"] = o.Slug } - if o.Enabled != nil { + if !IsNil(o.Enabled) { toSerialize["enabled"] = o.Enabled } if o.AuthenticationFlow.IsSet() { @@ -759,49 +746,49 @@ func (o PatchedSAMLSourceRequest) MarshalJSON() ([]byte, error) { if o.EnrollmentFlow.IsSet() { toSerialize["enrollment_flow"] = o.EnrollmentFlow.Get() } - if o.PolicyEngineMode != nil { + if !IsNil(o.PolicyEngineMode) { toSerialize["policy_engine_mode"] = o.PolicyEngineMode } - if o.UserMatchingMode.IsSet() { - toSerialize["user_matching_mode"] = o.UserMatchingMode.Get() + if !IsNil(o.UserMatchingMode) { + toSerialize["user_matching_mode"] = o.UserMatchingMode } - if o.UserPathTemplate != nil { + if !IsNil(o.UserPathTemplate) { toSerialize["user_path_template"] = o.UserPathTemplate } - if o.PreAuthenticationFlow != nil { + if !IsNil(o.PreAuthenticationFlow) { toSerialize["pre_authentication_flow"] = o.PreAuthenticationFlow } - if o.Issuer != nil { + if !IsNil(o.Issuer) { toSerialize["issuer"] = o.Issuer } - if o.SsoUrl != nil { + if !IsNil(o.SsoUrl) { toSerialize["sso_url"] = o.SsoUrl } if o.SloUrl.IsSet() { toSerialize["slo_url"] = o.SloUrl.Get() } - if o.AllowIdpInitiated != nil { + if !IsNil(o.AllowIdpInitiated) { toSerialize["allow_idp_initiated"] = o.AllowIdpInitiated } - if o.NameIdPolicy.IsSet() { - toSerialize["name_id_policy"] = o.NameIdPolicy.Get() + if !IsNil(o.NameIdPolicy) { + toSerialize["name_id_policy"] = o.NameIdPolicy } - if o.BindingType != nil { + if !IsNil(o.BindingType) { toSerialize["binding_type"] = o.BindingType } if o.SigningKp.IsSet() { toSerialize["signing_kp"] = o.SigningKp.Get() } - if o.DigestAlgorithm != nil { + if !IsNil(o.DigestAlgorithm) { toSerialize["digest_algorithm"] = o.DigestAlgorithm } - if o.SignatureAlgorithm != nil { + if !IsNil(o.SignatureAlgorithm) { toSerialize["signature_algorithm"] = o.SignatureAlgorithm } - if o.TemporaryUserDeleteAfter != nil { + if !IsNil(o.TemporaryUserDeleteAfter) { toSerialize["temporary_user_delete_after"] = o.TemporaryUserDeleteAfter } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedSAMLSourceRequest struct { diff --git a/model_patched_scim_mapping_request.go b/model_patched_scim_mapping_request.go index 332ce122c..2d5974141 100644 --- a/model_patched_scim_mapping_request.go +++ b/model_patched_scim_mapping_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedSCIMMappingRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedSCIMMappingRequest{} + // PatchedSCIMMappingRequest SCIMMapping Serializer type PatchedSCIMMappingRequest struct { // Objects which are managed by authentik. These objects are created and updated automatically. This is flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. @@ -42,7 +45,7 @@ func NewPatchedSCIMMappingRequestWithDefaults() *PatchedSCIMMappingRequest { // GetManaged returns the Managed field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedSCIMMappingRequest) GetManaged() string { - if o == nil || o.Managed.Get() == nil { + if o == nil || IsNil(o.Managed.Get()) { var ret string return ret } @@ -85,7 +88,7 @@ func (o *PatchedSCIMMappingRequest) UnsetManaged() { // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedSCIMMappingRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -95,7 +98,7 @@ func (o *PatchedSCIMMappingRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedSCIMMappingRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -103,7 +106,7 @@ func (o *PatchedSCIMMappingRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedSCIMMappingRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -117,7 +120,7 @@ func (o *PatchedSCIMMappingRequest) SetName(v string) { // GetExpression returns the Expression field value if set, zero value otherwise. func (o *PatchedSCIMMappingRequest) GetExpression() string { - if o == nil || o.Expression == nil { + if o == nil || IsNil(o.Expression) { var ret string return ret } @@ -127,7 +130,7 @@ func (o *PatchedSCIMMappingRequest) GetExpression() string { // GetExpressionOk returns a tuple with the Expression field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedSCIMMappingRequest) GetExpressionOk() (*string, bool) { - if o == nil || o.Expression == nil { + if o == nil || IsNil(o.Expression) { return nil, false } return o.Expression, true @@ -135,7 +138,7 @@ func (o *PatchedSCIMMappingRequest) GetExpressionOk() (*string, bool) { // HasExpression returns a boolean if a field has been set. func (o *PatchedSCIMMappingRequest) HasExpression() bool { - if o != nil && o.Expression != nil { + if o != nil && !IsNil(o.Expression) { return true } @@ -148,17 +151,25 @@ func (o *PatchedSCIMMappingRequest) SetExpression(v string) { } func (o PatchedSCIMMappingRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedSCIMMappingRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Managed.IsSet() { toSerialize["managed"] = o.Managed.Get() } - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.Expression != nil { + if !IsNil(o.Expression) { toSerialize["expression"] = o.Expression } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedSCIMMappingRequest struct { diff --git a/model_patched_scim_provider_request.go b/model_patched_scim_provider_request.go index 75438188a..c3b2a2dcb 100644 --- a/model_patched_scim_provider_request.go +++ b/model_patched_scim_provider_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedSCIMProviderRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedSCIMProviderRequest{} + // PatchedSCIMProviderRequest SCIMProvider Serializer type PatchedSCIMProviderRequest struct { Name *string `json:"name,omitempty"` @@ -48,7 +51,7 @@ func NewPatchedSCIMProviderRequestWithDefaults() *PatchedSCIMProviderRequest { // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedSCIMProviderRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -58,7 +61,7 @@ func (o *PatchedSCIMProviderRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedSCIMProviderRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -66,7 +69,7 @@ func (o *PatchedSCIMProviderRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedSCIMProviderRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -80,7 +83,7 @@ func (o *PatchedSCIMProviderRequest) SetName(v string) { // GetPropertyMappings returns the PropertyMappings field value if set, zero value otherwise. func (o *PatchedSCIMProviderRequest) GetPropertyMappings() []string { - if o == nil || o.PropertyMappings == nil { + if o == nil || IsNil(o.PropertyMappings) { var ret []string return ret } @@ -90,7 +93,7 @@ func (o *PatchedSCIMProviderRequest) GetPropertyMappings() []string { // GetPropertyMappingsOk returns a tuple with the PropertyMappings field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedSCIMProviderRequest) GetPropertyMappingsOk() ([]string, bool) { - if o == nil || o.PropertyMappings == nil { + if o == nil || IsNil(o.PropertyMappings) { return nil, false } return o.PropertyMappings, true @@ -98,7 +101,7 @@ func (o *PatchedSCIMProviderRequest) GetPropertyMappingsOk() ([]string, bool) { // HasPropertyMappings returns a boolean if a field has been set. func (o *PatchedSCIMProviderRequest) HasPropertyMappings() bool { - if o != nil && o.PropertyMappings != nil { + if o != nil && !IsNil(o.PropertyMappings) { return true } @@ -112,7 +115,7 @@ func (o *PatchedSCIMProviderRequest) SetPropertyMappings(v []string) { // GetPropertyMappingsGroup returns the PropertyMappingsGroup field value if set, zero value otherwise. func (o *PatchedSCIMProviderRequest) GetPropertyMappingsGroup() []string { - if o == nil || o.PropertyMappingsGroup == nil { + if o == nil || IsNil(o.PropertyMappingsGroup) { var ret []string return ret } @@ -122,7 +125,7 @@ func (o *PatchedSCIMProviderRequest) GetPropertyMappingsGroup() []string { // GetPropertyMappingsGroupOk returns a tuple with the PropertyMappingsGroup field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedSCIMProviderRequest) GetPropertyMappingsGroupOk() ([]string, bool) { - if o == nil || o.PropertyMappingsGroup == nil { + if o == nil || IsNil(o.PropertyMappingsGroup) { return nil, false } return o.PropertyMappingsGroup, true @@ -130,7 +133,7 @@ func (o *PatchedSCIMProviderRequest) GetPropertyMappingsGroupOk() ([]string, boo // HasPropertyMappingsGroup returns a boolean if a field has been set. func (o *PatchedSCIMProviderRequest) HasPropertyMappingsGroup() bool { - if o != nil && o.PropertyMappingsGroup != nil { + if o != nil && !IsNil(o.PropertyMappingsGroup) { return true } @@ -144,7 +147,7 @@ func (o *PatchedSCIMProviderRequest) SetPropertyMappingsGroup(v []string) { // GetUrl returns the Url field value if set, zero value otherwise. func (o *PatchedSCIMProviderRequest) GetUrl() string { - if o == nil || o.Url == nil { + if o == nil || IsNil(o.Url) { var ret string return ret } @@ -154,7 +157,7 @@ func (o *PatchedSCIMProviderRequest) GetUrl() string { // GetUrlOk returns a tuple with the Url field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedSCIMProviderRequest) GetUrlOk() (*string, bool) { - if o == nil || o.Url == nil { + if o == nil || IsNil(o.Url) { return nil, false } return o.Url, true @@ -162,7 +165,7 @@ func (o *PatchedSCIMProviderRequest) GetUrlOk() (*string, bool) { // HasUrl returns a boolean if a field has been set. func (o *PatchedSCIMProviderRequest) HasUrl() bool { - if o != nil && o.Url != nil { + if o != nil && !IsNil(o.Url) { return true } @@ -176,7 +179,7 @@ func (o *PatchedSCIMProviderRequest) SetUrl(v string) { // GetToken returns the Token field value if set, zero value otherwise. func (o *PatchedSCIMProviderRequest) GetToken() string { - if o == nil || o.Token == nil { + if o == nil || IsNil(o.Token) { var ret string return ret } @@ -186,7 +189,7 @@ func (o *PatchedSCIMProviderRequest) GetToken() string { // GetTokenOk returns a tuple with the Token field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedSCIMProviderRequest) GetTokenOk() (*string, bool) { - if o == nil || o.Token == nil { + if o == nil || IsNil(o.Token) { return nil, false } return o.Token, true @@ -194,7 +197,7 @@ func (o *PatchedSCIMProviderRequest) GetTokenOk() (*string, bool) { // HasToken returns a boolean if a field has been set. func (o *PatchedSCIMProviderRequest) HasToken() bool { - if o != nil && o.Token != nil { + if o != nil && !IsNil(o.Token) { return true } @@ -208,7 +211,7 @@ func (o *PatchedSCIMProviderRequest) SetToken(v string) { // GetExcludeUsersServiceAccount returns the ExcludeUsersServiceAccount field value if set, zero value otherwise. func (o *PatchedSCIMProviderRequest) GetExcludeUsersServiceAccount() bool { - if o == nil || o.ExcludeUsersServiceAccount == nil { + if o == nil || IsNil(o.ExcludeUsersServiceAccount) { var ret bool return ret } @@ -218,7 +221,7 @@ func (o *PatchedSCIMProviderRequest) GetExcludeUsersServiceAccount() bool { // GetExcludeUsersServiceAccountOk returns a tuple with the ExcludeUsersServiceAccount field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedSCIMProviderRequest) GetExcludeUsersServiceAccountOk() (*bool, bool) { - if o == nil || o.ExcludeUsersServiceAccount == nil { + if o == nil || IsNil(o.ExcludeUsersServiceAccount) { return nil, false } return o.ExcludeUsersServiceAccount, true @@ -226,7 +229,7 @@ func (o *PatchedSCIMProviderRequest) GetExcludeUsersServiceAccountOk() (*bool, b // HasExcludeUsersServiceAccount returns a boolean if a field has been set. func (o *PatchedSCIMProviderRequest) HasExcludeUsersServiceAccount() bool { - if o != nil && o.ExcludeUsersServiceAccount != nil { + if o != nil && !IsNil(o.ExcludeUsersServiceAccount) { return true } @@ -240,7 +243,7 @@ func (o *PatchedSCIMProviderRequest) SetExcludeUsersServiceAccount(v bool) { // GetFilterGroup returns the FilterGroup field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedSCIMProviderRequest) GetFilterGroup() string { - if o == nil || o.FilterGroup.Get() == nil { + if o == nil || IsNil(o.FilterGroup.Get()) { var ret string return ret } @@ -282,29 +285,37 @@ func (o *PatchedSCIMProviderRequest) UnsetFilterGroup() { } func (o PatchedSCIMProviderRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedSCIMProviderRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.PropertyMappings != nil { + if !IsNil(o.PropertyMappings) { toSerialize["property_mappings"] = o.PropertyMappings } - if o.PropertyMappingsGroup != nil { + if !IsNil(o.PropertyMappingsGroup) { toSerialize["property_mappings_group"] = o.PropertyMappingsGroup } - if o.Url != nil { + if !IsNil(o.Url) { toSerialize["url"] = o.Url } - if o.Token != nil { + if !IsNil(o.Token) { toSerialize["token"] = o.Token } - if o.ExcludeUsersServiceAccount != nil { + if !IsNil(o.ExcludeUsersServiceAccount) { toSerialize["exclude_users_service_account"] = o.ExcludeUsersServiceAccount } if o.FilterGroup.IsSet() { toSerialize["filter_group"] = o.FilterGroup.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedSCIMProviderRequest struct { diff --git a/model_patched_scope_mapping_request.go b/model_patched_scope_mapping_request.go index 869291f06..888e89d10 100644 --- a/model_patched_scope_mapping_request.go +++ b/model_patched_scope_mapping_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedScopeMappingRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedScopeMappingRequest{} + // PatchedScopeMappingRequest ScopeMapping Serializer type PatchedScopeMappingRequest struct { // Objects which are managed by authentik. These objects are created and updated automatically. This is flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. @@ -46,7 +49,7 @@ func NewPatchedScopeMappingRequestWithDefaults() *PatchedScopeMappingRequest { // GetManaged returns the Managed field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedScopeMappingRequest) GetManaged() string { - if o == nil || o.Managed.Get() == nil { + if o == nil || IsNil(o.Managed.Get()) { var ret string return ret } @@ -89,7 +92,7 @@ func (o *PatchedScopeMappingRequest) UnsetManaged() { // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedScopeMappingRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -99,7 +102,7 @@ func (o *PatchedScopeMappingRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedScopeMappingRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -107,7 +110,7 @@ func (o *PatchedScopeMappingRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedScopeMappingRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -121,7 +124,7 @@ func (o *PatchedScopeMappingRequest) SetName(v string) { // GetExpression returns the Expression field value if set, zero value otherwise. func (o *PatchedScopeMappingRequest) GetExpression() string { - if o == nil || o.Expression == nil { + if o == nil || IsNil(o.Expression) { var ret string return ret } @@ -131,7 +134,7 @@ func (o *PatchedScopeMappingRequest) GetExpression() string { // GetExpressionOk returns a tuple with the Expression field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedScopeMappingRequest) GetExpressionOk() (*string, bool) { - if o == nil || o.Expression == nil { + if o == nil || IsNil(o.Expression) { return nil, false } return o.Expression, true @@ -139,7 +142,7 @@ func (o *PatchedScopeMappingRequest) GetExpressionOk() (*string, bool) { // HasExpression returns a boolean if a field has been set. func (o *PatchedScopeMappingRequest) HasExpression() bool { - if o != nil && o.Expression != nil { + if o != nil && !IsNil(o.Expression) { return true } @@ -153,7 +156,7 @@ func (o *PatchedScopeMappingRequest) SetExpression(v string) { // GetScopeName returns the ScopeName field value if set, zero value otherwise. func (o *PatchedScopeMappingRequest) GetScopeName() string { - if o == nil || o.ScopeName == nil { + if o == nil || IsNil(o.ScopeName) { var ret string return ret } @@ -163,7 +166,7 @@ func (o *PatchedScopeMappingRequest) GetScopeName() string { // GetScopeNameOk returns a tuple with the ScopeName field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedScopeMappingRequest) GetScopeNameOk() (*string, bool) { - if o == nil || o.ScopeName == nil { + if o == nil || IsNil(o.ScopeName) { return nil, false } return o.ScopeName, true @@ -171,7 +174,7 @@ func (o *PatchedScopeMappingRequest) GetScopeNameOk() (*string, bool) { // HasScopeName returns a boolean if a field has been set. func (o *PatchedScopeMappingRequest) HasScopeName() bool { - if o != nil && o.ScopeName != nil { + if o != nil && !IsNil(o.ScopeName) { return true } @@ -185,7 +188,7 @@ func (o *PatchedScopeMappingRequest) SetScopeName(v string) { // GetDescription returns the Description field value if set, zero value otherwise. func (o *PatchedScopeMappingRequest) GetDescription() string { - if o == nil || o.Description == nil { + if o == nil || IsNil(o.Description) { var ret string return ret } @@ -195,7 +198,7 @@ func (o *PatchedScopeMappingRequest) GetDescription() string { // GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedScopeMappingRequest) GetDescriptionOk() (*string, bool) { - if o == nil || o.Description == nil { + if o == nil || IsNil(o.Description) { return nil, false } return o.Description, true @@ -203,7 +206,7 @@ func (o *PatchedScopeMappingRequest) GetDescriptionOk() (*string, bool) { // HasDescription returns a boolean if a field has been set. func (o *PatchedScopeMappingRequest) HasDescription() bool { - if o != nil && o.Description != nil { + if o != nil && !IsNil(o.Description) { return true } @@ -216,23 +219,31 @@ func (o *PatchedScopeMappingRequest) SetDescription(v string) { } func (o PatchedScopeMappingRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedScopeMappingRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Managed.IsSet() { toSerialize["managed"] = o.Managed.Get() } - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.Expression != nil { + if !IsNil(o.Expression) { toSerialize["expression"] = o.Expression } - if o.ScopeName != nil { + if !IsNil(o.ScopeName) { toSerialize["scope_name"] = o.ScopeName } - if o.Description != nil { + if !IsNil(o.Description) { toSerialize["description"] = o.Description } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedScopeMappingRequest struct { diff --git a/model_patched_sms_device_request.go b/model_patched_sms_device_request.go index c3d043956..1ef6a2522 100644 --- a/model_patched_sms_device_request.go +++ b/model_patched_sms_device_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedSMSDeviceRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedSMSDeviceRequest{} + // PatchedSMSDeviceRequest Serializer for sms authenticator devices type PatchedSMSDeviceRequest struct { // The human-readable name of this device. @@ -40,7 +43,7 @@ func NewPatchedSMSDeviceRequestWithDefaults() *PatchedSMSDeviceRequest { // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedSMSDeviceRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -50,7 +53,7 @@ func (o *PatchedSMSDeviceRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedSMSDeviceRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -58,7 +61,7 @@ func (o *PatchedSMSDeviceRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedSMSDeviceRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -71,11 +74,19 @@ func (o *PatchedSMSDeviceRequest) SetName(v string) { } func (o PatchedSMSDeviceRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedSMSDeviceRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedSMSDeviceRequest struct { diff --git a/model_patched_static_device_request.go b/model_patched_static_device_request.go index 566769261..7e9be1620 100644 --- a/model_patched_static_device_request.go +++ b/model_patched_static_device_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedStaticDeviceRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedStaticDeviceRequest{} + // PatchedStaticDeviceRequest Serializer for static authenticator devices type PatchedStaticDeviceRequest struct { // The human-readable name of this device. @@ -40,7 +43,7 @@ func NewPatchedStaticDeviceRequestWithDefaults() *PatchedStaticDeviceRequest { // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedStaticDeviceRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -50,7 +53,7 @@ func (o *PatchedStaticDeviceRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedStaticDeviceRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -58,7 +61,7 @@ func (o *PatchedStaticDeviceRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedStaticDeviceRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -71,11 +74,19 @@ func (o *PatchedStaticDeviceRequest) SetName(v string) { } func (o PatchedStaticDeviceRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedStaticDeviceRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedStaticDeviceRequest struct { diff --git a/model_patched_tenant_request.go b/model_patched_tenant_request.go index 0c22ea269..ff2d61add 100644 --- a/model_patched_tenant_request.go +++ b/model_patched_tenant_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedTenantRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedTenantRequest{} + // PatchedTenantRequest Tenant Serializer type PatchedTenantRequest struct { // Domain that activates this tenant. Can be a superset, i.e. `a.b` for `aa.b` and `ba.b` @@ -55,7 +58,7 @@ func NewPatchedTenantRequestWithDefaults() *PatchedTenantRequest { // GetDomain returns the Domain field value if set, zero value otherwise. func (o *PatchedTenantRequest) GetDomain() string { - if o == nil || o.Domain == nil { + if o == nil || IsNil(o.Domain) { var ret string return ret } @@ -65,7 +68,7 @@ func (o *PatchedTenantRequest) GetDomain() string { // GetDomainOk returns a tuple with the Domain field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedTenantRequest) GetDomainOk() (*string, bool) { - if o == nil || o.Domain == nil { + if o == nil || IsNil(o.Domain) { return nil, false } return o.Domain, true @@ -73,7 +76,7 @@ func (o *PatchedTenantRequest) GetDomainOk() (*string, bool) { // HasDomain returns a boolean if a field has been set. func (o *PatchedTenantRequest) HasDomain() bool { - if o != nil && o.Domain != nil { + if o != nil && !IsNil(o.Domain) { return true } @@ -87,7 +90,7 @@ func (o *PatchedTenantRequest) SetDomain(v string) { // GetDefault returns the Default field value if set, zero value otherwise. func (o *PatchedTenantRequest) GetDefault() bool { - if o == nil || o.Default == nil { + if o == nil || IsNil(o.Default) { var ret bool return ret } @@ -97,7 +100,7 @@ func (o *PatchedTenantRequest) GetDefault() bool { // GetDefaultOk returns a tuple with the Default field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedTenantRequest) GetDefaultOk() (*bool, bool) { - if o == nil || o.Default == nil { + if o == nil || IsNil(o.Default) { return nil, false } return o.Default, true @@ -105,7 +108,7 @@ func (o *PatchedTenantRequest) GetDefaultOk() (*bool, bool) { // HasDefault returns a boolean if a field has been set. func (o *PatchedTenantRequest) HasDefault() bool { - if o != nil && o.Default != nil { + if o != nil && !IsNil(o.Default) { return true } @@ -119,7 +122,7 @@ func (o *PatchedTenantRequest) SetDefault(v bool) { // GetBrandingTitle returns the BrandingTitle field value if set, zero value otherwise. func (o *PatchedTenantRequest) GetBrandingTitle() string { - if o == nil || o.BrandingTitle == nil { + if o == nil || IsNil(o.BrandingTitle) { var ret string return ret } @@ -129,7 +132,7 @@ func (o *PatchedTenantRequest) GetBrandingTitle() string { // GetBrandingTitleOk returns a tuple with the BrandingTitle field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedTenantRequest) GetBrandingTitleOk() (*string, bool) { - if o == nil || o.BrandingTitle == nil { + if o == nil || IsNil(o.BrandingTitle) { return nil, false } return o.BrandingTitle, true @@ -137,7 +140,7 @@ func (o *PatchedTenantRequest) GetBrandingTitleOk() (*string, bool) { // HasBrandingTitle returns a boolean if a field has been set. func (o *PatchedTenantRequest) HasBrandingTitle() bool { - if o != nil && o.BrandingTitle != nil { + if o != nil && !IsNil(o.BrandingTitle) { return true } @@ -151,7 +154,7 @@ func (o *PatchedTenantRequest) SetBrandingTitle(v string) { // GetBrandingLogo returns the BrandingLogo field value if set, zero value otherwise. func (o *PatchedTenantRequest) GetBrandingLogo() string { - if o == nil || o.BrandingLogo == nil { + if o == nil || IsNil(o.BrandingLogo) { var ret string return ret } @@ -161,7 +164,7 @@ func (o *PatchedTenantRequest) GetBrandingLogo() string { // GetBrandingLogoOk returns a tuple with the BrandingLogo field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedTenantRequest) GetBrandingLogoOk() (*string, bool) { - if o == nil || o.BrandingLogo == nil { + if o == nil || IsNil(o.BrandingLogo) { return nil, false } return o.BrandingLogo, true @@ -169,7 +172,7 @@ func (o *PatchedTenantRequest) GetBrandingLogoOk() (*string, bool) { // HasBrandingLogo returns a boolean if a field has been set. func (o *PatchedTenantRequest) HasBrandingLogo() bool { - if o != nil && o.BrandingLogo != nil { + if o != nil && !IsNil(o.BrandingLogo) { return true } @@ -183,7 +186,7 @@ func (o *PatchedTenantRequest) SetBrandingLogo(v string) { // GetBrandingFavicon returns the BrandingFavicon field value if set, zero value otherwise. func (o *PatchedTenantRequest) GetBrandingFavicon() string { - if o == nil || o.BrandingFavicon == nil { + if o == nil || IsNil(o.BrandingFavicon) { var ret string return ret } @@ -193,7 +196,7 @@ func (o *PatchedTenantRequest) GetBrandingFavicon() string { // GetBrandingFaviconOk returns a tuple with the BrandingFavicon field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedTenantRequest) GetBrandingFaviconOk() (*string, bool) { - if o == nil || o.BrandingFavicon == nil { + if o == nil || IsNil(o.BrandingFavicon) { return nil, false } return o.BrandingFavicon, true @@ -201,7 +204,7 @@ func (o *PatchedTenantRequest) GetBrandingFaviconOk() (*string, bool) { // HasBrandingFavicon returns a boolean if a field has been set. func (o *PatchedTenantRequest) HasBrandingFavicon() bool { - if o != nil && o.BrandingFavicon != nil { + if o != nil && !IsNil(o.BrandingFavicon) { return true } @@ -215,7 +218,7 @@ func (o *PatchedTenantRequest) SetBrandingFavicon(v string) { // GetFlowAuthentication returns the FlowAuthentication field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedTenantRequest) GetFlowAuthentication() string { - if o == nil || o.FlowAuthentication.Get() == nil { + if o == nil || IsNil(o.FlowAuthentication.Get()) { var ret string return ret } @@ -258,7 +261,7 @@ func (o *PatchedTenantRequest) UnsetFlowAuthentication() { // GetFlowInvalidation returns the FlowInvalidation field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedTenantRequest) GetFlowInvalidation() string { - if o == nil || o.FlowInvalidation.Get() == nil { + if o == nil || IsNil(o.FlowInvalidation.Get()) { var ret string return ret } @@ -301,7 +304,7 @@ func (o *PatchedTenantRequest) UnsetFlowInvalidation() { // GetFlowRecovery returns the FlowRecovery field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedTenantRequest) GetFlowRecovery() string { - if o == nil || o.FlowRecovery.Get() == nil { + if o == nil || IsNil(o.FlowRecovery.Get()) { var ret string return ret } @@ -344,7 +347,7 @@ func (o *PatchedTenantRequest) UnsetFlowRecovery() { // GetFlowUnenrollment returns the FlowUnenrollment field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedTenantRequest) GetFlowUnenrollment() string { - if o == nil || o.FlowUnenrollment.Get() == nil { + if o == nil || IsNil(o.FlowUnenrollment.Get()) { var ret string return ret } @@ -387,7 +390,7 @@ func (o *PatchedTenantRequest) UnsetFlowUnenrollment() { // GetFlowUserSettings returns the FlowUserSettings field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedTenantRequest) GetFlowUserSettings() string { - if o == nil || o.FlowUserSettings.Get() == nil { + if o == nil || IsNil(o.FlowUserSettings.Get()) { var ret string return ret } @@ -430,7 +433,7 @@ func (o *PatchedTenantRequest) UnsetFlowUserSettings() { // GetFlowDeviceCode returns the FlowDeviceCode field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedTenantRequest) GetFlowDeviceCode() string { - if o == nil || o.FlowDeviceCode.Get() == nil { + if o == nil || IsNil(o.FlowDeviceCode.Get()) { var ret string return ret } @@ -473,7 +476,7 @@ func (o *PatchedTenantRequest) UnsetFlowDeviceCode() { // GetEventRetention returns the EventRetention field value if set, zero value otherwise. func (o *PatchedTenantRequest) GetEventRetention() string { - if o == nil || o.EventRetention == nil { + if o == nil || IsNil(o.EventRetention) { var ret string return ret } @@ -483,7 +486,7 @@ func (o *PatchedTenantRequest) GetEventRetention() string { // GetEventRetentionOk returns a tuple with the EventRetention field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedTenantRequest) GetEventRetentionOk() (*string, bool) { - if o == nil || o.EventRetention == nil { + if o == nil || IsNil(o.EventRetention) { return nil, false } return o.EventRetention, true @@ -491,7 +494,7 @@ func (o *PatchedTenantRequest) GetEventRetentionOk() (*string, bool) { // HasEventRetention returns a boolean if a field has been set. func (o *PatchedTenantRequest) HasEventRetention() bool { - if o != nil && o.EventRetention != nil { + if o != nil && !IsNil(o.EventRetention) { return true } @@ -505,7 +508,7 @@ func (o *PatchedTenantRequest) SetEventRetention(v string) { // GetWebCertificate returns the WebCertificate field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedTenantRequest) GetWebCertificate() string { - if o == nil || o.WebCertificate.Get() == nil { + if o == nil || IsNil(o.WebCertificate.Get()) { var ret string return ret } @@ -548,7 +551,7 @@ func (o *PatchedTenantRequest) UnsetWebCertificate() { // GetAttributes returns the Attributes field value if set, zero value otherwise. func (o *PatchedTenantRequest) GetAttributes() map[string]interface{} { - if o == nil || o.Attributes == nil { + if o == nil || IsNil(o.Attributes) { var ret map[string]interface{} return ret } @@ -558,15 +561,15 @@ func (o *PatchedTenantRequest) GetAttributes() map[string]interface{} { // GetAttributesOk returns a tuple with the Attributes field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedTenantRequest) GetAttributesOk() (map[string]interface{}, bool) { - if o == nil || o.Attributes == nil { - return nil, false + if o == nil || IsNil(o.Attributes) { + return map[string]interface{}{}, false } return o.Attributes, true } // HasAttributes returns a boolean if a field has been set. func (o *PatchedTenantRequest) HasAttributes() bool { - if o != nil && o.Attributes != nil { + if o != nil && !IsNil(o.Attributes) { return true } @@ -579,20 +582,28 @@ func (o *PatchedTenantRequest) SetAttributes(v map[string]interface{}) { } func (o PatchedTenantRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedTenantRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Domain != nil { + if !IsNil(o.Domain) { toSerialize["domain"] = o.Domain } - if o.Default != nil { + if !IsNil(o.Default) { toSerialize["default"] = o.Default } - if o.BrandingTitle != nil { + if !IsNil(o.BrandingTitle) { toSerialize["branding_title"] = o.BrandingTitle } - if o.BrandingLogo != nil { + if !IsNil(o.BrandingLogo) { toSerialize["branding_logo"] = o.BrandingLogo } - if o.BrandingFavicon != nil { + if !IsNil(o.BrandingFavicon) { toSerialize["branding_favicon"] = o.BrandingFavicon } if o.FlowAuthentication.IsSet() { @@ -613,16 +624,16 @@ func (o PatchedTenantRequest) MarshalJSON() ([]byte, error) { if o.FlowDeviceCode.IsSet() { toSerialize["flow_device_code"] = o.FlowDeviceCode.Get() } - if o.EventRetention != nil { + if !IsNil(o.EventRetention) { toSerialize["event_retention"] = o.EventRetention } if o.WebCertificate.IsSet() { toSerialize["web_certificate"] = o.WebCertificate.Get() } - if o.Attributes != nil { + if !IsNil(o.Attributes) { toSerialize["attributes"] = o.Attributes } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedTenantRequest struct { diff --git a/model_patched_token_request.go b/model_patched_token_request.go index 462dc0505..8843f4285 100644 --- a/model_patched_token_request.go +++ b/model_patched_token_request.go @@ -16,6 +16,9 @@ import ( "time" ) +// checks if the PatchedTokenRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedTokenRequest{} + // PatchedTokenRequest Token Serializer type PatchedTokenRequest struct { // Objects which are managed by authentik. These objects are created and updated automatically. This is flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. @@ -47,7 +50,7 @@ func NewPatchedTokenRequestWithDefaults() *PatchedTokenRequest { // GetManaged returns the Managed field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedTokenRequest) GetManaged() string { - if o == nil || o.Managed.Get() == nil { + if o == nil || IsNil(o.Managed.Get()) { var ret string return ret } @@ -90,7 +93,7 @@ func (o *PatchedTokenRequest) UnsetManaged() { // GetIdentifier returns the Identifier field value if set, zero value otherwise. func (o *PatchedTokenRequest) GetIdentifier() string { - if o == nil || o.Identifier == nil { + if o == nil || IsNil(o.Identifier) { var ret string return ret } @@ -100,7 +103,7 @@ func (o *PatchedTokenRequest) GetIdentifier() string { // GetIdentifierOk returns a tuple with the Identifier field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedTokenRequest) GetIdentifierOk() (*string, bool) { - if o == nil || o.Identifier == nil { + if o == nil || IsNil(o.Identifier) { return nil, false } return o.Identifier, true @@ -108,7 +111,7 @@ func (o *PatchedTokenRequest) GetIdentifierOk() (*string, bool) { // HasIdentifier returns a boolean if a field has been set. func (o *PatchedTokenRequest) HasIdentifier() bool { - if o != nil && o.Identifier != nil { + if o != nil && !IsNil(o.Identifier) { return true } @@ -122,7 +125,7 @@ func (o *PatchedTokenRequest) SetIdentifier(v string) { // GetIntent returns the Intent field value if set, zero value otherwise. func (o *PatchedTokenRequest) GetIntent() IntentEnum { - if o == nil || o.Intent == nil { + if o == nil || IsNil(o.Intent) { var ret IntentEnum return ret } @@ -132,7 +135,7 @@ func (o *PatchedTokenRequest) GetIntent() IntentEnum { // GetIntentOk returns a tuple with the Intent field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedTokenRequest) GetIntentOk() (*IntentEnum, bool) { - if o == nil || o.Intent == nil { + if o == nil || IsNil(o.Intent) { return nil, false } return o.Intent, true @@ -140,7 +143,7 @@ func (o *PatchedTokenRequest) GetIntentOk() (*IntentEnum, bool) { // HasIntent returns a boolean if a field has been set. func (o *PatchedTokenRequest) HasIntent() bool { - if o != nil && o.Intent != nil { + if o != nil && !IsNil(o.Intent) { return true } @@ -154,7 +157,7 @@ func (o *PatchedTokenRequest) SetIntent(v IntentEnum) { // GetUser returns the User field value if set, zero value otherwise. func (o *PatchedTokenRequest) GetUser() int32 { - if o == nil || o.User == nil { + if o == nil || IsNil(o.User) { var ret int32 return ret } @@ -164,7 +167,7 @@ func (o *PatchedTokenRequest) GetUser() int32 { // GetUserOk returns a tuple with the User field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedTokenRequest) GetUserOk() (*int32, bool) { - if o == nil || o.User == nil { + if o == nil || IsNil(o.User) { return nil, false } return o.User, true @@ -172,7 +175,7 @@ func (o *PatchedTokenRequest) GetUserOk() (*int32, bool) { // HasUser returns a boolean if a field has been set. func (o *PatchedTokenRequest) HasUser() bool { - if o != nil && o.User != nil { + if o != nil && !IsNil(o.User) { return true } @@ -186,7 +189,7 @@ func (o *PatchedTokenRequest) SetUser(v int32) { // GetDescription returns the Description field value if set, zero value otherwise. func (o *PatchedTokenRequest) GetDescription() string { - if o == nil || o.Description == nil { + if o == nil || IsNil(o.Description) { var ret string return ret } @@ -196,7 +199,7 @@ func (o *PatchedTokenRequest) GetDescription() string { // GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedTokenRequest) GetDescriptionOk() (*string, bool) { - if o == nil || o.Description == nil { + if o == nil || IsNil(o.Description) { return nil, false } return o.Description, true @@ -204,7 +207,7 @@ func (o *PatchedTokenRequest) GetDescriptionOk() (*string, bool) { // HasDescription returns a boolean if a field has been set. func (o *PatchedTokenRequest) HasDescription() bool { - if o != nil && o.Description != nil { + if o != nil && !IsNil(o.Description) { return true } @@ -218,7 +221,7 @@ func (o *PatchedTokenRequest) SetDescription(v string) { // GetExpires returns the Expires field value if set, zero value otherwise. func (o *PatchedTokenRequest) GetExpires() time.Time { - if o == nil || o.Expires == nil { + if o == nil || IsNil(o.Expires) { var ret time.Time return ret } @@ -228,7 +231,7 @@ func (o *PatchedTokenRequest) GetExpires() time.Time { // GetExpiresOk returns a tuple with the Expires field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedTokenRequest) GetExpiresOk() (*time.Time, bool) { - if o == nil || o.Expires == nil { + if o == nil || IsNil(o.Expires) { return nil, false } return o.Expires, true @@ -236,7 +239,7 @@ func (o *PatchedTokenRequest) GetExpiresOk() (*time.Time, bool) { // HasExpires returns a boolean if a field has been set. func (o *PatchedTokenRequest) HasExpires() bool { - if o != nil && o.Expires != nil { + if o != nil && !IsNil(o.Expires) { return true } @@ -250,7 +253,7 @@ func (o *PatchedTokenRequest) SetExpires(v time.Time) { // GetExpiring returns the Expiring field value if set, zero value otherwise. func (o *PatchedTokenRequest) GetExpiring() bool { - if o == nil || o.Expiring == nil { + if o == nil || IsNil(o.Expiring) { var ret bool return ret } @@ -260,7 +263,7 @@ func (o *PatchedTokenRequest) GetExpiring() bool { // GetExpiringOk returns a tuple with the Expiring field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedTokenRequest) GetExpiringOk() (*bool, bool) { - if o == nil || o.Expiring == nil { + if o == nil || IsNil(o.Expiring) { return nil, false } return o.Expiring, true @@ -268,7 +271,7 @@ func (o *PatchedTokenRequest) GetExpiringOk() (*bool, bool) { // HasExpiring returns a boolean if a field has been set. func (o *PatchedTokenRequest) HasExpiring() bool { - if o != nil && o.Expiring != nil { + if o != nil && !IsNil(o.Expiring) { return true } @@ -281,29 +284,37 @@ func (o *PatchedTokenRequest) SetExpiring(v bool) { } func (o PatchedTokenRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedTokenRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Managed.IsSet() { toSerialize["managed"] = o.Managed.Get() } - if o.Identifier != nil { + if !IsNil(o.Identifier) { toSerialize["identifier"] = o.Identifier } - if o.Intent != nil { + if !IsNil(o.Intent) { toSerialize["intent"] = o.Intent } - if o.User != nil { + if !IsNil(o.User) { toSerialize["user"] = o.User } - if o.Description != nil { + if !IsNil(o.Description) { toSerialize["description"] = o.Description } - if o.Expires != nil { + if !IsNil(o.Expires) { toSerialize["expires"] = o.Expires } - if o.Expiring != nil { + if !IsNil(o.Expiring) { toSerialize["expiring"] = o.Expiring } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedTokenRequest struct { diff --git a/model_patched_totp_device_request.go b/model_patched_totp_device_request.go index d367a4c2b..be9f45bb3 100644 --- a/model_patched_totp_device_request.go +++ b/model_patched_totp_device_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedTOTPDeviceRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedTOTPDeviceRequest{} + // PatchedTOTPDeviceRequest Serializer for totp authenticator devices type PatchedTOTPDeviceRequest struct { // The human-readable name of this device. @@ -40,7 +43,7 @@ func NewPatchedTOTPDeviceRequestWithDefaults() *PatchedTOTPDeviceRequest { // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedTOTPDeviceRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -50,7 +53,7 @@ func (o *PatchedTOTPDeviceRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedTOTPDeviceRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -58,7 +61,7 @@ func (o *PatchedTOTPDeviceRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedTOTPDeviceRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -71,11 +74,19 @@ func (o *PatchedTOTPDeviceRequest) SetName(v string) { } func (o PatchedTOTPDeviceRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedTOTPDeviceRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedTOTPDeviceRequest struct { diff --git a/model_patched_user_delete_stage_request.go b/model_patched_user_delete_stage_request.go index 3df6570b2..d3334d366 100644 --- a/model_patched_user_delete_stage_request.go +++ b/model_patched_user_delete_stage_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedUserDeleteStageRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedUserDeleteStageRequest{} + // PatchedUserDeleteStageRequest UserDeleteStage Serializer type PatchedUserDeleteStageRequest struct { Name *string `json:"name,omitempty"` @@ -40,7 +43,7 @@ func NewPatchedUserDeleteStageRequestWithDefaults() *PatchedUserDeleteStageReque // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedUserDeleteStageRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -50,7 +53,7 @@ func (o *PatchedUserDeleteStageRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedUserDeleteStageRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -58,7 +61,7 @@ func (o *PatchedUserDeleteStageRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedUserDeleteStageRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -72,7 +75,7 @@ func (o *PatchedUserDeleteStageRequest) SetName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *PatchedUserDeleteStageRequest) GetFlowSet() []FlowSetRequest { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSetRequest return ret } @@ -82,7 +85,7 @@ func (o *PatchedUserDeleteStageRequest) GetFlowSet() []FlowSetRequest { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedUserDeleteStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -90,7 +93,7 @@ func (o *PatchedUserDeleteStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) // HasFlowSet returns a boolean if a field has been set. func (o *PatchedUserDeleteStageRequest) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -103,14 +106,22 @@ func (o *PatchedUserDeleteStageRequest) SetFlowSet(v []FlowSetRequest) { } func (o PatchedUserDeleteStageRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedUserDeleteStageRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.FlowSet != nil { + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedUserDeleteStageRequest struct { diff --git a/model_patched_user_login_stage_request.go b/model_patched_user_login_stage_request.go index 4d05d3aa8..3cef65098 100644 --- a/model_patched_user_login_stage_request.go +++ b/model_patched_user_login_stage_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedUserLoginStageRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedUserLoginStageRequest{} + // PatchedUserLoginStageRequest UserLoginStage Serializer type PatchedUserLoginStageRequest struct { Name *string `json:"name,omitempty"` @@ -46,7 +49,7 @@ func NewPatchedUserLoginStageRequestWithDefaults() *PatchedUserLoginStageRequest // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedUserLoginStageRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -56,7 +59,7 @@ func (o *PatchedUserLoginStageRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedUserLoginStageRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -64,7 +67,7 @@ func (o *PatchedUserLoginStageRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedUserLoginStageRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -78,7 +81,7 @@ func (o *PatchedUserLoginStageRequest) SetName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *PatchedUserLoginStageRequest) GetFlowSet() []FlowSetRequest { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSetRequest return ret } @@ -88,7 +91,7 @@ func (o *PatchedUserLoginStageRequest) GetFlowSet() []FlowSetRequest { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedUserLoginStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -96,7 +99,7 @@ func (o *PatchedUserLoginStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { // HasFlowSet returns a boolean if a field has been set. func (o *PatchedUserLoginStageRequest) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -110,7 +113,7 @@ func (o *PatchedUserLoginStageRequest) SetFlowSet(v []FlowSetRequest) { // GetSessionDuration returns the SessionDuration field value if set, zero value otherwise. func (o *PatchedUserLoginStageRequest) GetSessionDuration() string { - if o == nil || o.SessionDuration == nil { + if o == nil || IsNil(o.SessionDuration) { var ret string return ret } @@ -120,7 +123,7 @@ func (o *PatchedUserLoginStageRequest) GetSessionDuration() string { // GetSessionDurationOk returns a tuple with the SessionDuration field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedUserLoginStageRequest) GetSessionDurationOk() (*string, bool) { - if o == nil || o.SessionDuration == nil { + if o == nil || IsNil(o.SessionDuration) { return nil, false } return o.SessionDuration, true @@ -128,7 +131,7 @@ func (o *PatchedUserLoginStageRequest) GetSessionDurationOk() (*string, bool) { // HasSessionDuration returns a boolean if a field has been set. func (o *PatchedUserLoginStageRequest) HasSessionDuration() bool { - if o != nil && o.SessionDuration != nil { + if o != nil && !IsNil(o.SessionDuration) { return true } @@ -142,7 +145,7 @@ func (o *PatchedUserLoginStageRequest) SetSessionDuration(v string) { // GetTerminateOtherSessions returns the TerminateOtherSessions field value if set, zero value otherwise. func (o *PatchedUserLoginStageRequest) GetTerminateOtherSessions() bool { - if o == nil || o.TerminateOtherSessions == nil { + if o == nil || IsNil(o.TerminateOtherSessions) { var ret bool return ret } @@ -152,7 +155,7 @@ func (o *PatchedUserLoginStageRequest) GetTerminateOtherSessions() bool { // GetTerminateOtherSessionsOk returns a tuple with the TerminateOtherSessions field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedUserLoginStageRequest) GetTerminateOtherSessionsOk() (*bool, bool) { - if o == nil || o.TerminateOtherSessions == nil { + if o == nil || IsNil(o.TerminateOtherSessions) { return nil, false } return o.TerminateOtherSessions, true @@ -160,7 +163,7 @@ func (o *PatchedUserLoginStageRequest) GetTerminateOtherSessionsOk() (*bool, boo // HasTerminateOtherSessions returns a boolean if a field has been set. func (o *PatchedUserLoginStageRequest) HasTerminateOtherSessions() bool { - if o != nil && o.TerminateOtherSessions != nil { + if o != nil && !IsNil(o.TerminateOtherSessions) { return true } @@ -174,7 +177,7 @@ func (o *PatchedUserLoginStageRequest) SetTerminateOtherSessions(v bool) { // GetRememberMeOffset returns the RememberMeOffset field value if set, zero value otherwise. func (o *PatchedUserLoginStageRequest) GetRememberMeOffset() string { - if o == nil || o.RememberMeOffset == nil { + if o == nil || IsNil(o.RememberMeOffset) { var ret string return ret } @@ -184,7 +187,7 @@ func (o *PatchedUserLoginStageRequest) GetRememberMeOffset() string { // GetRememberMeOffsetOk returns a tuple with the RememberMeOffset field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedUserLoginStageRequest) GetRememberMeOffsetOk() (*string, bool) { - if o == nil || o.RememberMeOffset == nil { + if o == nil || IsNil(o.RememberMeOffset) { return nil, false } return o.RememberMeOffset, true @@ -192,7 +195,7 @@ func (o *PatchedUserLoginStageRequest) GetRememberMeOffsetOk() (*string, bool) { // HasRememberMeOffset returns a boolean if a field has been set. func (o *PatchedUserLoginStageRequest) HasRememberMeOffset() bool { - if o != nil && o.RememberMeOffset != nil { + if o != nil && !IsNil(o.RememberMeOffset) { return true } @@ -205,23 +208,31 @@ func (o *PatchedUserLoginStageRequest) SetRememberMeOffset(v string) { } func (o PatchedUserLoginStageRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedUserLoginStageRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.FlowSet != nil { + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } - if o.SessionDuration != nil { + if !IsNil(o.SessionDuration) { toSerialize["session_duration"] = o.SessionDuration } - if o.TerminateOtherSessions != nil { + if !IsNil(o.TerminateOtherSessions) { toSerialize["terminate_other_sessions"] = o.TerminateOtherSessions } - if o.RememberMeOffset != nil { + if !IsNil(o.RememberMeOffset) { toSerialize["remember_me_offset"] = o.RememberMeOffset } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedUserLoginStageRequest struct { diff --git a/model_patched_user_logout_stage_request.go b/model_patched_user_logout_stage_request.go index 3bacefe13..5599d4291 100644 --- a/model_patched_user_logout_stage_request.go +++ b/model_patched_user_logout_stage_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedUserLogoutStageRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedUserLogoutStageRequest{} + // PatchedUserLogoutStageRequest UserLogoutStage Serializer type PatchedUserLogoutStageRequest struct { Name *string `json:"name,omitempty"` @@ -40,7 +43,7 @@ func NewPatchedUserLogoutStageRequestWithDefaults() *PatchedUserLogoutStageReque // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedUserLogoutStageRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -50,7 +53,7 @@ func (o *PatchedUserLogoutStageRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedUserLogoutStageRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -58,7 +61,7 @@ func (o *PatchedUserLogoutStageRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedUserLogoutStageRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -72,7 +75,7 @@ func (o *PatchedUserLogoutStageRequest) SetName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *PatchedUserLogoutStageRequest) GetFlowSet() []FlowSetRequest { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSetRequest return ret } @@ -82,7 +85,7 @@ func (o *PatchedUserLogoutStageRequest) GetFlowSet() []FlowSetRequest { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedUserLogoutStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -90,7 +93,7 @@ func (o *PatchedUserLogoutStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) // HasFlowSet returns a boolean if a field has been set. func (o *PatchedUserLogoutStageRequest) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -103,14 +106,22 @@ func (o *PatchedUserLogoutStageRequest) SetFlowSet(v []FlowSetRequest) { } func (o PatchedUserLogoutStageRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedUserLogoutStageRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.FlowSet != nil { + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedUserLogoutStageRequest struct { diff --git a/model_patched_user_o_auth_source_connection_request.go b/model_patched_user_o_auth_source_connection_request.go index bcc26d113..e71813875 100644 --- a/model_patched_user_o_auth_source_connection_request.go +++ b/model_patched_user_o_auth_source_connection_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedUserOAuthSourceConnectionRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedUserOAuthSourceConnectionRequest{} + // PatchedUserOAuthSourceConnectionRequest OAuth Source Serializer type PatchedUserOAuthSourceConnectionRequest struct { User *int32 `json:"user,omitempty"` @@ -41,7 +44,7 @@ func NewPatchedUserOAuthSourceConnectionRequestWithDefaults() *PatchedUserOAuthS // GetUser returns the User field value if set, zero value otherwise. func (o *PatchedUserOAuthSourceConnectionRequest) GetUser() int32 { - if o == nil || o.User == nil { + if o == nil || IsNil(o.User) { var ret int32 return ret } @@ -51,7 +54,7 @@ func (o *PatchedUserOAuthSourceConnectionRequest) GetUser() int32 { // GetUserOk returns a tuple with the User field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedUserOAuthSourceConnectionRequest) GetUserOk() (*int32, bool) { - if o == nil || o.User == nil { + if o == nil || IsNil(o.User) { return nil, false } return o.User, true @@ -59,7 +62,7 @@ func (o *PatchedUserOAuthSourceConnectionRequest) GetUserOk() (*int32, bool) { // HasUser returns a boolean if a field has been set. func (o *PatchedUserOAuthSourceConnectionRequest) HasUser() bool { - if o != nil && o.User != nil { + if o != nil && !IsNil(o.User) { return true } @@ -73,7 +76,7 @@ func (o *PatchedUserOAuthSourceConnectionRequest) SetUser(v int32) { // GetIdentifier returns the Identifier field value if set, zero value otherwise. func (o *PatchedUserOAuthSourceConnectionRequest) GetIdentifier() string { - if o == nil || o.Identifier == nil { + if o == nil || IsNil(o.Identifier) { var ret string return ret } @@ -83,7 +86,7 @@ func (o *PatchedUserOAuthSourceConnectionRequest) GetIdentifier() string { // GetIdentifierOk returns a tuple with the Identifier field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedUserOAuthSourceConnectionRequest) GetIdentifierOk() (*string, bool) { - if o == nil || o.Identifier == nil { + if o == nil || IsNil(o.Identifier) { return nil, false } return o.Identifier, true @@ -91,7 +94,7 @@ func (o *PatchedUserOAuthSourceConnectionRequest) GetIdentifierOk() (*string, bo // HasIdentifier returns a boolean if a field has been set. func (o *PatchedUserOAuthSourceConnectionRequest) HasIdentifier() bool { - if o != nil && o.Identifier != nil { + if o != nil && !IsNil(o.Identifier) { return true } @@ -105,7 +108,7 @@ func (o *PatchedUserOAuthSourceConnectionRequest) SetIdentifier(v string) { // GetAccessToken returns the AccessToken field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedUserOAuthSourceConnectionRequest) GetAccessToken() string { - if o == nil || o.AccessToken.Get() == nil { + if o == nil || IsNil(o.AccessToken.Get()) { var ret string return ret } @@ -147,17 +150,25 @@ func (o *PatchedUserOAuthSourceConnectionRequest) UnsetAccessToken() { } func (o PatchedUserOAuthSourceConnectionRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedUserOAuthSourceConnectionRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.User != nil { + if !IsNil(o.User) { toSerialize["user"] = o.User } - if o.Identifier != nil { + if !IsNil(o.Identifier) { toSerialize["identifier"] = o.Identifier } if o.AccessToken.IsSet() { toSerialize["access_token"] = o.AccessToken.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedUserOAuthSourceConnectionRequest struct { diff --git a/model_patched_user_request.go b/model_patched_user_request.go index de31e3b24..248c52063 100644 --- a/model_patched_user_request.go +++ b/model_patched_user_request.go @@ -16,6 +16,9 @@ import ( "time" ) +// checks if the PatchedUserRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedUserRequest{} + // PatchedUserRequest User Serializer type PatchedUserRequest struct { Username *string `json:"username,omitempty"` @@ -49,7 +52,7 @@ func NewPatchedUserRequestWithDefaults() *PatchedUserRequest { // GetUsername returns the Username field value if set, zero value otherwise. func (o *PatchedUserRequest) GetUsername() string { - if o == nil || o.Username == nil { + if o == nil || IsNil(o.Username) { var ret string return ret } @@ -59,7 +62,7 @@ func (o *PatchedUserRequest) GetUsername() string { // GetUsernameOk returns a tuple with the Username field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedUserRequest) GetUsernameOk() (*string, bool) { - if o == nil || o.Username == nil { + if o == nil || IsNil(o.Username) { return nil, false } return o.Username, true @@ -67,7 +70,7 @@ func (o *PatchedUserRequest) GetUsernameOk() (*string, bool) { // HasUsername returns a boolean if a field has been set. func (o *PatchedUserRequest) HasUsername() bool { - if o != nil && o.Username != nil { + if o != nil && !IsNil(o.Username) { return true } @@ -81,7 +84,7 @@ func (o *PatchedUserRequest) SetUsername(v string) { // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedUserRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -91,7 +94,7 @@ func (o *PatchedUserRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedUserRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -99,7 +102,7 @@ func (o *PatchedUserRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedUserRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -113,7 +116,7 @@ func (o *PatchedUserRequest) SetName(v string) { // GetIsActive returns the IsActive field value if set, zero value otherwise. func (o *PatchedUserRequest) GetIsActive() bool { - if o == nil || o.IsActive == nil { + if o == nil || IsNil(o.IsActive) { var ret bool return ret } @@ -123,7 +126,7 @@ func (o *PatchedUserRequest) GetIsActive() bool { // GetIsActiveOk returns a tuple with the IsActive field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedUserRequest) GetIsActiveOk() (*bool, bool) { - if o == nil || o.IsActive == nil { + if o == nil || IsNil(o.IsActive) { return nil, false } return o.IsActive, true @@ -131,7 +134,7 @@ func (o *PatchedUserRequest) GetIsActiveOk() (*bool, bool) { // HasIsActive returns a boolean if a field has been set. func (o *PatchedUserRequest) HasIsActive() bool { - if o != nil && o.IsActive != nil { + if o != nil && !IsNil(o.IsActive) { return true } @@ -145,7 +148,7 @@ func (o *PatchedUserRequest) SetIsActive(v bool) { // GetLastLogin returns the LastLogin field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedUserRequest) GetLastLogin() time.Time { - if o == nil || o.LastLogin.Get() == nil { + if o == nil || IsNil(o.LastLogin.Get()) { var ret time.Time return ret } @@ -188,7 +191,7 @@ func (o *PatchedUserRequest) UnsetLastLogin() { // GetGroups returns the Groups field value if set, zero value otherwise. func (o *PatchedUserRequest) GetGroups() []string { - if o == nil || o.Groups == nil { + if o == nil || IsNil(o.Groups) { var ret []string return ret } @@ -198,7 +201,7 @@ func (o *PatchedUserRequest) GetGroups() []string { // GetGroupsOk returns a tuple with the Groups field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedUserRequest) GetGroupsOk() ([]string, bool) { - if o == nil || o.Groups == nil { + if o == nil || IsNil(o.Groups) { return nil, false } return o.Groups, true @@ -206,7 +209,7 @@ func (o *PatchedUserRequest) GetGroupsOk() ([]string, bool) { // HasGroups returns a boolean if a field has been set. func (o *PatchedUserRequest) HasGroups() bool { - if o != nil && o.Groups != nil { + if o != nil && !IsNil(o.Groups) { return true } @@ -220,7 +223,7 @@ func (o *PatchedUserRequest) SetGroups(v []string) { // GetEmail returns the Email field value if set, zero value otherwise. func (o *PatchedUserRequest) GetEmail() string { - if o == nil || o.Email == nil { + if o == nil || IsNil(o.Email) { var ret string return ret } @@ -230,7 +233,7 @@ func (o *PatchedUserRequest) GetEmail() string { // GetEmailOk returns a tuple with the Email field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedUserRequest) GetEmailOk() (*string, bool) { - if o == nil || o.Email == nil { + if o == nil || IsNil(o.Email) { return nil, false } return o.Email, true @@ -238,7 +241,7 @@ func (o *PatchedUserRequest) GetEmailOk() (*string, bool) { // HasEmail returns a boolean if a field has been set. func (o *PatchedUserRequest) HasEmail() bool { - if o != nil && o.Email != nil { + if o != nil && !IsNil(o.Email) { return true } @@ -252,7 +255,7 @@ func (o *PatchedUserRequest) SetEmail(v string) { // GetAttributes returns the Attributes field value if set, zero value otherwise. func (o *PatchedUserRequest) GetAttributes() map[string]interface{} { - if o == nil || o.Attributes == nil { + if o == nil || IsNil(o.Attributes) { var ret map[string]interface{} return ret } @@ -262,15 +265,15 @@ func (o *PatchedUserRequest) GetAttributes() map[string]interface{} { // GetAttributesOk returns a tuple with the Attributes field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedUserRequest) GetAttributesOk() (map[string]interface{}, bool) { - if o == nil || o.Attributes == nil { - return nil, false + if o == nil || IsNil(o.Attributes) { + return map[string]interface{}{}, false } return o.Attributes, true } // HasAttributes returns a boolean if a field has been set. func (o *PatchedUserRequest) HasAttributes() bool { - if o != nil && o.Attributes != nil { + if o != nil && !IsNil(o.Attributes) { return true } @@ -284,7 +287,7 @@ func (o *PatchedUserRequest) SetAttributes(v map[string]interface{}) { // GetPath returns the Path field value if set, zero value otherwise. func (o *PatchedUserRequest) GetPath() string { - if o == nil || o.Path == nil { + if o == nil || IsNil(o.Path) { var ret string return ret } @@ -294,7 +297,7 @@ func (o *PatchedUserRequest) GetPath() string { // GetPathOk returns a tuple with the Path field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedUserRequest) GetPathOk() (*string, bool) { - if o == nil || o.Path == nil { + if o == nil || IsNil(o.Path) { return nil, false } return o.Path, true @@ -302,7 +305,7 @@ func (o *PatchedUserRequest) GetPathOk() (*string, bool) { // HasPath returns a boolean if a field has been set. func (o *PatchedUserRequest) HasPath() bool { - if o != nil && o.Path != nil { + if o != nil && !IsNil(o.Path) { return true } @@ -315,32 +318,40 @@ func (o *PatchedUserRequest) SetPath(v string) { } func (o PatchedUserRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedUserRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Username != nil { + if !IsNil(o.Username) { toSerialize["username"] = o.Username } - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.IsActive != nil { + if !IsNil(o.IsActive) { toSerialize["is_active"] = o.IsActive } if o.LastLogin.IsSet() { toSerialize["last_login"] = o.LastLogin.Get() } - if o.Groups != nil { + if !IsNil(o.Groups) { toSerialize["groups"] = o.Groups } - if o.Email != nil { + if !IsNil(o.Email) { toSerialize["email"] = o.Email } - if o.Attributes != nil { + if !IsNil(o.Attributes) { toSerialize["attributes"] = o.Attributes } - if o.Path != nil { + if !IsNil(o.Path) { toSerialize["path"] = o.Path } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedUserRequest struct { diff --git a/model_patched_user_saml_source_connection_request.go b/model_patched_user_saml_source_connection_request.go index b0ad29eae..f66c81c54 100644 --- a/model_patched_user_saml_source_connection_request.go +++ b/model_patched_user_saml_source_connection_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedUserSAMLSourceConnectionRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedUserSAMLSourceConnectionRequest{} + // PatchedUserSAMLSourceConnectionRequest SAML Source Serializer type PatchedUserSAMLSourceConnectionRequest struct { User *int32 `json:"user,omitempty"` @@ -40,7 +43,7 @@ func NewPatchedUserSAMLSourceConnectionRequestWithDefaults() *PatchedUserSAMLSou // GetUser returns the User field value if set, zero value otherwise. func (o *PatchedUserSAMLSourceConnectionRequest) GetUser() int32 { - if o == nil || o.User == nil { + if o == nil || IsNil(o.User) { var ret int32 return ret } @@ -50,7 +53,7 @@ func (o *PatchedUserSAMLSourceConnectionRequest) GetUser() int32 { // GetUserOk returns a tuple with the User field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedUserSAMLSourceConnectionRequest) GetUserOk() (*int32, bool) { - if o == nil || o.User == nil { + if o == nil || IsNil(o.User) { return nil, false } return o.User, true @@ -58,7 +61,7 @@ func (o *PatchedUserSAMLSourceConnectionRequest) GetUserOk() (*int32, bool) { // HasUser returns a boolean if a field has been set. func (o *PatchedUserSAMLSourceConnectionRequest) HasUser() bool { - if o != nil && o.User != nil { + if o != nil && !IsNil(o.User) { return true } @@ -72,7 +75,7 @@ func (o *PatchedUserSAMLSourceConnectionRequest) SetUser(v int32) { // GetIdentifier returns the Identifier field value if set, zero value otherwise. func (o *PatchedUserSAMLSourceConnectionRequest) GetIdentifier() string { - if o == nil || o.Identifier == nil { + if o == nil || IsNil(o.Identifier) { var ret string return ret } @@ -82,7 +85,7 @@ func (o *PatchedUserSAMLSourceConnectionRequest) GetIdentifier() string { // GetIdentifierOk returns a tuple with the Identifier field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedUserSAMLSourceConnectionRequest) GetIdentifierOk() (*string, bool) { - if o == nil || o.Identifier == nil { + if o == nil || IsNil(o.Identifier) { return nil, false } return o.Identifier, true @@ -90,7 +93,7 @@ func (o *PatchedUserSAMLSourceConnectionRequest) GetIdentifierOk() (*string, boo // HasIdentifier returns a boolean if a field has been set. func (o *PatchedUserSAMLSourceConnectionRequest) HasIdentifier() bool { - if o != nil && o.Identifier != nil { + if o != nil && !IsNil(o.Identifier) { return true } @@ -103,14 +106,22 @@ func (o *PatchedUserSAMLSourceConnectionRequest) SetIdentifier(v string) { } func (o PatchedUserSAMLSourceConnectionRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedUserSAMLSourceConnectionRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.User != nil { + if !IsNil(o.User) { toSerialize["user"] = o.User } - if o.Identifier != nil { + if !IsNil(o.Identifier) { toSerialize["identifier"] = o.Identifier } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedUserSAMLSourceConnectionRequest struct { diff --git a/model_patched_user_write_stage_request.go b/model_patched_user_write_stage_request.go index b4f8ee0f6..1963170e8 100644 --- a/model_patched_user_write_stage_request.go +++ b/model_patched_user_write_stage_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedUserWriteStageRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedUserWriteStageRequest{} + // PatchedUserWriteStageRequest UserWriteStage Serializer type PatchedUserWriteStageRequest struct { Name *string `json:"name,omitempty"` @@ -46,7 +49,7 @@ func NewPatchedUserWriteStageRequestWithDefaults() *PatchedUserWriteStageRequest // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedUserWriteStageRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -56,7 +59,7 @@ func (o *PatchedUserWriteStageRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedUserWriteStageRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -64,7 +67,7 @@ func (o *PatchedUserWriteStageRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedUserWriteStageRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -78,7 +81,7 @@ func (o *PatchedUserWriteStageRequest) SetName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *PatchedUserWriteStageRequest) GetFlowSet() []FlowSetRequest { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSetRequest return ret } @@ -88,7 +91,7 @@ func (o *PatchedUserWriteStageRequest) GetFlowSet() []FlowSetRequest { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedUserWriteStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -96,7 +99,7 @@ func (o *PatchedUserWriteStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { // HasFlowSet returns a boolean if a field has been set. func (o *PatchedUserWriteStageRequest) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -110,7 +113,7 @@ func (o *PatchedUserWriteStageRequest) SetFlowSet(v []FlowSetRequest) { // GetUserCreationMode returns the UserCreationMode field value if set, zero value otherwise. func (o *PatchedUserWriteStageRequest) GetUserCreationMode() UserCreationModeEnum { - if o == nil || o.UserCreationMode == nil { + if o == nil || IsNil(o.UserCreationMode) { var ret UserCreationModeEnum return ret } @@ -120,7 +123,7 @@ func (o *PatchedUserWriteStageRequest) GetUserCreationMode() UserCreationModeEnu // GetUserCreationModeOk returns a tuple with the UserCreationMode field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedUserWriteStageRequest) GetUserCreationModeOk() (*UserCreationModeEnum, bool) { - if o == nil || o.UserCreationMode == nil { + if o == nil || IsNil(o.UserCreationMode) { return nil, false } return o.UserCreationMode, true @@ -128,7 +131,7 @@ func (o *PatchedUserWriteStageRequest) GetUserCreationModeOk() (*UserCreationMod // HasUserCreationMode returns a boolean if a field has been set. func (o *PatchedUserWriteStageRequest) HasUserCreationMode() bool { - if o != nil && o.UserCreationMode != nil { + if o != nil && !IsNil(o.UserCreationMode) { return true } @@ -142,7 +145,7 @@ func (o *PatchedUserWriteStageRequest) SetUserCreationMode(v UserCreationModeEnu // GetCreateUsersAsInactive returns the CreateUsersAsInactive field value if set, zero value otherwise. func (o *PatchedUserWriteStageRequest) GetCreateUsersAsInactive() bool { - if o == nil || o.CreateUsersAsInactive == nil { + if o == nil || IsNil(o.CreateUsersAsInactive) { var ret bool return ret } @@ -152,7 +155,7 @@ func (o *PatchedUserWriteStageRequest) GetCreateUsersAsInactive() bool { // GetCreateUsersAsInactiveOk returns a tuple with the CreateUsersAsInactive field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedUserWriteStageRequest) GetCreateUsersAsInactiveOk() (*bool, bool) { - if o == nil || o.CreateUsersAsInactive == nil { + if o == nil || IsNil(o.CreateUsersAsInactive) { return nil, false } return o.CreateUsersAsInactive, true @@ -160,7 +163,7 @@ func (o *PatchedUserWriteStageRequest) GetCreateUsersAsInactiveOk() (*bool, bool // HasCreateUsersAsInactive returns a boolean if a field has been set. func (o *PatchedUserWriteStageRequest) HasCreateUsersAsInactive() bool { - if o != nil && o.CreateUsersAsInactive != nil { + if o != nil && !IsNil(o.CreateUsersAsInactive) { return true } @@ -174,7 +177,7 @@ func (o *PatchedUserWriteStageRequest) SetCreateUsersAsInactive(v bool) { // GetCreateUsersGroup returns the CreateUsersGroup field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PatchedUserWriteStageRequest) GetCreateUsersGroup() string { - if o == nil || o.CreateUsersGroup.Get() == nil { + if o == nil || IsNil(o.CreateUsersGroup.Get()) { var ret string return ret } @@ -217,7 +220,7 @@ func (o *PatchedUserWriteStageRequest) UnsetCreateUsersGroup() { // GetUserPathTemplate returns the UserPathTemplate field value if set, zero value otherwise. func (o *PatchedUserWriteStageRequest) GetUserPathTemplate() string { - if o == nil || o.UserPathTemplate == nil { + if o == nil || IsNil(o.UserPathTemplate) { var ret string return ret } @@ -227,7 +230,7 @@ func (o *PatchedUserWriteStageRequest) GetUserPathTemplate() string { // GetUserPathTemplateOk returns a tuple with the UserPathTemplate field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedUserWriteStageRequest) GetUserPathTemplateOk() (*string, bool) { - if o == nil || o.UserPathTemplate == nil { + if o == nil || IsNil(o.UserPathTemplate) { return nil, false } return o.UserPathTemplate, true @@ -235,7 +238,7 @@ func (o *PatchedUserWriteStageRequest) GetUserPathTemplateOk() (*string, bool) { // HasUserPathTemplate returns a boolean if a field has been set. func (o *PatchedUserWriteStageRequest) HasUserPathTemplate() bool { - if o != nil && o.UserPathTemplate != nil { + if o != nil && !IsNil(o.UserPathTemplate) { return true } @@ -248,26 +251,34 @@ func (o *PatchedUserWriteStageRequest) SetUserPathTemplate(v string) { } func (o PatchedUserWriteStageRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedUserWriteStageRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if o.FlowSet != nil { + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } - if o.UserCreationMode != nil { + if !IsNil(o.UserCreationMode) { toSerialize["user_creation_mode"] = o.UserCreationMode } - if o.CreateUsersAsInactive != nil { + if !IsNil(o.CreateUsersAsInactive) { toSerialize["create_users_as_inactive"] = o.CreateUsersAsInactive } if o.CreateUsersGroup.IsSet() { toSerialize["create_users_group"] = o.CreateUsersGroup.Get() } - if o.UserPathTemplate != nil { + if !IsNil(o.UserPathTemplate) { toSerialize["user_path_template"] = o.UserPathTemplate } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedUserWriteStageRequest struct { diff --git a/model_patched_web_authn_device_request.go b/model_patched_web_authn_device_request.go index 7ce7a3659..f01326ca1 100644 --- a/model_patched_web_authn_device_request.go +++ b/model_patched_web_authn_device_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PatchedWebAuthnDeviceRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedWebAuthnDeviceRequest{} + // PatchedWebAuthnDeviceRequest Serializer for WebAuthn authenticator devices type PatchedWebAuthnDeviceRequest struct { Name *string `json:"name,omitempty"` @@ -39,7 +42,7 @@ func NewPatchedWebAuthnDeviceRequestWithDefaults() *PatchedWebAuthnDeviceRequest // GetName returns the Name field value if set, zero value otherwise. func (o *PatchedWebAuthnDeviceRequest) GetName() string { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } @@ -49,7 +52,7 @@ func (o *PatchedWebAuthnDeviceRequest) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PatchedWebAuthnDeviceRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || IsNil(o.Name) { return nil, false } return o.Name, true @@ -57,7 +60,7 @@ func (o *PatchedWebAuthnDeviceRequest) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *PatchedWebAuthnDeviceRequest) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !IsNil(o.Name) { return true } @@ -70,11 +73,19 @@ func (o *PatchedWebAuthnDeviceRequest) SetName(v string) { } func (o PatchedWebAuthnDeviceRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedWebAuthnDeviceRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !IsNil(o.Name) { toSerialize["name"] = o.Name } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePatchedWebAuthnDeviceRequest struct { diff --git a/model_permission.go b/model_permission.go index 22033d9cd..451d8db14 100644 --- a/model_permission.go +++ b/model_permission.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the Permission type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Permission{} + // Permission Permission used for consent type Permission struct { Name string `json:"name"` @@ -89,16 +92,20 @@ func (o *Permission) SetId(v string) { } func (o Permission) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["id"] = o.Id + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o Permission) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["id"] = o.Id + return toSerialize, nil +} + type NullablePermission struct { value *Permission isSet bool diff --git a/model_plex_authentication_challenge.go b/model_plex_authentication_challenge.go index 93c397c64..b85348b45 100644 --- a/model_plex_authentication_challenge.go +++ b/model_plex_authentication_challenge.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PlexAuthenticationChallenge type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PlexAuthenticationChallenge{} + // PlexAuthenticationChallenge Challenge shown to the user in identification stage type PlexAuthenticationChallenge struct { Type ChallengeChoices `json:"type"` @@ -75,7 +78,7 @@ func (o *PlexAuthenticationChallenge) SetType(v ChallengeChoices) { // GetFlowInfo returns the FlowInfo field value if set, zero value otherwise. func (o *PlexAuthenticationChallenge) GetFlowInfo() ContextualFlowInfo { - if o == nil || o.FlowInfo == nil { + if o == nil || IsNil(o.FlowInfo) { var ret ContextualFlowInfo return ret } @@ -85,7 +88,7 @@ func (o *PlexAuthenticationChallenge) GetFlowInfo() ContextualFlowInfo { // GetFlowInfoOk returns a tuple with the FlowInfo field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PlexAuthenticationChallenge) GetFlowInfoOk() (*ContextualFlowInfo, bool) { - if o == nil || o.FlowInfo == nil { + if o == nil || IsNil(o.FlowInfo) { return nil, false } return o.FlowInfo, true @@ -93,7 +96,7 @@ func (o *PlexAuthenticationChallenge) GetFlowInfoOk() (*ContextualFlowInfo, bool // HasFlowInfo returns a boolean if a field has been set. func (o *PlexAuthenticationChallenge) HasFlowInfo() bool { - if o != nil && o.FlowInfo != nil { + if o != nil && !IsNil(o.FlowInfo) { return true } @@ -107,7 +110,7 @@ func (o *PlexAuthenticationChallenge) SetFlowInfo(v ContextualFlowInfo) { // GetComponent returns the Component field value if set, zero value otherwise. func (o *PlexAuthenticationChallenge) GetComponent() string { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { var ret string return ret } @@ -117,7 +120,7 @@ func (o *PlexAuthenticationChallenge) GetComponent() string { // GetComponentOk returns a tuple with the Component field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PlexAuthenticationChallenge) GetComponentOk() (*string, bool) { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { return nil, false } return o.Component, true @@ -125,7 +128,7 @@ func (o *PlexAuthenticationChallenge) GetComponentOk() (*string, bool) { // HasComponent returns a boolean if a field has been set. func (o *PlexAuthenticationChallenge) HasComponent() bool { - if o != nil && o.Component != nil { + if o != nil && !IsNil(o.Component) { return true } @@ -139,7 +142,7 @@ func (o *PlexAuthenticationChallenge) SetComponent(v string) { // GetResponseErrors returns the ResponseErrors field value if set, zero value otherwise. func (o *PlexAuthenticationChallenge) GetResponseErrors() map[string][]ErrorDetail { - if o == nil || o.ResponseErrors == nil { + if o == nil || IsNil(o.ResponseErrors) { var ret map[string][]ErrorDetail return ret } @@ -149,7 +152,7 @@ func (o *PlexAuthenticationChallenge) GetResponseErrors() map[string][]ErrorDeta // GetResponseErrorsOk returns a tuple with the ResponseErrors field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PlexAuthenticationChallenge) GetResponseErrorsOk() (*map[string][]ErrorDetail, bool) { - if o == nil || o.ResponseErrors == nil { + if o == nil || IsNil(o.ResponseErrors) { return nil, false } return o.ResponseErrors, true @@ -157,7 +160,7 @@ func (o *PlexAuthenticationChallenge) GetResponseErrorsOk() (*map[string][]Error // HasResponseErrors returns a boolean if a field has been set. func (o *PlexAuthenticationChallenge) HasResponseErrors() bool { - if o != nil && o.ResponseErrors != nil { + if o != nil && !IsNil(o.ResponseErrors) { return true } @@ -218,26 +221,28 @@ func (o *PlexAuthenticationChallenge) SetSlug(v string) { } func (o PlexAuthenticationChallenge) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["type"] = o.Type + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.FlowInfo != nil { + return json.Marshal(toSerialize) +} + +func (o PlexAuthenticationChallenge) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + if !IsNil(o.FlowInfo) { toSerialize["flow_info"] = o.FlowInfo } - if o.Component != nil { + if !IsNil(o.Component) { toSerialize["component"] = o.Component } - if o.ResponseErrors != nil { + if !IsNil(o.ResponseErrors) { toSerialize["response_errors"] = o.ResponseErrors } - if true { - toSerialize["client_id"] = o.ClientId - } - if true { - toSerialize["slug"] = o.Slug - } - return json.Marshal(toSerialize) + toSerialize["client_id"] = o.ClientId + toSerialize["slug"] = o.Slug + return toSerialize, nil } type NullablePlexAuthenticationChallenge struct { diff --git a/model_plex_authentication_challenge_response_request.go b/model_plex_authentication_challenge_response_request.go index b35513239..7b4f27b85 100644 --- a/model_plex_authentication_challenge_response_request.go +++ b/model_plex_authentication_challenge_response_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PlexAuthenticationChallengeResponseRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PlexAuthenticationChallengeResponseRequest{} + // PlexAuthenticationChallengeResponseRequest Pseudo class for plex response type PlexAuthenticationChallengeResponseRequest struct { Component *string `json:"component,omitempty"` @@ -43,7 +46,7 @@ func NewPlexAuthenticationChallengeResponseRequestWithDefaults() *PlexAuthentica // GetComponent returns the Component field value if set, zero value otherwise. func (o *PlexAuthenticationChallengeResponseRequest) GetComponent() string { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { var ret string return ret } @@ -53,7 +56,7 @@ func (o *PlexAuthenticationChallengeResponseRequest) GetComponent() string { // GetComponentOk returns a tuple with the Component field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PlexAuthenticationChallengeResponseRequest) GetComponentOk() (*string, bool) { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { return nil, false } return o.Component, true @@ -61,7 +64,7 @@ func (o *PlexAuthenticationChallengeResponseRequest) GetComponentOk() (*string, // HasComponent returns a boolean if a field has been set. func (o *PlexAuthenticationChallengeResponseRequest) HasComponent() bool { - if o != nil && o.Component != nil { + if o != nil && !IsNil(o.Component) { return true } @@ -74,11 +77,19 @@ func (o *PlexAuthenticationChallengeResponseRequest) SetComponent(v string) { } func (o PlexAuthenticationChallengeResponseRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PlexAuthenticationChallengeResponseRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Component != nil { + if !IsNil(o.Component) { toSerialize["component"] = o.Component } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePlexAuthenticationChallengeResponseRequest struct { diff --git a/model_plex_source.go b/model_plex_source.go index 4d46b4b3b..e08e44ef4 100644 --- a/model_plex_source.go +++ b/model_plex_source.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PlexSource type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PlexSource{} + // PlexSource Plex Source Serializer type PlexSource struct { Pk string `json:"pk"` @@ -34,10 +37,9 @@ type PlexSource struct { // Return object's plural verbose_name VerboseNamePlural string `json:"verbose_name_plural"` // Return internal model name - MetaModelName string `json:"meta_model_name"` - PolicyEngineMode *PolicyEngineMode `json:"policy_engine_mode,omitempty"` - // How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. - UserMatchingMode NullableUserMatchingModeEnum `json:"user_matching_mode,omitempty"` + MetaModelName string `json:"meta_model_name"` + PolicyEngineMode *PolicyEngineMode `json:"policy_engine_mode,omitempty"` + UserMatchingMode *UserMatchingModeEnum `json:"user_matching_mode,omitempty"` // Objects which are managed by authentik. These objects are created and updated automatically. This is flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. Managed NullableString `json:"managed"` UserPathTemplate *string `json:"user_path_template,omitempty"` @@ -154,7 +156,7 @@ func (o *PlexSource) SetSlug(v string) { // GetEnabled returns the Enabled field value if set, zero value otherwise. func (o *PlexSource) GetEnabled() bool { - if o == nil || o.Enabled == nil { + if o == nil || IsNil(o.Enabled) { var ret bool return ret } @@ -164,7 +166,7 @@ func (o *PlexSource) GetEnabled() bool { // GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PlexSource) GetEnabledOk() (*bool, bool) { - if o == nil || o.Enabled == nil { + if o == nil || IsNil(o.Enabled) { return nil, false } return o.Enabled, true @@ -172,7 +174,7 @@ func (o *PlexSource) GetEnabledOk() (*bool, bool) { // HasEnabled returns a boolean if a field has been set. func (o *PlexSource) HasEnabled() bool { - if o != nil && o.Enabled != nil { + if o != nil && !IsNil(o.Enabled) { return true } @@ -186,7 +188,7 @@ func (o *PlexSource) SetEnabled(v bool) { // GetAuthenticationFlow returns the AuthenticationFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PlexSource) GetAuthenticationFlow() string { - if o == nil || o.AuthenticationFlow.Get() == nil { + if o == nil || IsNil(o.AuthenticationFlow.Get()) { var ret string return ret } @@ -229,7 +231,7 @@ func (o *PlexSource) UnsetAuthenticationFlow() { // GetEnrollmentFlow returns the EnrollmentFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PlexSource) GetEnrollmentFlow() string { - if o == nil || o.EnrollmentFlow.Get() == nil { + if o == nil || IsNil(o.EnrollmentFlow.Get()) { var ret string return ret } @@ -368,7 +370,7 @@ func (o *PlexSource) SetMetaModelName(v string) { // GetPolicyEngineMode returns the PolicyEngineMode field value if set, zero value otherwise. func (o *PlexSource) GetPolicyEngineMode() PolicyEngineMode { - if o == nil || o.PolicyEngineMode == nil { + if o == nil || IsNil(o.PolicyEngineMode) { var ret PolicyEngineMode return ret } @@ -378,7 +380,7 @@ func (o *PlexSource) GetPolicyEngineMode() PolicyEngineMode { // GetPolicyEngineModeOk returns a tuple with the PolicyEngineMode field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PlexSource) GetPolicyEngineModeOk() (*PolicyEngineMode, bool) { - if o == nil || o.PolicyEngineMode == nil { + if o == nil || IsNil(o.PolicyEngineMode) { return nil, false } return o.PolicyEngineMode, true @@ -386,7 +388,7 @@ func (o *PlexSource) GetPolicyEngineModeOk() (*PolicyEngineMode, bool) { // HasPolicyEngineMode returns a boolean if a field has been set. func (o *PlexSource) HasPolicyEngineMode() bool { - if o != nil && o.PolicyEngineMode != nil { + if o != nil && !IsNil(o.PolicyEngineMode) { return true } @@ -398,47 +400,36 @@ func (o *PlexSource) SetPolicyEngineMode(v PolicyEngineMode) { o.PolicyEngineMode = &v } -// GetUserMatchingMode returns the UserMatchingMode field value if set, zero value otherwise (both if not set or set to explicit null). +// GetUserMatchingMode returns the UserMatchingMode field value if set, zero value otherwise. func (o *PlexSource) GetUserMatchingMode() UserMatchingModeEnum { - if o == nil || o.UserMatchingMode.Get() == nil { + if o == nil || IsNil(o.UserMatchingMode) { var ret UserMatchingModeEnum return ret } - return *o.UserMatchingMode.Get() + return *o.UserMatchingMode } // GetUserMatchingModeOk returns a tuple with the UserMatchingMode field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PlexSource) GetUserMatchingModeOk() (*UserMatchingModeEnum, bool) { - if o == nil { + if o == nil || IsNil(o.UserMatchingMode) { return nil, false } - return o.UserMatchingMode.Get(), o.UserMatchingMode.IsSet() + return o.UserMatchingMode, true } // HasUserMatchingMode returns a boolean if a field has been set. func (o *PlexSource) HasUserMatchingMode() bool { - if o != nil && o.UserMatchingMode.IsSet() { + if o != nil && !IsNil(o.UserMatchingMode) { return true } return false } -// SetUserMatchingMode gets a reference to the given NullableUserMatchingModeEnum and assigns it to the UserMatchingMode field. +// SetUserMatchingMode gets a reference to the given UserMatchingModeEnum and assigns it to the UserMatchingMode field. func (o *PlexSource) SetUserMatchingMode(v UserMatchingModeEnum) { - o.UserMatchingMode.Set(&v) -} - -// SetUserMatchingModeNil sets the value for UserMatchingMode to be an explicit nil -func (o *PlexSource) SetUserMatchingModeNil() { - o.UserMatchingMode.Set(nil) -} - -// UnsetUserMatchingMode ensures that no value is present for UserMatchingMode, not even an explicit nil -func (o *PlexSource) UnsetUserMatchingMode() { - o.UserMatchingMode.Unset() + o.UserMatchingMode = &v } // GetManaged returns the Managed field value @@ -469,7 +460,7 @@ func (o *PlexSource) SetManaged(v string) { // GetUserPathTemplate returns the UserPathTemplate field value if set, zero value otherwise. func (o *PlexSource) GetUserPathTemplate() string { - if o == nil || o.UserPathTemplate == nil { + if o == nil || IsNil(o.UserPathTemplate) { var ret string return ret } @@ -479,7 +470,7 @@ func (o *PlexSource) GetUserPathTemplate() string { // GetUserPathTemplateOk returns a tuple with the UserPathTemplate field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PlexSource) GetUserPathTemplateOk() (*string, bool) { - if o == nil || o.UserPathTemplate == nil { + if o == nil || IsNil(o.UserPathTemplate) { return nil, false } return o.UserPathTemplate, true @@ -487,7 +478,7 @@ func (o *PlexSource) GetUserPathTemplateOk() (*string, bool) { // HasUserPathTemplate returns a boolean if a field has been set. func (o *PlexSource) HasUserPathTemplate() bool { - if o != nil && o.UserPathTemplate != nil { + if o != nil && !IsNil(o.UserPathTemplate) { return true } @@ -527,7 +518,7 @@ func (o *PlexSource) SetIcon(v string) { // GetClientId returns the ClientId field value if set, zero value otherwise. func (o *PlexSource) GetClientId() string { - if o == nil || o.ClientId == nil { + if o == nil || IsNil(o.ClientId) { var ret string return ret } @@ -537,7 +528,7 @@ func (o *PlexSource) GetClientId() string { // GetClientIdOk returns a tuple with the ClientId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PlexSource) GetClientIdOk() (*string, bool) { - if o == nil || o.ClientId == nil { + if o == nil || IsNil(o.ClientId) { return nil, false } return o.ClientId, true @@ -545,7 +536,7 @@ func (o *PlexSource) GetClientIdOk() (*string, bool) { // HasClientId returns a boolean if a field has been set. func (o *PlexSource) HasClientId() bool { - if o != nil && o.ClientId != nil { + if o != nil && !IsNil(o.ClientId) { return true } @@ -559,7 +550,7 @@ func (o *PlexSource) SetClientId(v string) { // GetAllowedServers returns the AllowedServers field value if set, zero value otherwise. func (o *PlexSource) GetAllowedServers() []string { - if o == nil || o.AllowedServers == nil { + if o == nil || IsNil(o.AllowedServers) { var ret []string return ret } @@ -569,7 +560,7 @@ func (o *PlexSource) GetAllowedServers() []string { // GetAllowedServersOk returns a tuple with the AllowedServers field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PlexSource) GetAllowedServersOk() ([]string, bool) { - if o == nil || o.AllowedServers == nil { + if o == nil || IsNil(o.AllowedServers) { return nil, false } return o.AllowedServers, true @@ -577,7 +568,7 @@ func (o *PlexSource) GetAllowedServersOk() ([]string, bool) { // HasAllowedServers returns a boolean if a field has been set. func (o *PlexSource) HasAllowedServers() bool { - if o != nil && o.AllowedServers != nil { + if o != nil && !IsNil(o.AllowedServers) { return true } @@ -591,7 +582,7 @@ func (o *PlexSource) SetAllowedServers(v []string) { // GetAllowFriends returns the AllowFriends field value if set, zero value otherwise. func (o *PlexSource) GetAllowFriends() bool { - if o == nil || o.AllowFriends == nil { + if o == nil || IsNil(o.AllowFriends) { var ret bool return ret } @@ -601,7 +592,7 @@ func (o *PlexSource) GetAllowFriends() bool { // GetAllowFriendsOk returns a tuple with the AllowFriends field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PlexSource) GetAllowFriendsOk() (*bool, bool) { - if o == nil || o.AllowFriends == nil { + if o == nil || IsNil(o.AllowFriends) { return nil, false } return o.AllowFriends, true @@ -609,7 +600,7 @@ func (o *PlexSource) GetAllowFriendsOk() (*bool, bool) { // HasAllowFriends returns a boolean if a field has been set. func (o *PlexSource) HasAllowFriends() bool { - if o != nil && o.AllowFriends != nil { + if o != nil && !IsNil(o.AllowFriends) { return true } @@ -646,17 +637,19 @@ func (o *PlexSource) SetPlexToken(v string) { } func (o PlexSource) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if true { - toSerialize["slug"] = o.Slug - } - if o.Enabled != nil { + return json.Marshal(toSerialize) +} + +func (o PlexSource) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name + toSerialize["slug"] = o.Slug + if !IsNil(o.Enabled) { toSerialize["enabled"] = o.Enabled } if o.AuthenticationFlow.IsSet() { @@ -665,46 +658,32 @@ func (o PlexSource) MarshalJSON() ([]byte, error) { if o.EnrollmentFlow.IsSet() { toSerialize["enrollment_flow"] = o.EnrollmentFlow.Get() } - if true { - toSerialize["component"] = o.Component - } - if true { - toSerialize["verbose_name"] = o.VerboseName - } - if true { - toSerialize["verbose_name_plural"] = o.VerboseNamePlural - } - if true { - toSerialize["meta_model_name"] = o.MetaModelName - } - if o.PolicyEngineMode != nil { + // skip: component is readOnly + // skip: verbose_name is readOnly + // skip: verbose_name_plural is readOnly + // skip: meta_model_name is readOnly + if !IsNil(o.PolicyEngineMode) { toSerialize["policy_engine_mode"] = o.PolicyEngineMode } - if o.UserMatchingMode.IsSet() { - toSerialize["user_matching_mode"] = o.UserMatchingMode.Get() - } - if true { - toSerialize["managed"] = o.Managed.Get() + if !IsNil(o.UserMatchingMode) { + toSerialize["user_matching_mode"] = o.UserMatchingMode } - if o.UserPathTemplate != nil { + toSerialize["managed"] = o.Managed.Get() + if !IsNil(o.UserPathTemplate) { toSerialize["user_path_template"] = o.UserPathTemplate } - if true { - toSerialize["icon"] = o.Icon.Get() - } - if o.ClientId != nil { + toSerialize["icon"] = o.Icon.Get() + if !IsNil(o.ClientId) { toSerialize["client_id"] = o.ClientId } - if o.AllowedServers != nil { + if !IsNil(o.AllowedServers) { toSerialize["allowed_servers"] = o.AllowedServers } - if o.AllowFriends != nil { + if !IsNil(o.AllowFriends) { toSerialize["allow_friends"] = o.AllowFriends } - if true { - toSerialize["plex_token"] = o.PlexToken - } - return json.Marshal(toSerialize) + toSerialize["plex_token"] = o.PlexToken + return toSerialize, nil } type NullablePlexSource struct { diff --git a/model_plex_source_connection.go b/model_plex_source_connection.go index 836e68fb1..75cd2bf2a 100644 --- a/model_plex_source_connection.go +++ b/model_plex_source_connection.go @@ -15,20 +15,23 @@ import ( "encoding/json" ) +// checks if the PlexSourceConnection type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PlexSourceConnection{} + // PlexSourceConnection Plex Source connection Serializer type PlexSourceConnection struct { - Pk int32 `json:"pk"` - User int32 `json:"user"` - Source PlexSourceConnectionSource `json:"source"` - Identifier string `json:"identifier"` - PlexToken string `json:"plex_token"` + Pk int32 `json:"pk"` + User int32 `json:"user"` + Source Source `json:"source"` + Identifier string `json:"identifier"` + PlexToken string `json:"plex_token"` } // NewPlexSourceConnection instantiates a new PlexSourceConnection object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewPlexSourceConnection(pk int32, user int32, source PlexSourceConnectionSource, identifier string, plexToken string) *PlexSourceConnection { +func NewPlexSourceConnection(pk int32, user int32, source Source, identifier string, plexToken string) *PlexSourceConnection { this := PlexSourceConnection{} this.Pk = pk this.User = user @@ -95,9 +98,9 @@ func (o *PlexSourceConnection) SetUser(v int32) { } // GetSource returns the Source field value -func (o *PlexSourceConnection) GetSource() PlexSourceConnectionSource { +func (o *PlexSourceConnection) GetSource() Source { if o == nil { - var ret PlexSourceConnectionSource + var ret Source return ret } @@ -106,7 +109,7 @@ func (o *PlexSourceConnection) GetSource() PlexSourceConnectionSource { // GetSourceOk returns a tuple with the Source field value // and a boolean to check if the value has been set. -func (o *PlexSourceConnection) GetSourceOk() (*PlexSourceConnectionSource, bool) { +func (o *PlexSourceConnection) GetSourceOk() (*Source, bool) { if o == nil { return nil, false } @@ -114,7 +117,7 @@ func (o *PlexSourceConnection) GetSourceOk() (*PlexSourceConnectionSource, bool) } // SetSource sets field value -func (o *PlexSourceConnection) SetSource(v PlexSourceConnectionSource) { +func (o *PlexSourceConnection) SetSource(v Source) { o.Source = v } @@ -167,25 +170,23 @@ func (o *PlexSourceConnection) SetPlexToken(v string) { } func (o PlexSourceConnection) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["user"] = o.User - } - if true { - toSerialize["source"] = o.Source - } - if true { - toSerialize["identifier"] = o.Identifier - } - if true { - toSerialize["plex_token"] = o.PlexToken + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PlexSourceConnection) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + // skip: user is readOnly + // skip: source is readOnly + toSerialize["identifier"] = o.Identifier + toSerialize["plex_token"] = o.PlexToken + return toSerialize, nil +} + type NullablePlexSourceConnection struct { value *PlexSourceConnection isSet bool diff --git a/model_plex_source_connection_request.go b/model_plex_source_connection_request.go index 84ea7ab87..4acea44f8 100644 --- a/model_plex_source_connection_request.go +++ b/model_plex_source_connection_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PlexSourceConnectionRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PlexSourceConnectionRequest{} + // PlexSourceConnectionRequest Plex Source connection Serializer type PlexSourceConnectionRequest struct { Identifier string `json:"identifier"` @@ -89,16 +92,20 @@ func (o *PlexSourceConnectionRequest) SetPlexToken(v string) { } func (o PlexSourceConnectionRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["identifier"] = o.Identifier - } - if true { - toSerialize["plex_token"] = o.PlexToken + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PlexSourceConnectionRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["identifier"] = o.Identifier + toSerialize["plex_token"] = o.PlexToken + return toSerialize, nil +} + type NullablePlexSourceConnectionRequest struct { value *PlexSourceConnectionRequest isSet bool diff --git a/model_plex_source_connection_source.go b/model_plex_source_connection_source.go deleted file mode 100644 index 80d0954a9..000000000 --- a/model_plex_source_connection_source.go +++ /dev/null @@ -1,603 +0,0 @@ -/* -authentik - -Making authentication simple. - -API version: 2023.3.1 -Contact: hello@goauthentik.io -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package api - -import ( - "encoding/json" -) - -// PlexSourceConnectionSource struct for PlexSourceConnectionSource -type PlexSourceConnectionSource struct { - Pk string `json:"pk"` - // Source's display Name. - Name string `json:"name"` - // Internal source name, used in URLs. - Slug string `json:"slug"` - Enabled *bool `json:"enabled,omitempty"` - // Flow to use when authenticating existing users. - AuthenticationFlow NullableString `json:"authentication_flow,omitempty"` - // Flow to use when enrolling new users. - EnrollmentFlow NullableString `json:"enrollment_flow,omitempty"` - // Get object component so that we know how to edit the object - Component string `json:"component"` - // Return object's verbose_name - VerboseName string `json:"verbose_name"` - // Return object's plural verbose_name - VerboseNamePlural string `json:"verbose_name_plural"` - // Return internal model name - MetaModelName string `json:"meta_model_name"` - PolicyEngineMode *PolicyEngineMode `json:"policy_engine_mode,omitempty"` - // How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. - UserMatchingMode NullableUserMatchingModeEnum `json:"user_matching_mode,omitempty"` - // Objects which are managed by authentik. These objects are created and updated automatically. This is flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. - Managed NullableString `json:"managed"` - UserPathTemplate *string `json:"user_path_template,omitempty"` - // Get the URL to the Icon. If the name is /static or starts with http it is returned as-is - Icon NullableString `json:"icon"` -} - -// NewPlexSourceConnectionSource instantiates a new PlexSourceConnectionSource object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewPlexSourceConnectionSource(pk string, name string, slug string, component string, verboseName string, verboseNamePlural string, metaModelName string, managed NullableString, icon NullableString) *PlexSourceConnectionSource { - this := PlexSourceConnectionSource{} - this.Pk = pk - this.Name = name - this.Slug = slug - this.Component = component - this.VerboseName = verboseName - this.VerboseNamePlural = verboseNamePlural - this.MetaModelName = metaModelName - this.Managed = managed - this.Icon = icon - return &this -} - -// NewPlexSourceConnectionSourceWithDefaults instantiates a new PlexSourceConnectionSource object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewPlexSourceConnectionSourceWithDefaults() *PlexSourceConnectionSource { - this := PlexSourceConnectionSource{} - return &this -} - -// GetPk returns the Pk field value -func (o *PlexSourceConnectionSource) GetPk() string { - if o == nil { - var ret string - return ret - } - - return o.Pk -} - -// GetPkOk returns a tuple with the Pk field value -// and a boolean to check if the value has been set. -func (o *PlexSourceConnectionSource) GetPkOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Pk, true -} - -// SetPk sets field value -func (o *PlexSourceConnectionSource) SetPk(v string) { - o.Pk = v -} - -// GetName returns the Name field value -func (o *PlexSourceConnectionSource) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *PlexSourceConnectionSource) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *PlexSourceConnectionSource) SetName(v string) { - o.Name = v -} - -// GetSlug returns the Slug field value -func (o *PlexSourceConnectionSource) GetSlug() string { - if o == nil { - var ret string - return ret - } - - return o.Slug -} - -// GetSlugOk returns a tuple with the Slug field value -// and a boolean to check if the value has been set. -func (o *PlexSourceConnectionSource) GetSlugOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Slug, true -} - -// SetSlug sets field value -func (o *PlexSourceConnectionSource) SetSlug(v string) { - o.Slug = v -} - -// GetEnabled returns the Enabled field value if set, zero value otherwise. -func (o *PlexSourceConnectionSource) GetEnabled() bool { - if o == nil || o.Enabled == nil { - var ret bool - return ret - } - return *o.Enabled -} - -// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PlexSourceConnectionSource) GetEnabledOk() (*bool, bool) { - if o == nil || o.Enabled == nil { - return nil, false - } - return o.Enabled, true -} - -// HasEnabled returns a boolean if a field has been set. -func (o *PlexSourceConnectionSource) HasEnabled() bool { - if o != nil && o.Enabled != nil { - return true - } - - return false -} - -// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. -func (o *PlexSourceConnectionSource) SetEnabled(v bool) { - o.Enabled = &v -} - -// GetAuthenticationFlow returns the AuthenticationFlow field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *PlexSourceConnectionSource) GetAuthenticationFlow() string { - if o == nil || o.AuthenticationFlow.Get() == nil { - var ret string - return ret - } - return *o.AuthenticationFlow.Get() -} - -// GetAuthenticationFlowOk returns a tuple with the AuthenticationFlow field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PlexSourceConnectionSource) GetAuthenticationFlowOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.AuthenticationFlow.Get(), o.AuthenticationFlow.IsSet() -} - -// HasAuthenticationFlow returns a boolean if a field has been set. -func (o *PlexSourceConnectionSource) HasAuthenticationFlow() bool { - if o != nil && o.AuthenticationFlow.IsSet() { - return true - } - - return false -} - -// SetAuthenticationFlow gets a reference to the given NullableString and assigns it to the AuthenticationFlow field. -func (o *PlexSourceConnectionSource) SetAuthenticationFlow(v string) { - o.AuthenticationFlow.Set(&v) -} - -// SetAuthenticationFlowNil sets the value for AuthenticationFlow to be an explicit nil -func (o *PlexSourceConnectionSource) SetAuthenticationFlowNil() { - o.AuthenticationFlow.Set(nil) -} - -// UnsetAuthenticationFlow ensures that no value is present for AuthenticationFlow, not even an explicit nil -func (o *PlexSourceConnectionSource) UnsetAuthenticationFlow() { - o.AuthenticationFlow.Unset() -} - -// GetEnrollmentFlow returns the EnrollmentFlow field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *PlexSourceConnectionSource) GetEnrollmentFlow() string { - if o == nil || o.EnrollmentFlow.Get() == nil { - var ret string - return ret - } - return *o.EnrollmentFlow.Get() -} - -// GetEnrollmentFlowOk returns a tuple with the EnrollmentFlow field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PlexSourceConnectionSource) GetEnrollmentFlowOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.EnrollmentFlow.Get(), o.EnrollmentFlow.IsSet() -} - -// HasEnrollmentFlow returns a boolean if a field has been set. -func (o *PlexSourceConnectionSource) HasEnrollmentFlow() bool { - if o != nil && o.EnrollmentFlow.IsSet() { - return true - } - - return false -} - -// SetEnrollmentFlow gets a reference to the given NullableString and assigns it to the EnrollmentFlow field. -func (o *PlexSourceConnectionSource) SetEnrollmentFlow(v string) { - o.EnrollmentFlow.Set(&v) -} - -// SetEnrollmentFlowNil sets the value for EnrollmentFlow to be an explicit nil -func (o *PlexSourceConnectionSource) SetEnrollmentFlowNil() { - o.EnrollmentFlow.Set(nil) -} - -// UnsetEnrollmentFlow ensures that no value is present for EnrollmentFlow, not even an explicit nil -func (o *PlexSourceConnectionSource) UnsetEnrollmentFlow() { - o.EnrollmentFlow.Unset() -} - -// GetComponent returns the Component field value -func (o *PlexSourceConnectionSource) GetComponent() string { - if o == nil { - var ret string - return ret - } - - return o.Component -} - -// GetComponentOk returns a tuple with the Component field value -// and a boolean to check if the value has been set. -func (o *PlexSourceConnectionSource) GetComponentOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Component, true -} - -// SetComponent sets field value -func (o *PlexSourceConnectionSource) SetComponent(v string) { - o.Component = v -} - -// GetVerboseName returns the VerboseName field value -func (o *PlexSourceConnectionSource) GetVerboseName() string { - if o == nil { - var ret string - return ret - } - - return o.VerboseName -} - -// GetVerboseNameOk returns a tuple with the VerboseName field value -// and a boolean to check if the value has been set. -func (o *PlexSourceConnectionSource) GetVerboseNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.VerboseName, true -} - -// SetVerboseName sets field value -func (o *PlexSourceConnectionSource) SetVerboseName(v string) { - o.VerboseName = v -} - -// GetVerboseNamePlural returns the VerboseNamePlural field value -func (o *PlexSourceConnectionSource) GetVerboseNamePlural() string { - if o == nil { - var ret string - return ret - } - - return o.VerboseNamePlural -} - -// GetVerboseNamePluralOk returns a tuple with the VerboseNamePlural field value -// and a boolean to check if the value has been set. -func (o *PlexSourceConnectionSource) GetVerboseNamePluralOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.VerboseNamePlural, true -} - -// SetVerboseNamePlural sets field value -func (o *PlexSourceConnectionSource) SetVerboseNamePlural(v string) { - o.VerboseNamePlural = v -} - -// GetMetaModelName returns the MetaModelName field value -func (o *PlexSourceConnectionSource) GetMetaModelName() string { - if o == nil { - var ret string - return ret - } - - return o.MetaModelName -} - -// GetMetaModelNameOk returns a tuple with the MetaModelName field value -// and a boolean to check if the value has been set. -func (o *PlexSourceConnectionSource) GetMetaModelNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.MetaModelName, true -} - -// SetMetaModelName sets field value -func (o *PlexSourceConnectionSource) SetMetaModelName(v string) { - o.MetaModelName = v -} - -// GetPolicyEngineMode returns the PolicyEngineMode field value if set, zero value otherwise. -func (o *PlexSourceConnectionSource) GetPolicyEngineMode() PolicyEngineMode { - if o == nil || o.PolicyEngineMode == nil { - var ret PolicyEngineMode - return ret - } - return *o.PolicyEngineMode -} - -// GetPolicyEngineModeOk returns a tuple with the PolicyEngineMode field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PlexSourceConnectionSource) GetPolicyEngineModeOk() (*PolicyEngineMode, bool) { - if o == nil || o.PolicyEngineMode == nil { - return nil, false - } - return o.PolicyEngineMode, true -} - -// HasPolicyEngineMode returns a boolean if a field has been set. -func (o *PlexSourceConnectionSource) HasPolicyEngineMode() bool { - if o != nil && o.PolicyEngineMode != nil { - return true - } - - return false -} - -// SetPolicyEngineMode gets a reference to the given PolicyEngineMode and assigns it to the PolicyEngineMode field. -func (o *PlexSourceConnectionSource) SetPolicyEngineMode(v PolicyEngineMode) { - o.PolicyEngineMode = &v -} - -// GetUserMatchingMode returns the UserMatchingMode field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *PlexSourceConnectionSource) GetUserMatchingMode() UserMatchingModeEnum { - if o == nil || o.UserMatchingMode.Get() == nil { - var ret UserMatchingModeEnum - return ret - } - return *o.UserMatchingMode.Get() -} - -// GetUserMatchingModeOk returns a tuple with the UserMatchingMode field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PlexSourceConnectionSource) GetUserMatchingModeOk() (*UserMatchingModeEnum, bool) { - if o == nil { - return nil, false - } - return o.UserMatchingMode.Get(), o.UserMatchingMode.IsSet() -} - -// HasUserMatchingMode returns a boolean if a field has been set. -func (o *PlexSourceConnectionSource) HasUserMatchingMode() bool { - if o != nil && o.UserMatchingMode.IsSet() { - return true - } - - return false -} - -// SetUserMatchingMode gets a reference to the given NullableUserMatchingModeEnum and assigns it to the UserMatchingMode field. -func (o *PlexSourceConnectionSource) SetUserMatchingMode(v UserMatchingModeEnum) { - o.UserMatchingMode.Set(&v) -} - -// SetUserMatchingModeNil sets the value for UserMatchingMode to be an explicit nil -func (o *PlexSourceConnectionSource) SetUserMatchingModeNil() { - o.UserMatchingMode.Set(nil) -} - -// UnsetUserMatchingMode ensures that no value is present for UserMatchingMode, not even an explicit nil -func (o *PlexSourceConnectionSource) UnsetUserMatchingMode() { - o.UserMatchingMode.Unset() -} - -// GetManaged returns the Managed field value -// If the value is explicit nil, the zero value for string will be returned -func (o *PlexSourceConnectionSource) GetManaged() string { - if o == nil || o.Managed.Get() == nil { - var ret string - return ret - } - - return *o.Managed.Get() -} - -// GetManagedOk returns a tuple with the Managed field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PlexSourceConnectionSource) GetManagedOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Managed.Get(), o.Managed.IsSet() -} - -// SetManaged sets field value -func (o *PlexSourceConnectionSource) SetManaged(v string) { - o.Managed.Set(&v) -} - -// GetUserPathTemplate returns the UserPathTemplate field value if set, zero value otherwise. -func (o *PlexSourceConnectionSource) GetUserPathTemplate() string { - if o == nil || o.UserPathTemplate == nil { - var ret string - return ret - } - return *o.UserPathTemplate -} - -// GetUserPathTemplateOk returns a tuple with the UserPathTemplate field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PlexSourceConnectionSource) GetUserPathTemplateOk() (*string, bool) { - if o == nil || o.UserPathTemplate == nil { - return nil, false - } - return o.UserPathTemplate, true -} - -// HasUserPathTemplate returns a boolean if a field has been set. -func (o *PlexSourceConnectionSource) HasUserPathTemplate() bool { - if o != nil && o.UserPathTemplate != nil { - return true - } - - return false -} - -// SetUserPathTemplate gets a reference to the given string and assigns it to the UserPathTemplate field. -func (o *PlexSourceConnectionSource) SetUserPathTemplate(v string) { - o.UserPathTemplate = &v -} - -// GetIcon returns the Icon field value -// If the value is explicit nil, the zero value for string will be returned -func (o *PlexSourceConnectionSource) GetIcon() string { - if o == nil || o.Icon.Get() == nil { - var ret string - return ret - } - - return *o.Icon.Get() -} - -// GetIconOk returns a tuple with the Icon field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PlexSourceConnectionSource) GetIconOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Icon.Get(), o.Icon.IsSet() -} - -// SetIcon sets field value -func (o *PlexSourceConnectionSource) SetIcon(v string) { - o.Icon.Set(&v) -} - -func (o PlexSourceConnectionSource) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["slug"] = o.Slug - } - if o.Enabled != nil { - toSerialize["enabled"] = o.Enabled - } - if o.AuthenticationFlow.IsSet() { - toSerialize["authentication_flow"] = o.AuthenticationFlow.Get() - } - if o.EnrollmentFlow.IsSet() { - toSerialize["enrollment_flow"] = o.EnrollmentFlow.Get() - } - if true { - toSerialize["component"] = o.Component - } - if true { - toSerialize["verbose_name"] = o.VerboseName - } - if true { - toSerialize["verbose_name_plural"] = o.VerboseNamePlural - } - if true { - toSerialize["meta_model_name"] = o.MetaModelName - } - if o.PolicyEngineMode != nil { - toSerialize["policy_engine_mode"] = o.PolicyEngineMode - } - if o.UserMatchingMode.IsSet() { - toSerialize["user_matching_mode"] = o.UserMatchingMode.Get() - } - if true { - toSerialize["managed"] = o.Managed.Get() - } - if o.UserPathTemplate != nil { - toSerialize["user_path_template"] = o.UserPathTemplate - } - if true { - toSerialize["icon"] = o.Icon.Get() - } - return json.Marshal(toSerialize) -} - -type NullablePlexSourceConnectionSource struct { - value *PlexSourceConnectionSource - isSet bool -} - -func (v NullablePlexSourceConnectionSource) Get() *PlexSourceConnectionSource { - return v.value -} - -func (v *NullablePlexSourceConnectionSource) Set(val *PlexSourceConnectionSource) { - v.value = val - v.isSet = true -} - -func (v NullablePlexSourceConnectionSource) IsSet() bool { - return v.isSet -} - -func (v *NullablePlexSourceConnectionSource) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePlexSourceConnectionSource(val *PlexSourceConnectionSource) *NullablePlexSourceConnectionSource { - return &NullablePlexSourceConnectionSource{value: val, isSet: true} -} - -func (v NullablePlexSourceConnectionSource) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePlexSourceConnectionSource) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/model_plex_source_request.go b/model_plex_source_request.go index 8813147d3..023a663c5 100644 --- a/model_plex_source_request.go +++ b/model_plex_source_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PlexSourceRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PlexSourceRequest{} + // PlexSourceRequest Plex Source Serializer type PlexSourceRequest struct { // Source's display Name. @@ -25,11 +28,10 @@ type PlexSourceRequest struct { // Flow to use when authenticating existing users. AuthenticationFlow NullableString `json:"authentication_flow,omitempty"` // Flow to use when enrolling new users. - EnrollmentFlow NullableString `json:"enrollment_flow,omitempty"` - PolicyEngineMode *PolicyEngineMode `json:"policy_engine_mode,omitempty"` - // How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. - UserMatchingMode NullableUserMatchingModeEnum `json:"user_matching_mode,omitempty"` - UserPathTemplate *string `json:"user_path_template,omitempty"` + EnrollmentFlow NullableString `json:"enrollment_flow,omitempty"` + PolicyEngineMode *PolicyEngineMode `json:"policy_engine_mode,omitempty"` + UserMatchingMode *UserMatchingModeEnum `json:"user_matching_mode,omitempty"` + UserPathTemplate *string `json:"user_path_template,omitempty"` // Client identifier used to talk to Plex. ClientId *string `json:"client_id,omitempty"` // Which servers a user has to be a member of to be granted access. Empty list allows every server. @@ -110,7 +112,7 @@ func (o *PlexSourceRequest) SetSlug(v string) { // GetEnabled returns the Enabled field value if set, zero value otherwise. func (o *PlexSourceRequest) GetEnabled() bool { - if o == nil || o.Enabled == nil { + if o == nil || IsNil(o.Enabled) { var ret bool return ret } @@ -120,7 +122,7 @@ func (o *PlexSourceRequest) GetEnabled() bool { // GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PlexSourceRequest) GetEnabledOk() (*bool, bool) { - if o == nil || o.Enabled == nil { + if o == nil || IsNil(o.Enabled) { return nil, false } return o.Enabled, true @@ -128,7 +130,7 @@ func (o *PlexSourceRequest) GetEnabledOk() (*bool, bool) { // HasEnabled returns a boolean if a field has been set. func (o *PlexSourceRequest) HasEnabled() bool { - if o != nil && o.Enabled != nil { + if o != nil && !IsNil(o.Enabled) { return true } @@ -142,7 +144,7 @@ func (o *PlexSourceRequest) SetEnabled(v bool) { // GetAuthenticationFlow returns the AuthenticationFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PlexSourceRequest) GetAuthenticationFlow() string { - if o == nil || o.AuthenticationFlow.Get() == nil { + if o == nil || IsNil(o.AuthenticationFlow.Get()) { var ret string return ret } @@ -185,7 +187,7 @@ func (o *PlexSourceRequest) UnsetAuthenticationFlow() { // GetEnrollmentFlow returns the EnrollmentFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PlexSourceRequest) GetEnrollmentFlow() string { - if o == nil || o.EnrollmentFlow.Get() == nil { + if o == nil || IsNil(o.EnrollmentFlow.Get()) { var ret string return ret } @@ -228,7 +230,7 @@ func (o *PlexSourceRequest) UnsetEnrollmentFlow() { // GetPolicyEngineMode returns the PolicyEngineMode field value if set, zero value otherwise. func (o *PlexSourceRequest) GetPolicyEngineMode() PolicyEngineMode { - if o == nil || o.PolicyEngineMode == nil { + if o == nil || IsNil(o.PolicyEngineMode) { var ret PolicyEngineMode return ret } @@ -238,7 +240,7 @@ func (o *PlexSourceRequest) GetPolicyEngineMode() PolicyEngineMode { // GetPolicyEngineModeOk returns a tuple with the PolicyEngineMode field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PlexSourceRequest) GetPolicyEngineModeOk() (*PolicyEngineMode, bool) { - if o == nil || o.PolicyEngineMode == nil { + if o == nil || IsNil(o.PolicyEngineMode) { return nil, false } return o.PolicyEngineMode, true @@ -246,7 +248,7 @@ func (o *PlexSourceRequest) GetPolicyEngineModeOk() (*PolicyEngineMode, bool) { // HasPolicyEngineMode returns a boolean if a field has been set. func (o *PlexSourceRequest) HasPolicyEngineMode() bool { - if o != nil && o.PolicyEngineMode != nil { + if o != nil && !IsNil(o.PolicyEngineMode) { return true } @@ -258,52 +260,41 @@ func (o *PlexSourceRequest) SetPolicyEngineMode(v PolicyEngineMode) { o.PolicyEngineMode = &v } -// GetUserMatchingMode returns the UserMatchingMode field value if set, zero value otherwise (both if not set or set to explicit null). +// GetUserMatchingMode returns the UserMatchingMode field value if set, zero value otherwise. func (o *PlexSourceRequest) GetUserMatchingMode() UserMatchingModeEnum { - if o == nil || o.UserMatchingMode.Get() == nil { + if o == nil || IsNil(o.UserMatchingMode) { var ret UserMatchingModeEnum return ret } - return *o.UserMatchingMode.Get() + return *o.UserMatchingMode } // GetUserMatchingModeOk returns a tuple with the UserMatchingMode field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PlexSourceRequest) GetUserMatchingModeOk() (*UserMatchingModeEnum, bool) { - if o == nil { + if o == nil || IsNil(o.UserMatchingMode) { return nil, false } - return o.UserMatchingMode.Get(), o.UserMatchingMode.IsSet() + return o.UserMatchingMode, true } // HasUserMatchingMode returns a boolean if a field has been set. func (o *PlexSourceRequest) HasUserMatchingMode() bool { - if o != nil && o.UserMatchingMode.IsSet() { + if o != nil && !IsNil(o.UserMatchingMode) { return true } return false } -// SetUserMatchingMode gets a reference to the given NullableUserMatchingModeEnum and assigns it to the UserMatchingMode field. +// SetUserMatchingMode gets a reference to the given UserMatchingModeEnum and assigns it to the UserMatchingMode field. func (o *PlexSourceRequest) SetUserMatchingMode(v UserMatchingModeEnum) { - o.UserMatchingMode.Set(&v) -} - -// SetUserMatchingModeNil sets the value for UserMatchingMode to be an explicit nil -func (o *PlexSourceRequest) SetUserMatchingModeNil() { - o.UserMatchingMode.Set(nil) -} - -// UnsetUserMatchingMode ensures that no value is present for UserMatchingMode, not even an explicit nil -func (o *PlexSourceRequest) UnsetUserMatchingMode() { - o.UserMatchingMode.Unset() + o.UserMatchingMode = &v } // GetUserPathTemplate returns the UserPathTemplate field value if set, zero value otherwise. func (o *PlexSourceRequest) GetUserPathTemplate() string { - if o == nil || o.UserPathTemplate == nil { + if o == nil || IsNil(o.UserPathTemplate) { var ret string return ret } @@ -313,7 +304,7 @@ func (o *PlexSourceRequest) GetUserPathTemplate() string { // GetUserPathTemplateOk returns a tuple with the UserPathTemplate field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PlexSourceRequest) GetUserPathTemplateOk() (*string, bool) { - if o == nil || o.UserPathTemplate == nil { + if o == nil || IsNil(o.UserPathTemplate) { return nil, false } return o.UserPathTemplate, true @@ -321,7 +312,7 @@ func (o *PlexSourceRequest) GetUserPathTemplateOk() (*string, bool) { // HasUserPathTemplate returns a boolean if a field has been set. func (o *PlexSourceRequest) HasUserPathTemplate() bool { - if o != nil && o.UserPathTemplate != nil { + if o != nil && !IsNil(o.UserPathTemplate) { return true } @@ -335,7 +326,7 @@ func (o *PlexSourceRequest) SetUserPathTemplate(v string) { // GetClientId returns the ClientId field value if set, zero value otherwise. func (o *PlexSourceRequest) GetClientId() string { - if o == nil || o.ClientId == nil { + if o == nil || IsNil(o.ClientId) { var ret string return ret } @@ -345,7 +336,7 @@ func (o *PlexSourceRequest) GetClientId() string { // GetClientIdOk returns a tuple with the ClientId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PlexSourceRequest) GetClientIdOk() (*string, bool) { - if o == nil || o.ClientId == nil { + if o == nil || IsNil(o.ClientId) { return nil, false } return o.ClientId, true @@ -353,7 +344,7 @@ func (o *PlexSourceRequest) GetClientIdOk() (*string, bool) { // HasClientId returns a boolean if a field has been set. func (o *PlexSourceRequest) HasClientId() bool { - if o != nil && o.ClientId != nil { + if o != nil && !IsNil(o.ClientId) { return true } @@ -367,7 +358,7 @@ func (o *PlexSourceRequest) SetClientId(v string) { // GetAllowedServers returns the AllowedServers field value if set, zero value otherwise. func (o *PlexSourceRequest) GetAllowedServers() []string { - if o == nil || o.AllowedServers == nil { + if o == nil || IsNil(o.AllowedServers) { var ret []string return ret } @@ -377,7 +368,7 @@ func (o *PlexSourceRequest) GetAllowedServers() []string { // GetAllowedServersOk returns a tuple with the AllowedServers field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PlexSourceRequest) GetAllowedServersOk() ([]string, bool) { - if o == nil || o.AllowedServers == nil { + if o == nil || IsNil(o.AllowedServers) { return nil, false } return o.AllowedServers, true @@ -385,7 +376,7 @@ func (o *PlexSourceRequest) GetAllowedServersOk() ([]string, bool) { // HasAllowedServers returns a boolean if a field has been set. func (o *PlexSourceRequest) HasAllowedServers() bool { - if o != nil && o.AllowedServers != nil { + if o != nil && !IsNil(o.AllowedServers) { return true } @@ -399,7 +390,7 @@ func (o *PlexSourceRequest) SetAllowedServers(v []string) { // GetAllowFriends returns the AllowFriends field value if set, zero value otherwise. func (o *PlexSourceRequest) GetAllowFriends() bool { - if o == nil || o.AllowFriends == nil { + if o == nil || IsNil(o.AllowFriends) { var ret bool return ret } @@ -409,7 +400,7 @@ func (o *PlexSourceRequest) GetAllowFriends() bool { // GetAllowFriendsOk returns a tuple with the AllowFriends field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PlexSourceRequest) GetAllowFriendsOk() (*bool, bool) { - if o == nil || o.AllowFriends == nil { + if o == nil || IsNil(o.AllowFriends) { return nil, false } return o.AllowFriends, true @@ -417,7 +408,7 @@ func (o *PlexSourceRequest) GetAllowFriendsOk() (*bool, bool) { // HasAllowFriends returns a boolean if a field has been set. func (o *PlexSourceRequest) HasAllowFriends() bool { - if o != nil && o.AllowFriends != nil { + if o != nil && !IsNil(o.AllowFriends) { return true } @@ -454,14 +445,18 @@ func (o *PlexSourceRequest) SetPlexToken(v string) { } func (o PlexSourceRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if true { - toSerialize["slug"] = o.Slug - } - if o.Enabled != nil { + return json.Marshal(toSerialize) +} + +func (o PlexSourceRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["slug"] = o.Slug + if !IsNil(o.Enabled) { toSerialize["enabled"] = o.Enabled } if o.AuthenticationFlow.IsSet() { @@ -470,28 +465,26 @@ func (o PlexSourceRequest) MarshalJSON() ([]byte, error) { if o.EnrollmentFlow.IsSet() { toSerialize["enrollment_flow"] = o.EnrollmentFlow.Get() } - if o.PolicyEngineMode != nil { + if !IsNil(o.PolicyEngineMode) { toSerialize["policy_engine_mode"] = o.PolicyEngineMode } - if o.UserMatchingMode.IsSet() { - toSerialize["user_matching_mode"] = o.UserMatchingMode.Get() + if !IsNil(o.UserMatchingMode) { + toSerialize["user_matching_mode"] = o.UserMatchingMode } - if o.UserPathTemplate != nil { + if !IsNil(o.UserPathTemplate) { toSerialize["user_path_template"] = o.UserPathTemplate } - if o.ClientId != nil { + if !IsNil(o.ClientId) { toSerialize["client_id"] = o.ClientId } - if o.AllowedServers != nil { + if !IsNil(o.AllowedServers) { toSerialize["allowed_servers"] = o.AllowedServers } - if o.AllowFriends != nil { + if !IsNil(o.AllowFriends) { toSerialize["allow_friends"] = o.AllowFriends } - if true { - toSerialize["plex_token"] = o.PlexToken - } - return json.Marshal(toSerialize) + toSerialize["plex_token"] = o.PlexToken + return toSerialize, nil } type NullablePlexSourceRequest struct { diff --git a/model_plex_token_redeem_request.go b/model_plex_token_redeem_request.go index 4b4bd5394..a421e3e68 100644 --- a/model_plex_token_redeem_request.go +++ b/model_plex_token_redeem_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PlexTokenRedeemRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PlexTokenRedeemRequest{} + // PlexTokenRedeemRequest Serializer to redeem a plex token type PlexTokenRedeemRequest struct { PlexToken string `json:"plex_token"` @@ -63,13 +66,19 @@ func (o *PlexTokenRedeemRequest) SetPlexToken(v string) { } func (o PlexTokenRedeemRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["plex_token"] = o.PlexToken + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PlexTokenRedeemRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["plex_token"] = o.PlexToken + return toSerialize, nil +} + type NullablePlexTokenRedeemRequest struct { value *PlexTokenRedeemRequest isSet bool diff --git a/model_policy.go b/model_policy.go index 1ce6b4d64..32a096c55 100644 --- a/model_policy.go +++ b/model_policy.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the Policy type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Policy{} + // Policy Policy Serializer type Policy struct { Pk string `json:"pk"` @@ -107,7 +110,7 @@ func (o *Policy) SetName(v string) { // GetExecutionLogging returns the ExecutionLogging field value if set, zero value otherwise. func (o *Policy) GetExecutionLogging() bool { - if o == nil || o.ExecutionLogging == nil { + if o == nil || IsNil(o.ExecutionLogging) { var ret bool return ret } @@ -117,7 +120,7 @@ func (o *Policy) GetExecutionLogging() bool { // GetExecutionLoggingOk returns a tuple with the ExecutionLogging field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Policy) GetExecutionLoggingOk() (*bool, bool) { - if o == nil || o.ExecutionLogging == nil { + if o == nil || IsNil(o.ExecutionLogging) { return nil, false } return o.ExecutionLogging, true @@ -125,7 +128,7 @@ func (o *Policy) GetExecutionLoggingOk() (*bool, bool) { // HasExecutionLogging returns a boolean if a field has been set. func (o *Policy) HasExecutionLogging() bool { - if o != nil && o.ExecutionLogging != nil { + if o != nil && !IsNil(o.ExecutionLogging) { return true } @@ -258,32 +261,26 @@ func (o *Policy) SetBoundTo(v int32) { } func (o Policy) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if true { - toSerialize["name"] = o.Name - } - if o.ExecutionLogging != nil { + return json.Marshal(toSerialize) +} + +func (o Policy) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name + if !IsNil(o.ExecutionLogging) { toSerialize["execution_logging"] = o.ExecutionLogging } - if true { - toSerialize["component"] = o.Component - } - if true { - toSerialize["verbose_name"] = o.VerboseName - } - if true { - toSerialize["verbose_name_plural"] = o.VerboseNamePlural - } - if true { - toSerialize["meta_model_name"] = o.MetaModelName - } - if true { - toSerialize["bound_to"] = o.BoundTo - } - return json.Marshal(toSerialize) + // skip: component is readOnly + // skip: verbose_name is readOnly + // skip: verbose_name_plural is readOnly + // skip: meta_model_name is readOnly + // skip: bound_to is readOnly + return toSerialize, nil } type NullablePolicy struct { diff --git a/model_policy_binding.go b/model_policy_binding.go index a68bc0c19..a076a4082 100644 --- a/model_policy_binding.go +++ b/model_policy_binding.go @@ -15,16 +15,19 @@ import ( "encoding/json" ) +// checks if the PolicyBinding type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PolicyBinding{} + // PolicyBinding PolicyBinding Serializer type PolicyBinding struct { - Pk string `json:"pk"` - Policy NullableString `json:"policy,omitempty"` - Group NullableString `json:"group,omitempty"` - User NullableInt32 `json:"user,omitempty"` - PolicyObj PolicyBindingPolicyObj `json:"policy_obj"` - GroupObj NotificationRuleGroupObj `json:"group_obj"` - UserObj PolicyBindingUserObj `json:"user_obj"` - Target string `json:"target"` + Pk string `json:"pk"` + Policy NullableString `json:"policy,omitempty"` + Group NullableString `json:"group,omitempty"` + User NullableInt32 `json:"user,omitempty"` + PolicyObj Policy `json:"policy_obj"` + GroupObj Group `json:"group_obj"` + UserObj User `json:"user_obj"` + Target string `json:"target"` // Negates the outcome of the policy. Messages are unaffected. Negate *bool `json:"negate,omitempty"` Enabled *bool `json:"enabled,omitempty"` @@ -37,7 +40,7 @@ type PolicyBinding struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewPolicyBinding(pk string, policyObj PolicyBindingPolicyObj, groupObj NotificationRuleGroupObj, userObj PolicyBindingUserObj, target string, order int32) *PolicyBinding { +func NewPolicyBinding(pk string, policyObj Policy, groupObj Group, userObj User, target string, order int32) *PolicyBinding { this := PolicyBinding{} this.Pk = pk this.PolicyObj = policyObj @@ -82,7 +85,7 @@ func (o *PolicyBinding) SetPk(v string) { // GetPolicy returns the Policy field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PolicyBinding) GetPolicy() string { - if o == nil || o.Policy.Get() == nil { + if o == nil || IsNil(o.Policy.Get()) { var ret string return ret } @@ -125,7 +128,7 @@ func (o *PolicyBinding) UnsetPolicy() { // GetGroup returns the Group field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PolicyBinding) GetGroup() string { - if o == nil || o.Group.Get() == nil { + if o == nil || IsNil(o.Group.Get()) { var ret string return ret } @@ -168,7 +171,7 @@ func (o *PolicyBinding) UnsetGroup() { // GetUser returns the User field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PolicyBinding) GetUser() int32 { - if o == nil || o.User.Get() == nil { + if o == nil || IsNil(o.User.Get()) { var ret int32 return ret } @@ -210,9 +213,9 @@ func (o *PolicyBinding) UnsetUser() { } // GetPolicyObj returns the PolicyObj field value -func (o *PolicyBinding) GetPolicyObj() PolicyBindingPolicyObj { +func (o *PolicyBinding) GetPolicyObj() Policy { if o == nil { - var ret PolicyBindingPolicyObj + var ret Policy return ret } @@ -221,7 +224,7 @@ func (o *PolicyBinding) GetPolicyObj() PolicyBindingPolicyObj { // GetPolicyObjOk returns a tuple with the PolicyObj field value // and a boolean to check if the value has been set. -func (o *PolicyBinding) GetPolicyObjOk() (*PolicyBindingPolicyObj, bool) { +func (o *PolicyBinding) GetPolicyObjOk() (*Policy, bool) { if o == nil { return nil, false } @@ -229,14 +232,14 @@ func (o *PolicyBinding) GetPolicyObjOk() (*PolicyBindingPolicyObj, bool) { } // SetPolicyObj sets field value -func (o *PolicyBinding) SetPolicyObj(v PolicyBindingPolicyObj) { +func (o *PolicyBinding) SetPolicyObj(v Policy) { o.PolicyObj = v } // GetGroupObj returns the GroupObj field value -func (o *PolicyBinding) GetGroupObj() NotificationRuleGroupObj { +func (o *PolicyBinding) GetGroupObj() Group { if o == nil { - var ret NotificationRuleGroupObj + var ret Group return ret } @@ -245,7 +248,7 @@ func (o *PolicyBinding) GetGroupObj() NotificationRuleGroupObj { // GetGroupObjOk returns a tuple with the GroupObj field value // and a boolean to check if the value has been set. -func (o *PolicyBinding) GetGroupObjOk() (*NotificationRuleGroupObj, bool) { +func (o *PolicyBinding) GetGroupObjOk() (*Group, bool) { if o == nil { return nil, false } @@ -253,14 +256,14 @@ func (o *PolicyBinding) GetGroupObjOk() (*NotificationRuleGroupObj, bool) { } // SetGroupObj sets field value -func (o *PolicyBinding) SetGroupObj(v NotificationRuleGroupObj) { +func (o *PolicyBinding) SetGroupObj(v Group) { o.GroupObj = v } // GetUserObj returns the UserObj field value -func (o *PolicyBinding) GetUserObj() PolicyBindingUserObj { +func (o *PolicyBinding) GetUserObj() User { if o == nil { - var ret PolicyBindingUserObj + var ret User return ret } @@ -269,7 +272,7 @@ func (o *PolicyBinding) GetUserObj() PolicyBindingUserObj { // GetUserObjOk returns a tuple with the UserObj field value // and a boolean to check if the value has been set. -func (o *PolicyBinding) GetUserObjOk() (*PolicyBindingUserObj, bool) { +func (o *PolicyBinding) GetUserObjOk() (*User, bool) { if o == nil { return nil, false } @@ -277,7 +280,7 @@ func (o *PolicyBinding) GetUserObjOk() (*PolicyBindingUserObj, bool) { } // SetUserObj sets field value -func (o *PolicyBinding) SetUserObj(v PolicyBindingUserObj) { +func (o *PolicyBinding) SetUserObj(v User) { o.UserObj = v } @@ -307,7 +310,7 @@ func (o *PolicyBinding) SetTarget(v string) { // GetNegate returns the Negate field value if set, zero value otherwise. func (o *PolicyBinding) GetNegate() bool { - if o == nil || o.Negate == nil { + if o == nil || IsNil(o.Negate) { var ret bool return ret } @@ -317,7 +320,7 @@ func (o *PolicyBinding) GetNegate() bool { // GetNegateOk returns a tuple with the Negate field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PolicyBinding) GetNegateOk() (*bool, bool) { - if o == nil || o.Negate == nil { + if o == nil || IsNil(o.Negate) { return nil, false } return o.Negate, true @@ -325,7 +328,7 @@ func (o *PolicyBinding) GetNegateOk() (*bool, bool) { // HasNegate returns a boolean if a field has been set. func (o *PolicyBinding) HasNegate() bool { - if o != nil && o.Negate != nil { + if o != nil && !IsNil(o.Negate) { return true } @@ -339,7 +342,7 @@ func (o *PolicyBinding) SetNegate(v bool) { // GetEnabled returns the Enabled field value if set, zero value otherwise. func (o *PolicyBinding) GetEnabled() bool { - if o == nil || o.Enabled == nil { + if o == nil || IsNil(o.Enabled) { var ret bool return ret } @@ -349,7 +352,7 @@ func (o *PolicyBinding) GetEnabled() bool { // GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PolicyBinding) GetEnabledOk() (*bool, bool) { - if o == nil || o.Enabled == nil { + if o == nil || IsNil(o.Enabled) { return nil, false } return o.Enabled, true @@ -357,7 +360,7 @@ func (o *PolicyBinding) GetEnabledOk() (*bool, bool) { // HasEnabled returns a boolean if a field has been set. func (o *PolicyBinding) HasEnabled() bool { - if o != nil && o.Enabled != nil { + if o != nil && !IsNil(o.Enabled) { return true } @@ -395,7 +398,7 @@ func (o *PolicyBinding) SetOrder(v int32) { // GetTimeout returns the Timeout field value if set, zero value otherwise. func (o *PolicyBinding) GetTimeout() int32 { - if o == nil || o.Timeout == nil { + if o == nil || IsNil(o.Timeout) { var ret int32 return ret } @@ -405,7 +408,7 @@ func (o *PolicyBinding) GetTimeout() int32 { // GetTimeoutOk returns a tuple with the Timeout field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PolicyBinding) GetTimeoutOk() (*int32, bool) { - if o == nil || o.Timeout == nil { + if o == nil || IsNil(o.Timeout) { return nil, false } return o.Timeout, true @@ -413,7 +416,7 @@ func (o *PolicyBinding) GetTimeoutOk() (*int32, bool) { // HasTimeout returns a boolean if a field has been set. func (o *PolicyBinding) HasTimeout() bool { - if o != nil && o.Timeout != nil { + if o != nil && !IsNil(o.Timeout) { return true } @@ -426,10 +429,16 @@ func (o *PolicyBinding) SetTimeout(v int32) { } func (o PolicyBinding) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } + return json.Marshal(toSerialize) +} + +func (o PolicyBinding) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly if o.Policy.IsSet() { toSerialize["policy"] = o.Policy.Get() } @@ -439,31 +448,21 @@ func (o PolicyBinding) MarshalJSON() ([]byte, error) { if o.User.IsSet() { toSerialize["user"] = o.User.Get() } - if true { - toSerialize["policy_obj"] = o.PolicyObj - } - if true { - toSerialize["group_obj"] = o.GroupObj - } - if true { - toSerialize["user_obj"] = o.UserObj - } - if true { - toSerialize["target"] = o.Target - } - if o.Negate != nil { + // skip: policy_obj is readOnly + // skip: group_obj is readOnly + // skip: user_obj is readOnly + toSerialize["target"] = o.Target + if !IsNil(o.Negate) { toSerialize["negate"] = o.Negate } - if o.Enabled != nil { + if !IsNil(o.Enabled) { toSerialize["enabled"] = o.Enabled } - if true { - toSerialize["order"] = o.Order - } - if o.Timeout != nil { + toSerialize["order"] = o.Order + if !IsNil(o.Timeout) { toSerialize["timeout"] = o.Timeout } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePolicyBinding struct { diff --git a/model_policy_binding_policy_obj.go b/model_policy_binding_policy_obj.go deleted file mode 100644 index 3621a0988..000000000 --- a/model_policy_binding_policy_obj.go +++ /dev/null @@ -1,323 +0,0 @@ -/* -authentik - -Making authentication simple. - -API version: 2023.3.1 -Contact: hello@goauthentik.io -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package api - -import ( - "encoding/json" -) - -// PolicyBindingPolicyObj struct for PolicyBindingPolicyObj -type PolicyBindingPolicyObj struct { - Pk string `json:"pk"` - Name string `json:"name"` - // When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. - ExecutionLogging *bool `json:"execution_logging,omitempty"` - // Get object component so that we know how to edit the object - Component string `json:"component"` - // Return object's verbose_name - VerboseName string `json:"verbose_name"` - // Return object's plural verbose_name - VerboseNamePlural string `json:"verbose_name_plural"` - // Return internal model name - MetaModelName string `json:"meta_model_name"` - // Return objects policy is bound to - BoundTo int32 `json:"bound_to"` -} - -// NewPolicyBindingPolicyObj instantiates a new PolicyBindingPolicyObj object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewPolicyBindingPolicyObj(pk string, name string, component string, verboseName string, verboseNamePlural string, metaModelName string, boundTo int32) *PolicyBindingPolicyObj { - this := PolicyBindingPolicyObj{} - this.Pk = pk - this.Name = name - this.Component = component - this.VerboseName = verboseName - this.VerboseNamePlural = verboseNamePlural - this.MetaModelName = metaModelName - this.BoundTo = boundTo - return &this -} - -// NewPolicyBindingPolicyObjWithDefaults instantiates a new PolicyBindingPolicyObj object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewPolicyBindingPolicyObjWithDefaults() *PolicyBindingPolicyObj { - this := PolicyBindingPolicyObj{} - return &this -} - -// GetPk returns the Pk field value -func (o *PolicyBindingPolicyObj) GetPk() string { - if o == nil { - var ret string - return ret - } - - return o.Pk -} - -// GetPkOk returns a tuple with the Pk field value -// and a boolean to check if the value has been set. -func (o *PolicyBindingPolicyObj) GetPkOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Pk, true -} - -// SetPk sets field value -func (o *PolicyBindingPolicyObj) SetPk(v string) { - o.Pk = v -} - -// GetName returns the Name field value -func (o *PolicyBindingPolicyObj) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *PolicyBindingPolicyObj) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *PolicyBindingPolicyObj) SetName(v string) { - o.Name = v -} - -// GetExecutionLogging returns the ExecutionLogging field value if set, zero value otherwise. -func (o *PolicyBindingPolicyObj) GetExecutionLogging() bool { - if o == nil || o.ExecutionLogging == nil { - var ret bool - return ret - } - return *o.ExecutionLogging -} - -// GetExecutionLoggingOk returns a tuple with the ExecutionLogging field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PolicyBindingPolicyObj) GetExecutionLoggingOk() (*bool, bool) { - if o == nil || o.ExecutionLogging == nil { - return nil, false - } - return o.ExecutionLogging, true -} - -// HasExecutionLogging returns a boolean if a field has been set. -func (o *PolicyBindingPolicyObj) HasExecutionLogging() bool { - if o != nil && o.ExecutionLogging != nil { - return true - } - - return false -} - -// SetExecutionLogging gets a reference to the given bool and assigns it to the ExecutionLogging field. -func (o *PolicyBindingPolicyObj) SetExecutionLogging(v bool) { - o.ExecutionLogging = &v -} - -// GetComponent returns the Component field value -func (o *PolicyBindingPolicyObj) GetComponent() string { - if o == nil { - var ret string - return ret - } - - return o.Component -} - -// GetComponentOk returns a tuple with the Component field value -// and a boolean to check if the value has been set. -func (o *PolicyBindingPolicyObj) GetComponentOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Component, true -} - -// SetComponent sets field value -func (o *PolicyBindingPolicyObj) SetComponent(v string) { - o.Component = v -} - -// GetVerboseName returns the VerboseName field value -func (o *PolicyBindingPolicyObj) GetVerboseName() string { - if o == nil { - var ret string - return ret - } - - return o.VerboseName -} - -// GetVerboseNameOk returns a tuple with the VerboseName field value -// and a boolean to check if the value has been set. -func (o *PolicyBindingPolicyObj) GetVerboseNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.VerboseName, true -} - -// SetVerboseName sets field value -func (o *PolicyBindingPolicyObj) SetVerboseName(v string) { - o.VerboseName = v -} - -// GetVerboseNamePlural returns the VerboseNamePlural field value -func (o *PolicyBindingPolicyObj) GetVerboseNamePlural() string { - if o == nil { - var ret string - return ret - } - - return o.VerboseNamePlural -} - -// GetVerboseNamePluralOk returns a tuple with the VerboseNamePlural field value -// and a boolean to check if the value has been set. -func (o *PolicyBindingPolicyObj) GetVerboseNamePluralOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.VerboseNamePlural, true -} - -// SetVerboseNamePlural sets field value -func (o *PolicyBindingPolicyObj) SetVerboseNamePlural(v string) { - o.VerboseNamePlural = v -} - -// GetMetaModelName returns the MetaModelName field value -func (o *PolicyBindingPolicyObj) GetMetaModelName() string { - if o == nil { - var ret string - return ret - } - - return o.MetaModelName -} - -// GetMetaModelNameOk returns a tuple with the MetaModelName field value -// and a boolean to check if the value has been set. -func (o *PolicyBindingPolicyObj) GetMetaModelNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.MetaModelName, true -} - -// SetMetaModelName sets field value -func (o *PolicyBindingPolicyObj) SetMetaModelName(v string) { - o.MetaModelName = v -} - -// GetBoundTo returns the BoundTo field value -func (o *PolicyBindingPolicyObj) GetBoundTo() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.BoundTo -} - -// GetBoundToOk returns a tuple with the BoundTo field value -// and a boolean to check if the value has been set. -func (o *PolicyBindingPolicyObj) GetBoundToOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.BoundTo, true -} - -// SetBoundTo sets field value -func (o *PolicyBindingPolicyObj) SetBoundTo(v int32) { - o.BoundTo = v -} - -func (o PolicyBindingPolicyObj) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["name"] = o.Name - } - if o.ExecutionLogging != nil { - toSerialize["execution_logging"] = o.ExecutionLogging - } - if true { - toSerialize["component"] = o.Component - } - if true { - toSerialize["verbose_name"] = o.VerboseName - } - if true { - toSerialize["verbose_name_plural"] = o.VerboseNamePlural - } - if true { - toSerialize["meta_model_name"] = o.MetaModelName - } - if true { - toSerialize["bound_to"] = o.BoundTo - } - return json.Marshal(toSerialize) -} - -type NullablePolicyBindingPolicyObj struct { - value *PolicyBindingPolicyObj - isSet bool -} - -func (v NullablePolicyBindingPolicyObj) Get() *PolicyBindingPolicyObj { - return v.value -} - -func (v *NullablePolicyBindingPolicyObj) Set(val *PolicyBindingPolicyObj) { - v.value = val - v.isSet = true -} - -func (v NullablePolicyBindingPolicyObj) IsSet() bool { - return v.isSet -} - -func (v *NullablePolicyBindingPolicyObj) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePolicyBindingPolicyObj(val *PolicyBindingPolicyObj) *NullablePolicyBindingPolicyObj { - return &NullablePolicyBindingPolicyObj{value: val, isSet: true} -} - -func (v NullablePolicyBindingPolicyObj) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePolicyBindingPolicyObj) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/model_policy_binding_request.go b/model_policy_binding_request.go index 157d25c8f..3a39b21cf 100644 --- a/model_policy_binding_request.go +++ b/model_policy_binding_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PolicyBindingRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PolicyBindingRequest{} + // PolicyBindingRequest PolicyBinding Serializer type PolicyBindingRequest struct { Policy NullableString `json:"policy,omitempty"` @@ -50,7 +53,7 @@ func NewPolicyBindingRequestWithDefaults() *PolicyBindingRequest { // GetPolicy returns the Policy field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PolicyBindingRequest) GetPolicy() string { - if o == nil || o.Policy.Get() == nil { + if o == nil || IsNil(o.Policy.Get()) { var ret string return ret } @@ -93,7 +96,7 @@ func (o *PolicyBindingRequest) UnsetPolicy() { // GetGroup returns the Group field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PolicyBindingRequest) GetGroup() string { - if o == nil || o.Group.Get() == nil { + if o == nil || IsNil(o.Group.Get()) { var ret string return ret } @@ -136,7 +139,7 @@ func (o *PolicyBindingRequest) UnsetGroup() { // GetUser returns the User field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PolicyBindingRequest) GetUser() int32 { - if o == nil || o.User.Get() == nil { + if o == nil || IsNil(o.User.Get()) { var ret int32 return ret } @@ -203,7 +206,7 @@ func (o *PolicyBindingRequest) SetTarget(v string) { // GetNegate returns the Negate field value if set, zero value otherwise. func (o *PolicyBindingRequest) GetNegate() bool { - if o == nil || o.Negate == nil { + if o == nil || IsNil(o.Negate) { var ret bool return ret } @@ -213,7 +216,7 @@ func (o *PolicyBindingRequest) GetNegate() bool { // GetNegateOk returns a tuple with the Negate field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PolicyBindingRequest) GetNegateOk() (*bool, bool) { - if o == nil || o.Negate == nil { + if o == nil || IsNil(o.Negate) { return nil, false } return o.Negate, true @@ -221,7 +224,7 @@ func (o *PolicyBindingRequest) GetNegateOk() (*bool, bool) { // HasNegate returns a boolean if a field has been set. func (o *PolicyBindingRequest) HasNegate() bool { - if o != nil && o.Negate != nil { + if o != nil && !IsNil(o.Negate) { return true } @@ -235,7 +238,7 @@ func (o *PolicyBindingRequest) SetNegate(v bool) { // GetEnabled returns the Enabled field value if set, zero value otherwise. func (o *PolicyBindingRequest) GetEnabled() bool { - if o == nil || o.Enabled == nil { + if o == nil || IsNil(o.Enabled) { var ret bool return ret } @@ -245,7 +248,7 @@ func (o *PolicyBindingRequest) GetEnabled() bool { // GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PolicyBindingRequest) GetEnabledOk() (*bool, bool) { - if o == nil || o.Enabled == nil { + if o == nil || IsNil(o.Enabled) { return nil, false } return o.Enabled, true @@ -253,7 +256,7 @@ func (o *PolicyBindingRequest) GetEnabledOk() (*bool, bool) { // HasEnabled returns a boolean if a field has been set. func (o *PolicyBindingRequest) HasEnabled() bool { - if o != nil && o.Enabled != nil { + if o != nil && !IsNil(o.Enabled) { return true } @@ -291,7 +294,7 @@ func (o *PolicyBindingRequest) SetOrder(v int32) { // GetTimeout returns the Timeout field value if set, zero value otherwise. func (o *PolicyBindingRequest) GetTimeout() int32 { - if o == nil || o.Timeout == nil { + if o == nil || IsNil(o.Timeout) { var ret int32 return ret } @@ -301,7 +304,7 @@ func (o *PolicyBindingRequest) GetTimeout() int32 { // GetTimeoutOk returns a tuple with the Timeout field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PolicyBindingRequest) GetTimeoutOk() (*int32, bool) { - if o == nil || o.Timeout == nil { + if o == nil || IsNil(o.Timeout) { return nil, false } return o.Timeout, true @@ -309,7 +312,7 @@ func (o *PolicyBindingRequest) GetTimeoutOk() (*int32, bool) { // HasTimeout returns a boolean if a field has been set. func (o *PolicyBindingRequest) HasTimeout() bool { - if o != nil && o.Timeout != nil { + if o != nil && !IsNil(o.Timeout) { return true } @@ -322,6 +325,14 @@ func (o *PolicyBindingRequest) SetTimeout(v int32) { } func (o PolicyBindingRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PolicyBindingRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Policy.IsSet() { toSerialize["policy"] = o.Policy.Get() @@ -332,22 +343,18 @@ func (o PolicyBindingRequest) MarshalJSON() ([]byte, error) { if o.User.IsSet() { toSerialize["user"] = o.User.Get() } - if true { - toSerialize["target"] = o.Target - } - if o.Negate != nil { + toSerialize["target"] = o.Target + if !IsNil(o.Negate) { toSerialize["negate"] = o.Negate } - if o.Enabled != nil { + if !IsNil(o.Enabled) { toSerialize["enabled"] = o.Enabled } - if true { - toSerialize["order"] = o.Order - } - if o.Timeout != nil { + toSerialize["order"] = o.Order + if !IsNil(o.Timeout) { toSerialize["timeout"] = o.Timeout } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePolicyBindingRequest struct { diff --git a/model_policy_binding_user_obj.go b/model_policy_binding_user_obj.go deleted file mode 100644 index ee189d536..000000000 --- a/model_policy_binding_user_obj.go +++ /dev/null @@ -1,504 +0,0 @@ -/* -authentik - -Making authentication simple. - -API version: 2023.3.1 -Contact: hello@goauthentik.io -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package api - -import ( - "encoding/json" - "time" -) - -// PolicyBindingUserObj struct for PolicyBindingUserObj -type PolicyBindingUserObj struct { - Pk int32 `json:"pk"` - Username string `json:"username"` - // User's display name. - Name string `json:"name"` - // Designates whether this user should be treated as active. Unselect this instead of deleting accounts. - IsActive *bool `json:"is_active,omitempty"` - LastLogin NullableTime `json:"last_login,omitempty"` - IsSuperuser bool `json:"is_superuser"` - Groups []string `json:"groups"` - GroupsObj []UserGroup `json:"groups_obj"` - Email *string `json:"email,omitempty"` - Avatar string `json:"avatar"` - Attributes map[string]interface{} `json:"attributes,omitempty"` - Uid string `json:"uid"` - Path *string `json:"path,omitempty"` -} - -// NewPolicyBindingUserObj instantiates a new PolicyBindingUserObj object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewPolicyBindingUserObj(pk int32, username string, name string, isSuperuser bool, groups []string, groupsObj []UserGroup, avatar string, uid string) *PolicyBindingUserObj { - this := PolicyBindingUserObj{} - this.Pk = pk - this.Username = username - this.Name = name - this.IsSuperuser = isSuperuser - this.Groups = groups - this.GroupsObj = groupsObj - this.Avatar = avatar - this.Uid = uid - return &this -} - -// NewPolicyBindingUserObjWithDefaults instantiates a new PolicyBindingUserObj object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewPolicyBindingUserObjWithDefaults() *PolicyBindingUserObj { - this := PolicyBindingUserObj{} - return &this -} - -// GetPk returns the Pk field value -func (o *PolicyBindingUserObj) GetPk() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.Pk -} - -// GetPkOk returns a tuple with the Pk field value -// and a boolean to check if the value has been set. -func (o *PolicyBindingUserObj) GetPkOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.Pk, true -} - -// SetPk sets field value -func (o *PolicyBindingUserObj) SetPk(v int32) { - o.Pk = v -} - -// GetUsername returns the Username field value -func (o *PolicyBindingUserObj) GetUsername() string { - if o == nil { - var ret string - return ret - } - - return o.Username -} - -// GetUsernameOk returns a tuple with the Username field value -// and a boolean to check if the value has been set. -func (o *PolicyBindingUserObj) GetUsernameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Username, true -} - -// SetUsername sets field value -func (o *PolicyBindingUserObj) SetUsername(v string) { - o.Username = v -} - -// GetName returns the Name field value -func (o *PolicyBindingUserObj) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *PolicyBindingUserObj) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *PolicyBindingUserObj) SetName(v string) { - o.Name = v -} - -// GetIsActive returns the IsActive field value if set, zero value otherwise. -func (o *PolicyBindingUserObj) GetIsActive() bool { - if o == nil || o.IsActive == nil { - var ret bool - return ret - } - return *o.IsActive -} - -// GetIsActiveOk returns a tuple with the IsActive field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PolicyBindingUserObj) GetIsActiveOk() (*bool, bool) { - if o == nil || o.IsActive == nil { - return nil, false - } - return o.IsActive, true -} - -// HasIsActive returns a boolean if a field has been set. -func (o *PolicyBindingUserObj) HasIsActive() bool { - if o != nil && o.IsActive != nil { - return true - } - - return false -} - -// SetIsActive gets a reference to the given bool and assigns it to the IsActive field. -func (o *PolicyBindingUserObj) SetIsActive(v bool) { - o.IsActive = &v -} - -// GetLastLogin returns the LastLogin field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *PolicyBindingUserObj) GetLastLogin() time.Time { - if o == nil || o.LastLogin.Get() == nil { - var ret time.Time - return ret - } - return *o.LastLogin.Get() -} - -// GetLastLoginOk returns a tuple with the LastLogin field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PolicyBindingUserObj) GetLastLoginOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return o.LastLogin.Get(), o.LastLogin.IsSet() -} - -// HasLastLogin returns a boolean if a field has been set. -func (o *PolicyBindingUserObj) HasLastLogin() bool { - if o != nil && o.LastLogin.IsSet() { - return true - } - - return false -} - -// SetLastLogin gets a reference to the given NullableTime and assigns it to the LastLogin field. -func (o *PolicyBindingUserObj) SetLastLogin(v time.Time) { - o.LastLogin.Set(&v) -} - -// SetLastLoginNil sets the value for LastLogin to be an explicit nil -func (o *PolicyBindingUserObj) SetLastLoginNil() { - o.LastLogin.Set(nil) -} - -// UnsetLastLogin ensures that no value is present for LastLogin, not even an explicit nil -func (o *PolicyBindingUserObj) UnsetLastLogin() { - o.LastLogin.Unset() -} - -// GetIsSuperuser returns the IsSuperuser field value -func (o *PolicyBindingUserObj) GetIsSuperuser() bool { - if o == nil { - var ret bool - return ret - } - - return o.IsSuperuser -} - -// GetIsSuperuserOk returns a tuple with the IsSuperuser field value -// and a boolean to check if the value has been set. -func (o *PolicyBindingUserObj) GetIsSuperuserOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.IsSuperuser, true -} - -// SetIsSuperuser sets field value -func (o *PolicyBindingUserObj) SetIsSuperuser(v bool) { - o.IsSuperuser = v -} - -// GetGroups returns the Groups field value -func (o *PolicyBindingUserObj) GetGroups() []string { - if o == nil { - var ret []string - return ret - } - - return o.Groups -} - -// GetGroupsOk returns a tuple with the Groups field value -// and a boolean to check if the value has been set. -func (o *PolicyBindingUserObj) GetGroupsOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.Groups, true -} - -// SetGroups sets field value -func (o *PolicyBindingUserObj) SetGroups(v []string) { - o.Groups = v -} - -// GetGroupsObj returns the GroupsObj field value -func (o *PolicyBindingUserObj) GetGroupsObj() []UserGroup { - if o == nil { - var ret []UserGroup - return ret - } - - return o.GroupsObj -} - -// GetGroupsObjOk returns a tuple with the GroupsObj field value -// and a boolean to check if the value has been set. -func (o *PolicyBindingUserObj) GetGroupsObjOk() ([]UserGroup, bool) { - if o == nil { - return nil, false - } - return o.GroupsObj, true -} - -// SetGroupsObj sets field value -func (o *PolicyBindingUserObj) SetGroupsObj(v []UserGroup) { - o.GroupsObj = v -} - -// GetEmail returns the Email field value if set, zero value otherwise. -func (o *PolicyBindingUserObj) GetEmail() string { - if o == nil || o.Email == nil { - var ret string - return ret - } - return *o.Email -} - -// GetEmailOk returns a tuple with the Email field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PolicyBindingUserObj) GetEmailOk() (*string, bool) { - if o == nil || o.Email == nil { - return nil, false - } - return o.Email, true -} - -// HasEmail returns a boolean if a field has been set. -func (o *PolicyBindingUserObj) HasEmail() bool { - if o != nil && o.Email != nil { - return true - } - - return false -} - -// SetEmail gets a reference to the given string and assigns it to the Email field. -func (o *PolicyBindingUserObj) SetEmail(v string) { - o.Email = &v -} - -// GetAvatar returns the Avatar field value -func (o *PolicyBindingUserObj) GetAvatar() string { - if o == nil { - var ret string - return ret - } - - return o.Avatar -} - -// GetAvatarOk returns a tuple with the Avatar field value -// and a boolean to check if the value has been set. -func (o *PolicyBindingUserObj) GetAvatarOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Avatar, true -} - -// SetAvatar sets field value -func (o *PolicyBindingUserObj) SetAvatar(v string) { - o.Avatar = v -} - -// GetAttributes returns the Attributes field value if set, zero value otherwise. -func (o *PolicyBindingUserObj) GetAttributes() map[string]interface{} { - if o == nil || o.Attributes == nil { - var ret map[string]interface{} - return ret - } - return o.Attributes -} - -// GetAttributesOk returns a tuple with the Attributes field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PolicyBindingUserObj) GetAttributesOk() (map[string]interface{}, bool) { - if o == nil || o.Attributes == nil { - return nil, false - } - return o.Attributes, true -} - -// HasAttributes returns a boolean if a field has been set. -func (o *PolicyBindingUserObj) HasAttributes() bool { - if o != nil && o.Attributes != nil { - return true - } - - return false -} - -// SetAttributes gets a reference to the given map[string]interface{} and assigns it to the Attributes field. -func (o *PolicyBindingUserObj) SetAttributes(v map[string]interface{}) { - o.Attributes = v -} - -// GetUid returns the Uid field value -func (o *PolicyBindingUserObj) GetUid() string { - if o == nil { - var ret string - return ret - } - - return o.Uid -} - -// GetUidOk returns a tuple with the Uid field value -// and a boolean to check if the value has been set. -func (o *PolicyBindingUserObj) GetUidOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Uid, true -} - -// SetUid sets field value -func (o *PolicyBindingUserObj) SetUid(v string) { - o.Uid = v -} - -// GetPath returns the Path field value if set, zero value otherwise. -func (o *PolicyBindingUserObj) GetPath() string { - if o == nil || o.Path == nil { - var ret string - return ret - } - return *o.Path -} - -// GetPathOk returns a tuple with the Path field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PolicyBindingUserObj) GetPathOk() (*string, bool) { - if o == nil || o.Path == nil { - return nil, false - } - return o.Path, true -} - -// HasPath returns a boolean if a field has been set. -func (o *PolicyBindingUserObj) HasPath() bool { - if o != nil && o.Path != nil { - return true - } - - return false -} - -// SetPath gets a reference to the given string and assigns it to the Path field. -func (o *PolicyBindingUserObj) SetPath(v string) { - o.Path = &v -} - -func (o PolicyBindingUserObj) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["username"] = o.Username - } - if true { - toSerialize["name"] = o.Name - } - if o.IsActive != nil { - toSerialize["is_active"] = o.IsActive - } - if o.LastLogin.IsSet() { - toSerialize["last_login"] = o.LastLogin.Get() - } - if true { - toSerialize["is_superuser"] = o.IsSuperuser - } - if true { - toSerialize["groups"] = o.Groups - } - if true { - toSerialize["groups_obj"] = o.GroupsObj - } - if o.Email != nil { - toSerialize["email"] = o.Email - } - if true { - toSerialize["avatar"] = o.Avatar - } - if o.Attributes != nil { - toSerialize["attributes"] = o.Attributes - } - if true { - toSerialize["uid"] = o.Uid - } - if o.Path != nil { - toSerialize["path"] = o.Path - } - return json.Marshal(toSerialize) -} - -type NullablePolicyBindingUserObj struct { - value *PolicyBindingUserObj - isSet bool -} - -func (v NullablePolicyBindingUserObj) Get() *PolicyBindingUserObj { - return v.value -} - -func (v *NullablePolicyBindingUserObj) Set(val *PolicyBindingUserObj) { - v.value = val - v.isSet = true -} - -func (v NullablePolicyBindingUserObj) IsSet() bool { - return v.isSet -} - -func (v *NullablePolicyBindingUserObj) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePolicyBindingUserObj(val *PolicyBindingUserObj) *NullablePolicyBindingUserObj { - return &NullablePolicyBindingUserObj{value: val, isSet: true} -} - -func (v NullablePolicyBindingUserObj) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePolicyBindingUserObj) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/model_policy_request.go b/model_policy_request.go index 933f3058f..dffc9049f 100644 --- a/model_policy_request.go +++ b/model_policy_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PolicyRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PolicyRequest{} + // PolicyRequest Policy Serializer type PolicyRequest struct { Name string `json:"name"` @@ -66,7 +69,7 @@ func (o *PolicyRequest) SetName(v string) { // GetExecutionLogging returns the ExecutionLogging field value if set, zero value otherwise. func (o *PolicyRequest) GetExecutionLogging() bool { - if o == nil || o.ExecutionLogging == nil { + if o == nil || IsNil(o.ExecutionLogging) { var ret bool return ret } @@ -76,7 +79,7 @@ func (o *PolicyRequest) GetExecutionLogging() bool { // GetExecutionLoggingOk returns a tuple with the ExecutionLogging field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PolicyRequest) GetExecutionLoggingOk() (*bool, bool) { - if o == nil || o.ExecutionLogging == nil { + if o == nil || IsNil(o.ExecutionLogging) { return nil, false } return o.ExecutionLogging, true @@ -84,7 +87,7 @@ func (o *PolicyRequest) GetExecutionLoggingOk() (*bool, bool) { // HasExecutionLogging returns a boolean if a field has been set. func (o *PolicyRequest) HasExecutionLogging() bool { - if o != nil && o.ExecutionLogging != nil { + if o != nil && !IsNil(o.ExecutionLogging) { return true } @@ -97,14 +100,20 @@ func (o *PolicyRequest) SetExecutionLogging(v bool) { } func (o PolicyRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.ExecutionLogging != nil { + return json.Marshal(toSerialize) +} + +func (o PolicyRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.ExecutionLogging) { toSerialize["execution_logging"] = o.ExecutionLogging } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePolicyRequest struct { diff --git a/model_policy_test_request.go b/model_policy_test_request.go index e36fcd7bf..d7d9e5c9f 100644 --- a/model_policy_test_request.go +++ b/model_policy_test_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PolicyTestRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PolicyTestRequest{} + // PolicyTestRequest Test policy execution for a user with context type PolicyTestRequest struct { User int32 `json:"user"` @@ -65,7 +68,7 @@ func (o *PolicyTestRequest) SetUser(v int32) { // GetContext returns the Context field value if set, zero value otherwise. func (o *PolicyTestRequest) GetContext() map[string]interface{} { - if o == nil || o.Context == nil { + if o == nil || IsNil(o.Context) { var ret map[string]interface{} return ret } @@ -75,15 +78,15 @@ func (o *PolicyTestRequest) GetContext() map[string]interface{} { // GetContextOk returns a tuple with the Context field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PolicyTestRequest) GetContextOk() (map[string]interface{}, bool) { - if o == nil || o.Context == nil { - return nil, false + if o == nil || IsNil(o.Context) { + return map[string]interface{}{}, false } return o.Context, true } // HasContext returns a boolean if a field has been set. func (o *PolicyTestRequest) HasContext() bool { - if o != nil && o.Context != nil { + if o != nil && !IsNil(o.Context) { return true } @@ -96,14 +99,20 @@ func (o *PolicyTestRequest) SetContext(v map[string]interface{}) { } func (o PolicyTestRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["user"] = o.User + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.Context != nil { + return json.Marshal(toSerialize) +} + +func (o PolicyTestRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["user"] = o.User + if !IsNil(o.Context) { toSerialize["context"] = o.Context } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePolicyTestRequest struct { diff --git a/model_policy_test_result.go b/model_policy_test_result.go index d42f50726..44da1f42f 100644 --- a/model_policy_test_result.go +++ b/model_policy_test_result.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PolicyTestResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PolicyTestResult{} + // PolicyTestResult result of a policy test type PolicyTestResult struct { Passing bool `json:"passing"` @@ -115,19 +118,21 @@ func (o *PolicyTestResult) SetLogMessages(v []map[string]interface{}) { } func (o PolicyTestResult) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["passing"] = o.Passing - } - if true { - toSerialize["messages"] = o.Messages - } - if true { - toSerialize["log_messages"] = o.LogMessages + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PolicyTestResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["passing"] = o.Passing + // skip: messages is readOnly + // skip: log_messages is readOnly + return toSerialize, nil +} + type NullablePolicyTestResult struct { value *PolicyTestResult isSet bool diff --git a/model_prompt.go b/model_prompt.go index f4018f899..d08c9cb81 100644 --- a/model_prompt.go +++ b/model_prompt.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the Prompt type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Prompt{} + // Prompt Prompt Serializer type Prompt struct { Pk string `json:"pk"` @@ -176,7 +179,7 @@ func (o *Prompt) SetType(v PromptTypeEnum) { // GetRequired returns the Required field value if set, zero value otherwise. func (o *Prompt) GetRequired() bool { - if o == nil || o.Required == nil { + if o == nil || IsNil(o.Required) { var ret bool return ret } @@ -186,7 +189,7 @@ func (o *Prompt) GetRequired() bool { // GetRequiredOk returns a tuple with the Required field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Prompt) GetRequiredOk() (*bool, bool) { - if o == nil || o.Required == nil { + if o == nil || IsNil(o.Required) { return nil, false } return o.Required, true @@ -194,7 +197,7 @@ func (o *Prompt) GetRequiredOk() (*bool, bool) { // HasRequired returns a boolean if a field has been set. func (o *Prompt) HasRequired() bool { - if o != nil && o.Required != nil { + if o != nil && !IsNil(o.Required) { return true } @@ -208,7 +211,7 @@ func (o *Prompt) SetRequired(v bool) { // GetPlaceholder returns the Placeholder field value if set, zero value otherwise. func (o *Prompt) GetPlaceholder() string { - if o == nil || o.Placeholder == nil { + if o == nil || IsNil(o.Placeholder) { var ret string return ret } @@ -218,7 +221,7 @@ func (o *Prompt) GetPlaceholder() string { // GetPlaceholderOk returns a tuple with the Placeholder field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Prompt) GetPlaceholderOk() (*string, bool) { - if o == nil || o.Placeholder == nil { + if o == nil || IsNil(o.Placeholder) { return nil, false } return o.Placeholder, true @@ -226,7 +229,7 @@ func (o *Prompt) GetPlaceholderOk() (*string, bool) { // HasPlaceholder returns a boolean if a field has been set. func (o *Prompt) HasPlaceholder() bool { - if o != nil && o.Placeholder != nil { + if o != nil && !IsNil(o.Placeholder) { return true } @@ -240,7 +243,7 @@ func (o *Prompt) SetPlaceholder(v string) { // GetOrder returns the Order field value if set, zero value otherwise. func (o *Prompt) GetOrder() int32 { - if o == nil || o.Order == nil { + if o == nil || IsNil(o.Order) { var ret int32 return ret } @@ -250,7 +253,7 @@ func (o *Prompt) GetOrder() int32 { // GetOrderOk returns a tuple with the Order field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Prompt) GetOrderOk() (*int32, bool) { - if o == nil || o.Order == nil { + if o == nil || IsNil(o.Order) { return nil, false } return o.Order, true @@ -258,7 +261,7 @@ func (o *Prompt) GetOrderOk() (*int32, bool) { // HasOrder returns a boolean if a field has been set. func (o *Prompt) HasOrder() bool { - if o != nil && o.Order != nil { + if o != nil && !IsNil(o.Order) { return true } @@ -272,7 +275,7 @@ func (o *Prompt) SetOrder(v int32) { // GetPromptstageSet returns the PromptstageSet field value if set, zero value otherwise. func (o *Prompt) GetPromptstageSet() []Stage { - if o == nil || o.PromptstageSet == nil { + if o == nil || IsNil(o.PromptstageSet) { var ret []Stage return ret } @@ -282,7 +285,7 @@ func (o *Prompt) GetPromptstageSet() []Stage { // GetPromptstageSetOk returns a tuple with the PromptstageSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Prompt) GetPromptstageSetOk() ([]Stage, bool) { - if o == nil || o.PromptstageSet == nil { + if o == nil || IsNil(o.PromptstageSet) { return nil, false } return o.PromptstageSet, true @@ -290,7 +293,7 @@ func (o *Prompt) GetPromptstageSetOk() ([]Stage, bool) { // HasPromptstageSet returns a boolean if a field has been set. func (o *Prompt) HasPromptstageSet() bool { - if o != nil && o.PromptstageSet != nil { + if o != nil && !IsNil(o.PromptstageSet) { return true } @@ -304,7 +307,7 @@ func (o *Prompt) SetPromptstageSet(v []Stage) { // GetSubText returns the SubText field value if set, zero value otherwise. func (o *Prompt) GetSubText() string { - if o == nil || o.SubText == nil { + if o == nil || IsNil(o.SubText) { var ret string return ret } @@ -314,7 +317,7 @@ func (o *Prompt) GetSubText() string { // GetSubTextOk returns a tuple with the SubText field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Prompt) GetSubTextOk() (*string, bool) { - if o == nil || o.SubText == nil { + if o == nil || IsNil(o.SubText) { return nil, false } return o.SubText, true @@ -322,7 +325,7 @@ func (o *Prompt) GetSubTextOk() (*string, bool) { // HasSubText returns a boolean if a field has been set. func (o *Prompt) HasSubText() bool { - if o != nil && o.SubText != nil { + if o != nil && !IsNil(o.SubText) { return true } @@ -336,7 +339,7 @@ func (o *Prompt) SetSubText(v string) { // GetPlaceholderExpression returns the PlaceholderExpression field value if set, zero value otherwise. func (o *Prompt) GetPlaceholderExpression() bool { - if o == nil || o.PlaceholderExpression == nil { + if o == nil || IsNil(o.PlaceholderExpression) { var ret bool return ret } @@ -346,7 +349,7 @@ func (o *Prompt) GetPlaceholderExpression() bool { // GetPlaceholderExpressionOk returns a tuple with the PlaceholderExpression field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Prompt) GetPlaceholderExpressionOk() (*bool, bool) { - if o == nil || o.PlaceholderExpression == nil { + if o == nil || IsNil(o.PlaceholderExpression) { return nil, false } return o.PlaceholderExpression, true @@ -354,7 +357,7 @@ func (o *Prompt) GetPlaceholderExpressionOk() (*bool, bool) { // HasPlaceholderExpression returns a boolean if a field has been set. func (o *Prompt) HasPlaceholderExpression() bool { - if o != nil && o.PlaceholderExpression != nil { + if o != nil && !IsNil(o.PlaceholderExpression) { return true } @@ -367,41 +370,39 @@ func (o *Prompt) SetPlaceholderExpression(v bool) { } func (o Prompt) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["field_key"] = o.FieldKey - } - if true { - toSerialize["label"] = o.Label - } - if true { - toSerialize["type"] = o.Type + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.Required != nil { + return json.Marshal(toSerialize) +} + +func (o Prompt) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name + toSerialize["field_key"] = o.FieldKey + toSerialize["label"] = o.Label + toSerialize["type"] = o.Type + if !IsNil(o.Required) { toSerialize["required"] = o.Required } - if o.Placeholder != nil { + if !IsNil(o.Placeholder) { toSerialize["placeholder"] = o.Placeholder } - if o.Order != nil { + if !IsNil(o.Order) { toSerialize["order"] = o.Order } - if o.PromptstageSet != nil { + if !IsNil(o.PromptstageSet) { toSerialize["promptstage_set"] = o.PromptstageSet } - if o.SubText != nil { + if !IsNil(o.SubText) { toSerialize["sub_text"] = o.SubText } - if o.PlaceholderExpression != nil { + if !IsNil(o.PlaceholderExpression) { toSerialize["placeholder_expression"] = o.PlaceholderExpression } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePrompt struct { diff --git a/model_prompt_challenge.go b/model_prompt_challenge.go index f6596e82f..5d61be9cf 100644 --- a/model_prompt_challenge.go +++ b/model_prompt_challenge.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PromptChallenge type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PromptChallenge{} + // PromptChallenge Initial challenge being sent, define fields type PromptChallenge struct { Type ChallengeChoices `json:"type"` @@ -73,7 +76,7 @@ func (o *PromptChallenge) SetType(v ChallengeChoices) { // GetFlowInfo returns the FlowInfo field value if set, zero value otherwise. func (o *PromptChallenge) GetFlowInfo() ContextualFlowInfo { - if o == nil || o.FlowInfo == nil { + if o == nil || IsNil(o.FlowInfo) { var ret ContextualFlowInfo return ret } @@ -83,7 +86,7 @@ func (o *PromptChallenge) GetFlowInfo() ContextualFlowInfo { // GetFlowInfoOk returns a tuple with the FlowInfo field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PromptChallenge) GetFlowInfoOk() (*ContextualFlowInfo, bool) { - if o == nil || o.FlowInfo == nil { + if o == nil || IsNil(o.FlowInfo) { return nil, false } return o.FlowInfo, true @@ -91,7 +94,7 @@ func (o *PromptChallenge) GetFlowInfoOk() (*ContextualFlowInfo, bool) { // HasFlowInfo returns a boolean if a field has been set. func (o *PromptChallenge) HasFlowInfo() bool { - if o != nil && o.FlowInfo != nil { + if o != nil && !IsNil(o.FlowInfo) { return true } @@ -105,7 +108,7 @@ func (o *PromptChallenge) SetFlowInfo(v ContextualFlowInfo) { // GetComponent returns the Component field value if set, zero value otherwise. func (o *PromptChallenge) GetComponent() string { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { var ret string return ret } @@ -115,7 +118,7 @@ func (o *PromptChallenge) GetComponent() string { // GetComponentOk returns a tuple with the Component field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PromptChallenge) GetComponentOk() (*string, bool) { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { return nil, false } return o.Component, true @@ -123,7 +126,7 @@ func (o *PromptChallenge) GetComponentOk() (*string, bool) { // HasComponent returns a boolean if a field has been set. func (o *PromptChallenge) HasComponent() bool { - if o != nil && o.Component != nil { + if o != nil && !IsNil(o.Component) { return true } @@ -137,7 +140,7 @@ func (o *PromptChallenge) SetComponent(v string) { // GetResponseErrors returns the ResponseErrors field value if set, zero value otherwise. func (o *PromptChallenge) GetResponseErrors() map[string][]ErrorDetail { - if o == nil || o.ResponseErrors == nil { + if o == nil || IsNil(o.ResponseErrors) { var ret map[string][]ErrorDetail return ret } @@ -147,7 +150,7 @@ func (o *PromptChallenge) GetResponseErrors() map[string][]ErrorDetail { // GetResponseErrorsOk returns a tuple with the ResponseErrors field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PromptChallenge) GetResponseErrorsOk() (*map[string][]ErrorDetail, bool) { - if o == nil || o.ResponseErrors == nil { + if o == nil || IsNil(o.ResponseErrors) { return nil, false } return o.ResponseErrors, true @@ -155,7 +158,7 @@ func (o *PromptChallenge) GetResponseErrorsOk() (*map[string][]ErrorDetail, bool // HasResponseErrors returns a boolean if a field has been set. func (o *PromptChallenge) HasResponseErrors() bool { - if o != nil && o.ResponseErrors != nil { + if o != nil && !IsNil(o.ResponseErrors) { return true } @@ -192,23 +195,27 @@ func (o *PromptChallenge) SetFields(v []StagePrompt) { } func (o PromptChallenge) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["type"] = o.Type + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.FlowInfo != nil { + return json.Marshal(toSerialize) +} + +func (o PromptChallenge) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + if !IsNil(o.FlowInfo) { toSerialize["flow_info"] = o.FlowInfo } - if o.Component != nil { + if !IsNil(o.Component) { toSerialize["component"] = o.Component } - if o.ResponseErrors != nil { + if !IsNil(o.ResponseErrors) { toSerialize["response_errors"] = o.ResponseErrors } - if true { - toSerialize["fields"] = o.Fields - } - return json.Marshal(toSerialize) + toSerialize["fields"] = o.Fields + return toSerialize, nil } type NullablePromptChallenge struct { diff --git a/model_prompt_challenge_response_request.go b/model_prompt_challenge_response_request.go index bbacf84e2..96db26e4b 100644 --- a/model_prompt_challenge_response_request.go +++ b/model_prompt_challenge_response_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PromptChallengeResponseRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PromptChallengeResponseRequest{} + // PromptChallengeResponseRequest Validate response, fields are dynamically created based on the stage type PromptChallengeResponseRequest struct { Component *string `json:"component,omitempty"` @@ -43,7 +46,7 @@ func NewPromptChallengeResponseRequestWithDefaults() *PromptChallengeResponseReq // GetComponent returns the Component field value if set, zero value otherwise. func (o *PromptChallengeResponseRequest) GetComponent() string { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { var ret string return ret } @@ -53,7 +56,7 @@ func (o *PromptChallengeResponseRequest) GetComponent() string { // GetComponentOk returns a tuple with the Component field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PromptChallengeResponseRequest) GetComponentOk() (*string, bool) { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { return nil, false } return o.Component, true @@ -61,7 +64,7 @@ func (o *PromptChallengeResponseRequest) GetComponentOk() (*string, bool) { // HasComponent returns a boolean if a field has been set. func (o *PromptChallengeResponseRequest) HasComponent() bool { - if o != nil && o.Component != nil { + if o != nil && !IsNil(o.Component) { return true } @@ -74,11 +77,19 @@ func (o *PromptChallengeResponseRequest) SetComponent(v string) { } func (o PromptChallengeResponseRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PromptChallengeResponseRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Component != nil { + if !IsNil(o.Component) { toSerialize["component"] = o.Component } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePromptChallengeResponseRequest struct { diff --git a/model_prompt_request.go b/model_prompt_request.go index 455ef52fd..b07d934d1 100644 --- a/model_prompt_request.go +++ b/model_prompt_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PromptRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PromptRequest{} + // PromptRequest Prompt Serializer type PromptRequest struct { Name string `json:"name"` @@ -150,7 +153,7 @@ func (o *PromptRequest) SetType(v PromptTypeEnum) { // GetRequired returns the Required field value if set, zero value otherwise. func (o *PromptRequest) GetRequired() bool { - if o == nil || o.Required == nil { + if o == nil || IsNil(o.Required) { var ret bool return ret } @@ -160,7 +163,7 @@ func (o *PromptRequest) GetRequired() bool { // GetRequiredOk returns a tuple with the Required field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PromptRequest) GetRequiredOk() (*bool, bool) { - if o == nil || o.Required == nil { + if o == nil || IsNil(o.Required) { return nil, false } return o.Required, true @@ -168,7 +171,7 @@ func (o *PromptRequest) GetRequiredOk() (*bool, bool) { // HasRequired returns a boolean if a field has been set. func (o *PromptRequest) HasRequired() bool { - if o != nil && o.Required != nil { + if o != nil && !IsNil(o.Required) { return true } @@ -182,7 +185,7 @@ func (o *PromptRequest) SetRequired(v bool) { // GetPlaceholder returns the Placeholder field value if set, zero value otherwise. func (o *PromptRequest) GetPlaceholder() string { - if o == nil || o.Placeholder == nil { + if o == nil || IsNil(o.Placeholder) { var ret string return ret } @@ -192,7 +195,7 @@ func (o *PromptRequest) GetPlaceholder() string { // GetPlaceholderOk returns a tuple with the Placeholder field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PromptRequest) GetPlaceholderOk() (*string, bool) { - if o == nil || o.Placeholder == nil { + if o == nil || IsNil(o.Placeholder) { return nil, false } return o.Placeholder, true @@ -200,7 +203,7 @@ func (o *PromptRequest) GetPlaceholderOk() (*string, bool) { // HasPlaceholder returns a boolean if a field has been set. func (o *PromptRequest) HasPlaceholder() bool { - if o != nil && o.Placeholder != nil { + if o != nil && !IsNil(o.Placeholder) { return true } @@ -214,7 +217,7 @@ func (o *PromptRequest) SetPlaceholder(v string) { // GetOrder returns the Order field value if set, zero value otherwise. func (o *PromptRequest) GetOrder() int32 { - if o == nil || o.Order == nil { + if o == nil || IsNil(o.Order) { var ret int32 return ret } @@ -224,7 +227,7 @@ func (o *PromptRequest) GetOrder() int32 { // GetOrderOk returns a tuple with the Order field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PromptRequest) GetOrderOk() (*int32, bool) { - if o == nil || o.Order == nil { + if o == nil || IsNil(o.Order) { return nil, false } return o.Order, true @@ -232,7 +235,7 @@ func (o *PromptRequest) GetOrderOk() (*int32, bool) { // HasOrder returns a boolean if a field has been set. func (o *PromptRequest) HasOrder() bool { - if o != nil && o.Order != nil { + if o != nil && !IsNil(o.Order) { return true } @@ -246,7 +249,7 @@ func (o *PromptRequest) SetOrder(v int32) { // GetPromptstageSet returns the PromptstageSet field value if set, zero value otherwise. func (o *PromptRequest) GetPromptstageSet() []StageRequest { - if o == nil || o.PromptstageSet == nil { + if o == nil || IsNil(o.PromptstageSet) { var ret []StageRequest return ret } @@ -256,7 +259,7 @@ func (o *PromptRequest) GetPromptstageSet() []StageRequest { // GetPromptstageSetOk returns a tuple with the PromptstageSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PromptRequest) GetPromptstageSetOk() ([]StageRequest, bool) { - if o == nil || o.PromptstageSet == nil { + if o == nil || IsNil(o.PromptstageSet) { return nil, false } return o.PromptstageSet, true @@ -264,7 +267,7 @@ func (o *PromptRequest) GetPromptstageSetOk() ([]StageRequest, bool) { // HasPromptstageSet returns a boolean if a field has been set. func (o *PromptRequest) HasPromptstageSet() bool { - if o != nil && o.PromptstageSet != nil { + if o != nil && !IsNil(o.PromptstageSet) { return true } @@ -278,7 +281,7 @@ func (o *PromptRequest) SetPromptstageSet(v []StageRequest) { // GetSubText returns the SubText field value if set, zero value otherwise. func (o *PromptRequest) GetSubText() string { - if o == nil || o.SubText == nil { + if o == nil || IsNil(o.SubText) { var ret string return ret } @@ -288,7 +291,7 @@ func (o *PromptRequest) GetSubText() string { // GetSubTextOk returns a tuple with the SubText field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PromptRequest) GetSubTextOk() (*string, bool) { - if o == nil || o.SubText == nil { + if o == nil || IsNil(o.SubText) { return nil, false } return o.SubText, true @@ -296,7 +299,7 @@ func (o *PromptRequest) GetSubTextOk() (*string, bool) { // HasSubText returns a boolean if a field has been set. func (o *PromptRequest) HasSubText() bool { - if o != nil && o.SubText != nil { + if o != nil && !IsNil(o.SubText) { return true } @@ -310,7 +313,7 @@ func (o *PromptRequest) SetSubText(v string) { // GetPlaceholderExpression returns the PlaceholderExpression field value if set, zero value otherwise. func (o *PromptRequest) GetPlaceholderExpression() bool { - if o == nil || o.PlaceholderExpression == nil { + if o == nil || IsNil(o.PlaceholderExpression) { var ret bool return ret } @@ -320,7 +323,7 @@ func (o *PromptRequest) GetPlaceholderExpression() bool { // GetPlaceholderExpressionOk returns a tuple with the PlaceholderExpression field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PromptRequest) GetPlaceholderExpressionOk() (*bool, bool) { - if o == nil || o.PlaceholderExpression == nil { + if o == nil || IsNil(o.PlaceholderExpression) { return nil, false } return o.PlaceholderExpression, true @@ -328,7 +331,7 @@ func (o *PromptRequest) GetPlaceholderExpressionOk() (*bool, bool) { // HasPlaceholderExpression returns a boolean if a field has been set. func (o *PromptRequest) HasPlaceholderExpression() bool { - if o != nil && o.PlaceholderExpression != nil { + if o != nil && !IsNil(o.PlaceholderExpression) { return true } @@ -341,38 +344,38 @@ func (o *PromptRequest) SetPlaceholderExpression(v bool) { } func (o PromptRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["field_key"] = o.FieldKey - } - if true { - toSerialize["label"] = o.Label - } - if true { - toSerialize["type"] = o.Type + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.Required != nil { + return json.Marshal(toSerialize) +} + +func (o PromptRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["field_key"] = o.FieldKey + toSerialize["label"] = o.Label + toSerialize["type"] = o.Type + if !IsNil(o.Required) { toSerialize["required"] = o.Required } - if o.Placeholder != nil { + if !IsNil(o.Placeholder) { toSerialize["placeholder"] = o.Placeholder } - if o.Order != nil { + if !IsNil(o.Order) { toSerialize["order"] = o.Order } - if o.PromptstageSet != nil { + if !IsNil(o.PromptstageSet) { toSerialize["promptstage_set"] = o.PromptstageSet } - if o.SubText != nil { + if !IsNil(o.SubText) { toSerialize["sub_text"] = o.SubText } - if o.PlaceholderExpression != nil { + if !IsNil(o.PlaceholderExpression) { toSerialize["placeholder_expression"] = o.PlaceholderExpression } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePromptRequest struct { diff --git a/model_prompt_stage.go b/model_prompt_stage.go index 8874bdc8d..6039a92d1 100644 --- a/model_prompt_stage.go +++ b/model_prompt_stage.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PromptStage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PromptStage{} + // PromptStage PromptStage Serializer type PromptStage struct { Pk string `json:"pk"` @@ -202,7 +205,7 @@ func (o *PromptStage) SetMetaModelName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *PromptStage) GetFlowSet() []FlowSet { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSet return ret } @@ -212,7 +215,7 @@ func (o *PromptStage) GetFlowSet() []FlowSet { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PromptStage) GetFlowSetOk() ([]FlowSet, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -220,7 +223,7 @@ func (o *PromptStage) GetFlowSetOk() ([]FlowSet, bool) { // HasFlowSet returns a boolean if a field has been set. func (o *PromptStage) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -258,7 +261,7 @@ func (o *PromptStage) SetFields(v []string) { // GetValidationPolicies returns the ValidationPolicies field value if set, zero value otherwise. func (o *PromptStage) GetValidationPolicies() []string { - if o == nil || o.ValidationPolicies == nil { + if o == nil || IsNil(o.ValidationPolicies) { var ret []string return ret } @@ -268,7 +271,7 @@ func (o *PromptStage) GetValidationPolicies() []string { // GetValidationPoliciesOk returns a tuple with the ValidationPolicies field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PromptStage) GetValidationPoliciesOk() ([]string, bool) { - if o == nil || o.ValidationPolicies == nil { + if o == nil || IsNil(o.ValidationPolicies) { return nil, false } return o.ValidationPolicies, true @@ -276,7 +279,7 @@ func (o *PromptStage) GetValidationPoliciesOk() ([]string, bool) { // HasValidationPolicies returns a boolean if a field has been set. func (o *PromptStage) HasValidationPolicies() bool { - if o != nil && o.ValidationPolicies != nil { + if o != nil && !IsNil(o.ValidationPolicies) { return true } @@ -289,35 +292,29 @@ func (o *PromptStage) SetValidationPolicies(v []string) { } func (o PromptStage) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["component"] = o.Component - } - if true { - toSerialize["verbose_name"] = o.VerboseName - } - if true { - toSerialize["verbose_name_plural"] = o.VerboseNamePlural - } - if true { - toSerialize["meta_model_name"] = o.MetaModelName + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.FlowSet != nil { + return json.Marshal(toSerialize) +} + +func (o PromptStage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name + // skip: component is readOnly + // skip: verbose_name is readOnly + // skip: verbose_name_plural is readOnly + // skip: meta_model_name is readOnly + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } - if true { - toSerialize["fields"] = o.Fields - } - if o.ValidationPolicies != nil { + toSerialize["fields"] = o.Fields + if !IsNil(o.ValidationPolicies) { toSerialize["validation_policies"] = o.ValidationPolicies } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePromptStage struct { diff --git a/model_prompt_stage_request.go b/model_prompt_stage_request.go index 40aa0cdda..a6faa8590 100644 --- a/model_prompt_stage_request.go +++ b/model_prompt_stage_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PromptStageRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PromptStageRequest{} + // PromptStageRequest PromptStage Serializer type PromptStageRequest struct { Name string `json:"name"` @@ -68,7 +71,7 @@ func (o *PromptStageRequest) SetName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *PromptStageRequest) GetFlowSet() []FlowSetRequest { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSetRequest return ret } @@ -78,7 +81,7 @@ func (o *PromptStageRequest) GetFlowSet() []FlowSetRequest { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PromptStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -86,7 +89,7 @@ func (o *PromptStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { // HasFlowSet returns a boolean if a field has been set. func (o *PromptStageRequest) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -124,7 +127,7 @@ func (o *PromptStageRequest) SetFields(v []string) { // GetValidationPolicies returns the ValidationPolicies field value if set, zero value otherwise. func (o *PromptStageRequest) GetValidationPolicies() []string { - if o == nil || o.ValidationPolicies == nil { + if o == nil || IsNil(o.ValidationPolicies) { var ret []string return ret } @@ -134,7 +137,7 @@ func (o *PromptStageRequest) GetValidationPolicies() []string { // GetValidationPoliciesOk returns a tuple with the ValidationPolicies field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *PromptStageRequest) GetValidationPoliciesOk() ([]string, bool) { - if o == nil || o.ValidationPolicies == nil { + if o == nil || IsNil(o.ValidationPolicies) { return nil, false } return o.ValidationPolicies, true @@ -142,7 +145,7 @@ func (o *PromptStageRequest) GetValidationPoliciesOk() ([]string, bool) { // HasValidationPolicies returns a boolean if a field has been set. func (o *PromptStageRequest) HasValidationPolicies() bool { - if o != nil && o.ValidationPolicies != nil { + if o != nil && !IsNil(o.ValidationPolicies) { return true } @@ -155,20 +158,24 @@ func (o *PromptStageRequest) SetValidationPolicies(v []string) { } func (o PromptStageRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.FlowSet != nil { + return json.Marshal(toSerialize) +} + +func (o PromptStageRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } - if true { - toSerialize["fields"] = o.Fields - } - if o.ValidationPolicies != nil { + toSerialize["fields"] = o.Fields + if !IsNil(o.ValidationPolicies) { toSerialize["validation_policies"] = o.ValidationPolicies } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePromptStageRequest struct { diff --git a/model_property_mapping.go b/model_property_mapping.go index 126c461f5..144c18823 100644 --- a/model_property_mapping.go +++ b/model_property_mapping.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PropertyMapping type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PropertyMapping{} + // PropertyMapping PropertyMapping Serializer type PropertyMapping struct { Pk string `json:"pk"` @@ -82,7 +85,7 @@ func (o *PropertyMapping) SetPk(v string) { // GetManaged returns the Managed field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PropertyMapping) GetManaged() string { - if o == nil || o.Managed.Get() == nil { + if o == nil || IsNil(o.Managed.Get()) { var ret string return ret } @@ -268,32 +271,26 @@ func (o *PropertyMapping) SetMetaModelName(v string) { } func (o PropertyMapping) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } + return json.Marshal(toSerialize) +} + +func (o PropertyMapping) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly if o.Managed.IsSet() { toSerialize["managed"] = o.Managed.Get() } - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["expression"] = o.Expression - } - if true { - toSerialize["component"] = o.Component - } - if true { - toSerialize["verbose_name"] = o.VerboseName - } - if true { - toSerialize["verbose_name_plural"] = o.VerboseNamePlural - } - if true { - toSerialize["meta_model_name"] = o.MetaModelName - } - return json.Marshal(toSerialize) + toSerialize["name"] = o.Name + toSerialize["expression"] = o.Expression + // skip: component is readOnly + // skip: verbose_name is readOnly + // skip: verbose_name_plural is readOnly + // skip: meta_model_name is readOnly + return toSerialize, nil } type NullablePropertyMapping struct { diff --git a/model_property_mapping_preview.go b/model_property_mapping_preview.go index f4973f89e..ceb45a192 100644 --- a/model_property_mapping_preview.go +++ b/model_property_mapping_preview.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PropertyMappingPreview type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PropertyMappingPreview{} + // PropertyMappingPreview Preview how the current user is mapped via the property mappings selected in a provider type PropertyMappingPreview struct { Preview map[string]interface{} `json:"preview"` @@ -52,7 +55,7 @@ func (o *PropertyMappingPreview) GetPreview() map[string]interface{} { // and a boolean to check if the value has been set. func (o *PropertyMappingPreview) GetPreviewOk() (map[string]interface{}, bool) { if o == nil { - return nil, false + return map[string]interface{}{}, false } return o.Preview, true } @@ -63,13 +66,19 @@ func (o *PropertyMappingPreview) SetPreview(v map[string]interface{}) { } func (o PropertyMappingPreview) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["preview"] = o.Preview + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PropertyMappingPreview) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: preview is readOnly + return toSerialize, nil +} + type NullablePropertyMappingPreview struct { value *PropertyMappingPreview isSet bool diff --git a/model_property_mapping_test_result.go b/model_property_mapping_test_result.go index 4aa3a3e9b..05849f3e9 100644 --- a/model_property_mapping_test_result.go +++ b/model_property_mapping_test_result.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PropertyMappingTestResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PropertyMappingTestResult{} + // PropertyMappingTestResult Result of a Property-mapping test type PropertyMappingTestResult struct { Result string `json:"result"` @@ -89,16 +92,20 @@ func (o *PropertyMappingTestResult) SetSuccessful(v bool) { } func (o PropertyMappingTestResult) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["result"] = o.Result - } - if true { - toSerialize["successful"] = o.Successful + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o PropertyMappingTestResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: result is readOnly + // skip: successful is readOnly + return toSerialize, nil +} + type NullablePropertyMappingTestResult struct { value *PropertyMappingTestResult isSet bool diff --git a/model_provider.go b/model_provider.go index d30920ab4..6af8a0867 100644 --- a/model_provider.go +++ b/model_provider.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the Provider type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Provider{} + // Provider Provider Serializer type Provider struct { Pk int32 `json:"pk"` @@ -114,7 +117,7 @@ func (o *Provider) SetName(v string) { // GetAuthenticationFlow returns the AuthenticationFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *Provider) GetAuthenticationFlow() string { - if o == nil || o.AuthenticationFlow.Get() == nil { + if o == nil || IsNil(o.AuthenticationFlow.Get()) { var ret string return ret } @@ -181,7 +184,7 @@ func (o *Provider) SetAuthorizationFlow(v string) { // GetPropertyMappings returns the PropertyMappings field value if set, zero value otherwise. func (o *Provider) GetPropertyMappings() []string { - if o == nil || o.PropertyMappings == nil { + if o == nil || IsNil(o.PropertyMappings) { var ret []string return ret } @@ -191,7 +194,7 @@ func (o *Provider) GetPropertyMappings() []string { // GetPropertyMappingsOk returns a tuple with the PropertyMappings field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Provider) GetPropertyMappingsOk() ([]string, bool) { - if o == nil || o.PropertyMappings == nil { + if o == nil || IsNil(o.PropertyMappings) { return nil, false } return o.PropertyMappings, true @@ -199,7 +202,7 @@ func (o *Provider) GetPropertyMappingsOk() ([]string, bool) { // HasPropertyMappings returns a boolean if a field has been set. func (o *Provider) HasPropertyMappings() bool { - if o != nil && o.PropertyMappings != nil { + if o != nil && !IsNil(o.PropertyMappings) { return true } @@ -356,41 +359,31 @@ func (o *Provider) SetMetaModelName(v string) { } func (o Provider) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } + return json.Marshal(toSerialize) +} + +func (o Provider) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name if o.AuthenticationFlow.IsSet() { toSerialize["authentication_flow"] = o.AuthenticationFlow.Get() } - if true { - toSerialize["authorization_flow"] = o.AuthorizationFlow - } - if o.PropertyMappings != nil { + toSerialize["authorization_flow"] = o.AuthorizationFlow + if !IsNil(o.PropertyMappings) { toSerialize["property_mappings"] = o.PropertyMappings } - if true { - toSerialize["component"] = o.Component - } - if true { - toSerialize["assigned_application_slug"] = o.AssignedApplicationSlug - } - if true { - toSerialize["assigned_application_name"] = o.AssignedApplicationName - } - if true { - toSerialize["verbose_name"] = o.VerboseName - } - if true { - toSerialize["verbose_name_plural"] = o.VerboseNamePlural - } - if true { - toSerialize["meta_model_name"] = o.MetaModelName - } - return json.Marshal(toSerialize) + // skip: component is readOnly + // skip: assigned_application_slug is readOnly + // skip: assigned_application_name is readOnly + // skip: verbose_name is readOnly + // skip: verbose_name_plural is readOnly + // skip: meta_model_name is readOnly + return toSerialize, nil } type NullableProvider struct { diff --git a/model_provider_request.go b/model_provider_request.go index f8cda9832..49b463ebd 100644 --- a/model_provider_request.go +++ b/model_provider_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ProviderRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ProviderRequest{} + // ProviderRequest Provider Serializer type ProviderRequest struct { Name string `json:"name"` @@ -70,7 +73,7 @@ func (o *ProviderRequest) SetName(v string) { // GetAuthenticationFlow returns the AuthenticationFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *ProviderRequest) GetAuthenticationFlow() string { - if o == nil || o.AuthenticationFlow.Get() == nil { + if o == nil || IsNil(o.AuthenticationFlow.Get()) { var ret string return ret } @@ -137,7 +140,7 @@ func (o *ProviderRequest) SetAuthorizationFlow(v string) { // GetPropertyMappings returns the PropertyMappings field value if set, zero value otherwise. func (o *ProviderRequest) GetPropertyMappings() []string { - if o == nil || o.PropertyMappings == nil { + if o == nil || IsNil(o.PropertyMappings) { var ret []string return ret } @@ -147,7 +150,7 @@ func (o *ProviderRequest) GetPropertyMappings() []string { // GetPropertyMappingsOk returns a tuple with the PropertyMappings field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ProviderRequest) GetPropertyMappingsOk() ([]string, bool) { - if o == nil || o.PropertyMappings == nil { + if o == nil || IsNil(o.PropertyMappings) { return nil, false } return o.PropertyMappings, true @@ -155,7 +158,7 @@ func (o *ProviderRequest) GetPropertyMappingsOk() ([]string, bool) { // HasPropertyMappings returns a boolean if a field has been set. func (o *ProviderRequest) HasPropertyMappings() bool { - if o != nil && o.PropertyMappings != nil { + if o != nil && !IsNil(o.PropertyMappings) { return true } @@ -168,20 +171,24 @@ func (o *ProviderRequest) SetPropertyMappings(v []string) { } func (o ProviderRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } + return json.Marshal(toSerialize) +} + +func (o ProviderRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name if o.AuthenticationFlow.IsSet() { toSerialize["authentication_flow"] = o.AuthenticationFlow.Get() } - if true { - toSerialize["authorization_flow"] = o.AuthorizationFlow - } - if o.PropertyMappings != nil { + toSerialize["authorization_flow"] = o.AuthorizationFlow + if !IsNil(o.PropertyMappings) { toSerialize["property_mappings"] = o.PropertyMappings } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableProviderRequest struct { diff --git a/model_proxy_outpost_config.go b/model_proxy_outpost_config.go index 688f847b0..4316d2d68 100644 --- a/model_proxy_outpost_config.go +++ b/model_proxy_outpost_config.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ProxyOutpostConfig type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ProxyOutpostConfig{} + // ProxyOutpostConfig Proxy provider serializer for outposts type ProxyOutpostConfig struct { Pk int32 `json:"pk"` @@ -22,12 +25,12 @@ type ProxyOutpostConfig struct { InternalHost *string `json:"internal_host,omitempty"` ExternalHost string `json:"external_host"` // Validate SSL Certificates of upstream servers - InternalHostSslValidation *bool `json:"internal_host_ssl_validation,omitempty"` - ClientId *string `json:"client_id,omitempty"` - ClientSecret *string `json:"client_secret,omitempty"` - OidcConfiguration ProxyOutpostConfigOidcConfiguration `json:"oidc_configuration"` - CookieSecret *string `json:"cookie_secret,omitempty"` - Certificate NullableString `json:"certificate,omitempty"` + InternalHostSslValidation *bool `json:"internal_host_ssl_validation,omitempty"` + ClientId *string `json:"client_id,omitempty"` + ClientSecret *string `json:"client_secret,omitempty"` + OidcConfiguration OpenIDConnectConfiguration `json:"oidc_configuration"` + CookieSecret *string `json:"cookie_secret,omitempty"` + Certificate NullableString `json:"certificate,omitempty"` // Regular expressions for which authentication is not required. Each new line is interpreted as a new Regular Expression. SkipPathRegex *string `json:"skip_path_regex,omitempty"` // Set a custom HTTP-Basic Authentication header based on values from authentik. @@ -35,10 +38,9 @@ type ProxyOutpostConfig struct { // User/Group Attribute used for the password part of the HTTP-Basic Header. BasicAuthPasswordAttribute *string `json:"basic_auth_password_attribute,omitempty"` // User/Group Attribute used for the user part of the HTTP-Basic Header. If not set, the user's Email address is used. - BasicAuthUserAttribute *string `json:"basic_auth_user_attribute,omitempty"` - // Enable support for forwardAuth in traefik and nginx auth_request. Exclusive with internal_host. * `proxy` - Proxy * `forward_single` - Forward Single * `forward_domain` - Forward Domain - Mode NullableProxyMode `json:"mode,omitempty"` - CookieDomain *string `json:"cookie_domain,omitempty"` + BasicAuthUserAttribute *string `json:"basic_auth_user_attribute,omitempty"` + Mode *ProxyMode `json:"mode,omitempty"` + CookieDomain *string `json:"cookie_domain,omitempty"` // Get token validity as second count AccessTokenValidity NullableFloat64 `json:"access_token_validity"` // When enabled, this provider will intercept the authorization header and authenticate requests based on its value. @@ -55,7 +57,7 @@ type ProxyOutpostConfig struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewProxyOutpostConfig(pk int32, name string, externalHost string, oidcConfiguration ProxyOutpostConfigOidcConfiguration, accessTokenValidity NullableFloat64, scopesToRequest []string, assignedApplicationSlug string, assignedApplicationName string) *ProxyOutpostConfig { +func NewProxyOutpostConfig(pk int32, name string, externalHost string, oidcConfiguration OpenIDConnectConfiguration, accessTokenValidity NullableFloat64, scopesToRequest []string, assignedApplicationSlug string, assignedApplicationName string) *ProxyOutpostConfig { this := ProxyOutpostConfig{} this.Pk = pk this.Name = name @@ -126,7 +128,7 @@ func (o *ProxyOutpostConfig) SetName(v string) { // GetInternalHost returns the InternalHost field value if set, zero value otherwise. func (o *ProxyOutpostConfig) GetInternalHost() string { - if o == nil || o.InternalHost == nil { + if o == nil || IsNil(o.InternalHost) { var ret string return ret } @@ -136,7 +138,7 @@ func (o *ProxyOutpostConfig) GetInternalHost() string { // GetInternalHostOk returns a tuple with the InternalHost field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ProxyOutpostConfig) GetInternalHostOk() (*string, bool) { - if o == nil || o.InternalHost == nil { + if o == nil || IsNil(o.InternalHost) { return nil, false } return o.InternalHost, true @@ -144,7 +146,7 @@ func (o *ProxyOutpostConfig) GetInternalHostOk() (*string, bool) { // HasInternalHost returns a boolean if a field has been set. func (o *ProxyOutpostConfig) HasInternalHost() bool { - if o != nil && o.InternalHost != nil { + if o != nil && !IsNil(o.InternalHost) { return true } @@ -182,7 +184,7 @@ func (o *ProxyOutpostConfig) SetExternalHost(v string) { // GetInternalHostSslValidation returns the InternalHostSslValidation field value if set, zero value otherwise. func (o *ProxyOutpostConfig) GetInternalHostSslValidation() bool { - if o == nil || o.InternalHostSslValidation == nil { + if o == nil || IsNil(o.InternalHostSslValidation) { var ret bool return ret } @@ -192,7 +194,7 @@ func (o *ProxyOutpostConfig) GetInternalHostSslValidation() bool { // GetInternalHostSslValidationOk returns a tuple with the InternalHostSslValidation field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ProxyOutpostConfig) GetInternalHostSslValidationOk() (*bool, bool) { - if o == nil || o.InternalHostSslValidation == nil { + if o == nil || IsNil(o.InternalHostSslValidation) { return nil, false } return o.InternalHostSslValidation, true @@ -200,7 +202,7 @@ func (o *ProxyOutpostConfig) GetInternalHostSslValidationOk() (*bool, bool) { // HasInternalHostSslValidation returns a boolean if a field has been set. func (o *ProxyOutpostConfig) HasInternalHostSslValidation() bool { - if o != nil && o.InternalHostSslValidation != nil { + if o != nil && !IsNil(o.InternalHostSslValidation) { return true } @@ -214,7 +216,7 @@ func (o *ProxyOutpostConfig) SetInternalHostSslValidation(v bool) { // GetClientId returns the ClientId field value if set, zero value otherwise. func (o *ProxyOutpostConfig) GetClientId() string { - if o == nil || o.ClientId == nil { + if o == nil || IsNil(o.ClientId) { var ret string return ret } @@ -224,7 +226,7 @@ func (o *ProxyOutpostConfig) GetClientId() string { // GetClientIdOk returns a tuple with the ClientId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ProxyOutpostConfig) GetClientIdOk() (*string, bool) { - if o == nil || o.ClientId == nil { + if o == nil || IsNil(o.ClientId) { return nil, false } return o.ClientId, true @@ -232,7 +234,7 @@ func (o *ProxyOutpostConfig) GetClientIdOk() (*string, bool) { // HasClientId returns a boolean if a field has been set. func (o *ProxyOutpostConfig) HasClientId() bool { - if o != nil && o.ClientId != nil { + if o != nil && !IsNil(o.ClientId) { return true } @@ -246,7 +248,7 @@ func (o *ProxyOutpostConfig) SetClientId(v string) { // GetClientSecret returns the ClientSecret field value if set, zero value otherwise. func (o *ProxyOutpostConfig) GetClientSecret() string { - if o == nil || o.ClientSecret == nil { + if o == nil || IsNil(o.ClientSecret) { var ret string return ret } @@ -256,7 +258,7 @@ func (o *ProxyOutpostConfig) GetClientSecret() string { // GetClientSecretOk returns a tuple with the ClientSecret field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ProxyOutpostConfig) GetClientSecretOk() (*string, bool) { - if o == nil || o.ClientSecret == nil { + if o == nil || IsNil(o.ClientSecret) { return nil, false } return o.ClientSecret, true @@ -264,7 +266,7 @@ func (o *ProxyOutpostConfig) GetClientSecretOk() (*string, bool) { // HasClientSecret returns a boolean if a field has been set. func (o *ProxyOutpostConfig) HasClientSecret() bool { - if o != nil && o.ClientSecret != nil { + if o != nil && !IsNil(o.ClientSecret) { return true } @@ -277,9 +279,9 @@ func (o *ProxyOutpostConfig) SetClientSecret(v string) { } // GetOidcConfiguration returns the OidcConfiguration field value -func (o *ProxyOutpostConfig) GetOidcConfiguration() ProxyOutpostConfigOidcConfiguration { +func (o *ProxyOutpostConfig) GetOidcConfiguration() OpenIDConnectConfiguration { if o == nil { - var ret ProxyOutpostConfigOidcConfiguration + var ret OpenIDConnectConfiguration return ret } @@ -288,7 +290,7 @@ func (o *ProxyOutpostConfig) GetOidcConfiguration() ProxyOutpostConfigOidcConfig // GetOidcConfigurationOk returns a tuple with the OidcConfiguration field value // and a boolean to check if the value has been set. -func (o *ProxyOutpostConfig) GetOidcConfigurationOk() (*ProxyOutpostConfigOidcConfiguration, bool) { +func (o *ProxyOutpostConfig) GetOidcConfigurationOk() (*OpenIDConnectConfiguration, bool) { if o == nil { return nil, false } @@ -296,13 +298,13 @@ func (o *ProxyOutpostConfig) GetOidcConfigurationOk() (*ProxyOutpostConfigOidcCo } // SetOidcConfiguration sets field value -func (o *ProxyOutpostConfig) SetOidcConfiguration(v ProxyOutpostConfigOidcConfiguration) { +func (o *ProxyOutpostConfig) SetOidcConfiguration(v OpenIDConnectConfiguration) { o.OidcConfiguration = v } // GetCookieSecret returns the CookieSecret field value if set, zero value otherwise. func (o *ProxyOutpostConfig) GetCookieSecret() string { - if o == nil || o.CookieSecret == nil { + if o == nil || IsNil(o.CookieSecret) { var ret string return ret } @@ -312,7 +314,7 @@ func (o *ProxyOutpostConfig) GetCookieSecret() string { // GetCookieSecretOk returns a tuple with the CookieSecret field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ProxyOutpostConfig) GetCookieSecretOk() (*string, bool) { - if o == nil || o.CookieSecret == nil { + if o == nil || IsNil(o.CookieSecret) { return nil, false } return o.CookieSecret, true @@ -320,7 +322,7 @@ func (o *ProxyOutpostConfig) GetCookieSecretOk() (*string, bool) { // HasCookieSecret returns a boolean if a field has been set. func (o *ProxyOutpostConfig) HasCookieSecret() bool { - if o != nil && o.CookieSecret != nil { + if o != nil && !IsNil(o.CookieSecret) { return true } @@ -334,7 +336,7 @@ func (o *ProxyOutpostConfig) SetCookieSecret(v string) { // GetCertificate returns the Certificate field value if set, zero value otherwise (both if not set or set to explicit null). func (o *ProxyOutpostConfig) GetCertificate() string { - if o == nil || o.Certificate.Get() == nil { + if o == nil || IsNil(o.Certificate.Get()) { var ret string return ret } @@ -377,7 +379,7 @@ func (o *ProxyOutpostConfig) UnsetCertificate() { // GetSkipPathRegex returns the SkipPathRegex field value if set, zero value otherwise. func (o *ProxyOutpostConfig) GetSkipPathRegex() string { - if o == nil || o.SkipPathRegex == nil { + if o == nil || IsNil(o.SkipPathRegex) { var ret string return ret } @@ -387,7 +389,7 @@ func (o *ProxyOutpostConfig) GetSkipPathRegex() string { // GetSkipPathRegexOk returns a tuple with the SkipPathRegex field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ProxyOutpostConfig) GetSkipPathRegexOk() (*string, bool) { - if o == nil || o.SkipPathRegex == nil { + if o == nil || IsNil(o.SkipPathRegex) { return nil, false } return o.SkipPathRegex, true @@ -395,7 +397,7 @@ func (o *ProxyOutpostConfig) GetSkipPathRegexOk() (*string, bool) { // HasSkipPathRegex returns a boolean if a field has been set. func (o *ProxyOutpostConfig) HasSkipPathRegex() bool { - if o != nil && o.SkipPathRegex != nil { + if o != nil && !IsNil(o.SkipPathRegex) { return true } @@ -409,7 +411,7 @@ func (o *ProxyOutpostConfig) SetSkipPathRegex(v string) { // GetBasicAuthEnabled returns the BasicAuthEnabled field value if set, zero value otherwise. func (o *ProxyOutpostConfig) GetBasicAuthEnabled() bool { - if o == nil || o.BasicAuthEnabled == nil { + if o == nil || IsNil(o.BasicAuthEnabled) { var ret bool return ret } @@ -419,7 +421,7 @@ func (o *ProxyOutpostConfig) GetBasicAuthEnabled() bool { // GetBasicAuthEnabledOk returns a tuple with the BasicAuthEnabled field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ProxyOutpostConfig) GetBasicAuthEnabledOk() (*bool, bool) { - if o == nil || o.BasicAuthEnabled == nil { + if o == nil || IsNil(o.BasicAuthEnabled) { return nil, false } return o.BasicAuthEnabled, true @@ -427,7 +429,7 @@ func (o *ProxyOutpostConfig) GetBasicAuthEnabledOk() (*bool, bool) { // HasBasicAuthEnabled returns a boolean if a field has been set. func (o *ProxyOutpostConfig) HasBasicAuthEnabled() bool { - if o != nil && o.BasicAuthEnabled != nil { + if o != nil && !IsNil(o.BasicAuthEnabled) { return true } @@ -441,7 +443,7 @@ func (o *ProxyOutpostConfig) SetBasicAuthEnabled(v bool) { // GetBasicAuthPasswordAttribute returns the BasicAuthPasswordAttribute field value if set, zero value otherwise. func (o *ProxyOutpostConfig) GetBasicAuthPasswordAttribute() string { - if o == nil || o.BasicAuthPasswordAttribute == nil { + if o == nil || IsNil(o.BasicAuthPasswordAttribute) { var ret string return ret } @@ -451,7 +453,7 @@ func (o *ProxyOutpostConfig) GetBasicAuthPasswordAttribute() string { // GetBasicAuthPasswordAttributeOk returns a tuple with the BasicAuthPasswordAttribute field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ProxyOutpostConfig) GetBasicAuthPasswordAttributeOk() (*string, bool) { - if o == nil || o.BasicAuthPasswordAttribute == nil { + if o == nil || IsNil(o.BasicAuthPasswordAttribute) { return nil, false } return o.BasicAuthPasswordAttribute, true @@ -459,7 +461,7 @@ func (o *ProxyOutpostConfig) GetBasicAuthPasswordAttributeOk() (*string, bool) { // HasBasicAuthPasswordAttribute returns a boolean if a field has been set. func (o *ProxyOutpostConfig) HasBasicAuthPasswordAttribute() bool { - if o != nil && o.BasicAuthPasswordAttribute != nil { + if o != nil && !IsNil(o.BasicAuthPasswordAttribute) { return true } @@ -473,7 +475,7 @@ func (o *ProxyOutpostConfig) SetBasicAuthPasswordAttribute(v string) { // GetBasicAuthUserAttribute returns the BasicAuthUserAttribute field value if set, zero value otherwise. func (o *ProxyOutpostConfig) GetBasicAuthUserAttribute() string { - if o == nil || o.BasicAuthUserAttribute == nil { + if o == nil || IsNil(o.BasicAuthUserAttribute) { var ret string return ret } @@ -483,7 +485,7 @@ func (o *ProxyOutpostConfig) GetBasicAuthUserAttribute() string { // GetBasicAuthUserAttributeOk returns a tuple with the BasicAuthUserAttribute field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ProxyOutpostConfig) GetBasicAuthUserAttributeOk() (*string, bool) { - if o == nil || o.BasicAuthUserAttribute == nil { + if o == nil || IsNil(o.BasicAuthUserAttribute) { return nil, false } return o.BasicAuthUserAttribute, true @@ -491,7 +493,7 @@ func (o *ProxyOutpostConfig) GetBasicAuthUserAttributeOk() (*string, bool) { // HasBasicAuthUserAttribute returns a boolean if a field has been set. func (o *ProxyOutpostConfig) HasBasicAuthUserAttribute() bool { - if o != nil && o.BasicAuthUserAttribute != nil { + if o != nil && !IsNil(o.BasicAuthUserAttribute) { return true } @@ -503,52 +505,41 @@ func (o *ProxyOutpostConfig) SetBasicAuthUserAttribute(v string) { o.BasicAuthUserAttribute = &v } -// GetMode returns the Mode field value if set, zero value otherwise (both if not set or set to explicit null). +// GetMode returns the Mode field value if set, zero value otherwise. func (o *ProxyOutpostConfig) GetMode() ProxyMode { - if o == nil || o.Mode.Get() == nil { + if o == nil || IsNil(o.Mode) { var ret ProxyMode return ret } - return *o.Mode.Get() + return *o.Mode } // GetModeOk returns a tuple with the Mode field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ProxyOutpostConfig) GetModeOk() (*ProxyMode, bool) { - if o == nil { + if o == nil || IsNil(o.Mode) { return nil, false } - return o.Mode.Get(), o.Mode.IsSet() + return o.Mode, true } // HasMode returns a boolean if a field has been set. func (o *ProxyOutpostConfig) HasMode() bool { - if o != nil && o.Mode.IsSet() { + if o != nil && !IsNil(o.Mode) { return true } return false } -// SetMode gets a reference to the given NullableProxyMode and assigns it to the Mode field. +// SetMode gets a reference to the given ProxyMode and assigns it to the Mode field. func (o *ProxyOutpostConfig) SetMode(v ProxyMode) { - o.Mode.Set(&v) -} - -// SetModeNil sets the value for Mode to be an explicit nil -func (o *ProxyOutpostConfig) SetModeNil() { - o.Mode.Set(nil) -} - -// UnsetMode ensures that no value is present for Mode, not even an explicit nil -func (o *ProxyOutpostConfig) UnsetMode() { - o.Mode.Unset() + o.Mode = &v } // GetCookieDomain returns the CookieDomain field value if set, zero value otherwise. func (o *ProxyOutpostConfig) GetCookieDomain() string { - if o == nil || o.CookieDomain == nil { + if o == nil || IsNil(o.CookieDomain) { var ret string return ret } @@ -558,7 +549,7 @@ func (o *ProxyOutpostConfig) GetCookieDomain() string { // GetCookieDomainOk returns a tuple with the CookieDomain field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ProxyOutpostConfig) GetCookieDomainOk() (*string, bool) { - if o == nil || o.CookieDomain == nil { + if o == nil || IsNil(o.CookieDomain) { return nil, false } return o.CookieDomain, true @@ -566,7 +557,7 @@ func (o *ProxyOutpostConfig) GetCookieDomainOk() (*string, bool) { // HasCookieDomain returns a boolean if a field has been set. func (o *ProxyOutpostConfig) HasCookieDomain() bool { - if o != nil && o.CookieDomain != nil { + if o != nil && !IsNil(o.CookieDomain) { return true } @@ -606,7 +597,7 @@ func (o *ProxyOutpostConfig) SetAccessTokenValidity(v float64) { // GetInterceptHeaderAuth returns the InterceptHeaderAuth field value if set, zero value otherwise. func (o *ProxyOutpostConfig) GetInterceptHeaderAuth() bool { - if o == nil || o.InterceptHeaderAuth == nil { + if o == nil || IsNil(o.InterceptHeaderAuth) { var ret bool return ret } @@ -616,7 +607,7 @@ func (o *ProxyOutpostConfig) GetInterceptHeaderAuth() bool { // GetInterceptHeaderAuthOk returns a tuple with the InterceptHeaderAuth field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ProxyOutpostConfig) GetInterceptHeaderAuthOk() (*bool, bool) { - if o == nil || o.InterceptHeaderAuth == nil { + if o == nil || IsNil(o.InterceptHeaderAuth) { return nil, false } return o.InterceptHeaderAuth, true @@ -624,7 +615,7 @@ func (o *ProxyOutpostConfig) GetInterceptHeaderAuthOk() (*bool, bool) { // HasInterceptHeaderAuth returns a boolean if a field has been set. func (o *ProxyOutpostConfig) HasInterceptHeaderAuth() bool { - if o != nil && o.InterceptHeaderAuth != nil { + if o != nil && !IsNil(o.InterceptHeaderAuth) { return true } @@ -709,71 +700,63 @@ func (o *ProxyOutpostConfig) SetAssignedApplicationName(v string) { } func (o ProxyOutpostConfig) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if true { - toSerialize["name"] = o.Name - } - if o.InternalHost != nil { + return json.Marshal(toSerialize) +} + +func (o ProxyOutpostConfig) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name + if !IsNil(o.InternalHost) { toSerialize["internal_host"] = o.InternalHost } - if true { - toSerialize["external_host"] = o.ExternalHost - } - if o.InternalHostSslValidation != nil { + toSerialize["external_host"] = o.ExternalHost + if !IsNil(o.InternalHostSslValidation) { toSerialize["internal_host_ssl_validation"] = o.InternalHostSslValidation } - if o.ClientId != nil { + if !IsNil(o.ClientId) { toSerialize["client_id"] = o.ClientId } - if o.ClientSecret != nil { + if !IsNil(o.ClientSecret) { toSerialize["client_secret"] = o.ClientSecret } - if true { - toSerialize["oidc_configuration"] = o.OidcConfiguration - } - if o.CookieSecret != nil { + // skip: oidc_configuration is readOnly + if !IsNil(o.CookieSecret) { toSerialize["cookie_secret"] = o.CookieSecret } if o.Certificate.IsSet() { toSerialize["certificate"] = o.Certificate.Get() } - if o.SkipPathRegex != nil { + if !IsNil(o.SkipPathRegex) { toSerialize["skip_path_regex"] = o.SkipPathRegex } - if o.BasicAuthEnabled != nil { + if !IsNil(o.BasicAuthEnabled) { toSerialize["basic_auth_enabled"] = o.BasicAuthEnabled } - if o.BasicAuthPasswordAttribute != nil { + if !IsNil(o.BasicAuthPasswordAttribute) { toSerialize["basic_auth_password_attribute"] = o.BasicAuthPasswordAttribute } - if o.BasicAuthUserAttribute != nil { + if !IsNil(o.BasicAuthUserAttribute) { toSerialize["basic_auth_user_attribute"] = o.BasicAuthUserAttribute } - if o.Mode.IsSet() { - toSerialize["mode"] = o.Mode.Get() + if !IsNil(o.Mode) { + toSerialize["mode"] = o.Mode } - if o.CookieDomain != nil { + if !IsNil(o.CookieDomain) { toSerialize["cookie_domain"] = o.CookieDomain } - if true { - toSerialize["access_token_validity"] = o.AccessTokenValidity.Get() - } - if o.InterceptHeaderAuth != nil { + toSerialize["access_token_validity"] = o.AccessTokenValidity.Get() + if !IsNil(o.InterceptHeaderAuth) { toSerialize["intercept_header_auth"] = o.InterceptHeaderAuth } - if true { - toSerialize["scopes_to_request"] = o.ScopesToRequest - } - if true { - toSerialize["assigned_application_slug"] = o.AssignedApplicationSlug - } - if true { - toSerialize["assigned_application_name"] = o.AssignedApplicationName - } - return json.Marshal(toSerialize) + // skip: scopes_to_request is readOnly + // skip: assigned_application_slug is readOnly + // skip: assigned_application_name is readOnly + return toSerialize, nil } type NullableProxyOutpostConfig struct { diff --git a/model_proxy_outpost_config_oidc_configuration.go b/model_proxy_outpost_config_oidc_configuration.go deleted file mode 100644 index 469d4afbb..000000000 --- a/model_proxy_outpost_config_oidc_configuration.go +++ /dev/null @@ -1,397 +0,0 @@ -/* -authentik - -Making authentication simple. - -API version: 2023.3.1 -Contact: hello@goauthentik.io -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package api - -import ( - "encoding/json" -) - -// ProxyOutpostConfigOidcConfiguration struct for ProxyOutpostConfigOidcConfiguration -type ProxyOutpostConfigOidcConfiguration struct { - Issuer string `json:"issuer"` - AuthorizationEndpoint string `json:"authorization_endpoint"` - TokenEndpoint string `json:"token_endpoint"` - UserinfoEndpoint string `json:"userinfo_endpoint"` - EndSessionEndpoint string `json:"end_session_endpoint"` - IntrospectionEndpoint string `json:"introspection_endpoint"` - JwksUri string `json:"jwks_uri"` - ResponseTypesSupported []string `json:"response_types_supported"` - IdTokenSigningAlgValuesSupported []string `json:"id_token_signing_alg_values_supported"` - SubjectTypesSupported []string `json:"subject_types_supported"` - TokenEndpointAuthMethodsSupported []string `json:"token_endpoint_auth_methods_supported"` -} - -// NewProxyOutpostConfigOidcConfiguration instantiates a new ProxyOutpostConfigOidcConfiguration object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewProxyOutpostConfigOidcConfiguration(issuer string, authorizationEndpoint string, tokenEndpoint string, userinfoEndpoint string, endSessionEndpoint string, introspectionEndpoint string, jwksUri string, responseTypesSupported []string, idTokenSigningAlgValuesSupported []string, subjectTypesSupported []string, tokenEndpointAuthMethodsSupported []string) *ProxyOutpostConfigOidcConfiguration { - this := ProxyOutpostConfigOidcConfiguration{} - this.Issuer = issuer - this.AuthorizationEndpoint = authorizationEndpoint - this.TokenEndpoint = tokenEndpoint - this.UserinfoEndpoint = userinfoEndpoint - this.EndSessionEndpoint = endSessionEndpoint - this.IntrospectionEndpoint = introspectionEndpoint - this.JwksUri = jwksUri - this.ResponseTypesSupported = responseTypesSupported - this.IdTokenSigningAlgValuesSupported = idTokenSigningAlgValuesSupported - this.SubjectTypesSupported = subjectTypesSupported - this.TokenEndpointAuthMethodsSupported = tokenEndpointAuthMethodsSupported - return &this -} - -// NewProxyOutpostConfigOidcConfigurationWithDefaults instantiates a new ProxyOutpostConfigOidcConfiguration object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewProxyOutpostConfigOidcConfigurationWithDefaults() *ProxyOutpostConfigOidcConfiguration { - this := ProxyOutpostConfigOidcConfiguration{} - return &this -} - -// GetIssuer returns the Issuer field value -func (o *ProxyOutpostConfigOidcConfiguration) GetIssuer() string { - if o == nil { - var ret string - return ret - } - - return o.Issuer -} - -// GetIssuerOk returns a tuple with the Issuer field value -// and a boolean to check if the value has been set. -func (o *ProxyOutpostConfigOidcConfiguration) GetIssuerOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Issuer, true -} - -// SetIssuer sets field value -func (o *ProxyOutpostConfigOidcConfiguration) SetIssuer(v string) { - o.Issuer = v -} - -// GetAuthorizationEndpoint returns the AuthorizationEndpoint field value -func (o *ProxyOutpostConfigOidcConfiguration) GetAuthorizationEndpoint() string { - if o == nil { - var ret string - return ret - } - - return o.AuthorizationEndpoint -} - -// GetAuthorizationEndpointOk returns a tuple with the AuthorizationEndpoint field value -// and a boolean to check if the value has been set. -func (o *ProxyOutpostConfigOidcConfiguration) GetAuthorizationEndpointOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.AuthorizationEndpoint, true -} - -// SetAuthorizationEndpoint sets field value -func (o *ProxyOutpostConfigOidcConfiguration) SetAuthorizationEndpoint(v string) { - o.AuthorizationEndpoint = v -} - -// GetTokenEndpoint returns the TokenEndpoint field value -func (o *ProxyOutpostConfigOidcConfiguration) GetTokenEndpoint() string { - if o == nil { - var ret string - return ret - } - - return o.TokenEndpoint -} - -// GetTokenEndpointOk returns a tuple with the TokenEndpoint field value -// and a boolean to check if the value has been set. -func (o *ProxyOutpostConfigOidcConfiguration) GetTokenEndpointOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.TokenEndpoint, true -} - -// SetTokenEndpoint sets field value -func (o *ProxyOutpostConfigOidcConfiguration) SetTokenEndpoint(v string) { - o.TokenEndpoint = v -} - -// GetUserinfoEndpoint returns the UserinfoEndpoint field value -func (o *ProxyOutpostConfigOidcConfiguration) GetUserinfoEndpoint() string { - if o == nil { - var ret string - return ret - } - - return o.UserinfoEndpoint -} - -// GetUserinfoEndpointOk returns a tuple with the UserinfoEndpoint field value -// and a boolean to check if the value has been set. -func (o *ProxyOutpostConfigOidcConfiguration) GetUserinfoEndpointOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.UserinfoEndpoint, true -} - -// SetUserinfoEndpoint sets field value -func (o *ProxyOutpostConfigOidcConfiguration) SetUserinfoEndpoint(v string) { - o.UserinfoEndpoint = v -} - -// GetEndSessionEndpoint returns the EndSessionEndpoint field value -func (o *ProxyOutpostConfigOidcConfiguration) GetEndSessionEndpoint() string { - if o == nil { - var ret string - return ret - } - - return o.EndSessionEndpoint -} - -// GetEndSessionEndpointOk returns a tuple with the EndSessionEndpoint field value -// and a boolean to check if the value has been set. -func (o *ProxyOutpostConfigOidcConfiguration) GetEndSessionEndpointOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.EndSessionEndpoint, true -} - -// SetEndSessionEndpoint sets field value -func (o *ProxyOutpostConfigOidcConfiguration) SetEndSessionEndpoint(v string) { - o.EndSessionEndpoint = v -} - -// GetIntrospectionEndpoint returns the IntrospectionEndpoint field value -func (o *ProxyOutpostConfigOidcConfiguration) GetIntrospectionEndpoint() string { - if o == nil { - var ret string - return ret - } - - return o.IntrospectionEndpoint -} - -// GetIntrospectionEndpointOk returns a tuple with the IntrospectionEndpoint field value -// and a boolean to check if the value has been set. -func (o *ProxyOutpostConfigOidcConfiguration) GetIntrospectionEndpointOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.IntrospectionEndpoint, true -} - -// SetIntrospectionEndpoint sets field value -func (o *ProxyOutpostConfigOidcConfiguration) SetIntrospectionEndpoint(v string) { - o.IntrospectionEndpoint = v -} - -// GetJwksUri returns the JwksUri field value -func (o *ProxyOutpostConfigOidcConfiguration) GetJwksUri() string { - if o == nil { - var ret string - return ret - } - - return o.JwksUri -} - -// GetJwksUriOk returns a tuple with the JwksUri field value -// and a boolean to check if the value has been set. -func (o *ProxyOutpostConfigOidcConfiguration) GetJwksUriOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.JwksUri, true -} - -// SetJwksUri sets field value -func (o *ProxyOutpostConfigOidcConfiguration) SetJwksUri(v string) { - o.JwksUri = v -} - -// GetResponseTypesSupported returns the ResponseTypesSupported field value -func (o *ProxyOutpostConfigOidcConfiguration) GetResponseTypesSupported() []string { - if o == nil { - var ret []string - return ret - } - - return o.ResponseTypesSupported -} - -// GetResponseTypesSupportedOk returns a tuple with the ResponseTypesSupported field value -// and a boolean to check if the value has been set. -func (o *ProxyOutpostConfigOidcConfiguration) GetResponseTypesSupportedOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.ResponseTypesSupported, true -} - -// SetResponseTypesSupported sets field value -func (o *ProxyOutpostConfigOidcConfiguration) SetResponseTypesSupported(v []string) { - o.ResponseTypesSupported = v -} - -// GetIdTokenSigningAlgValuesSupported returns the IdTokenSigningAlgValuesSupported field value -func (o *ProxyOutpostConfigOidcConfiguration) GetIdTokenSigningAlgValuesSupported() []string { - if o == nil { - var ret []string - return ret - } - - return o.IdTokenSigningAlgValuesSupported -} - -// GetIdTokenSigningAlgValuesSupportedOk returns a tuple with the IdTokenSigningAlgValuesSupported field value -// and a boolean to check if the value has been set. -func (o *ProxyOutpostConfigOidcConfiguration) GetIdTokenSigningAlgValuesSupportedOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.IdTokenSigningAlgValuesSupported, true -} - -// SetIdTokenSigningAlgValuesSupported sets field value -func (o *ProxyOutpostConfigOidcConfiguration) SetIdTokenSigningAlgValuesSupported(v []string) { - o.IdTokenSigningAlgValuesSupported = v -} - -// GetSubjectTypesSupported returns the SubjectTypesSupported field value -func (o *ProxyOutpostConfigOidcConfiguration) GetSubjectTypesSupported() []string { - if o == nil { - var ret []string - return ret - } - - return o.SubjectTypesSupported -} - -// GetSubjectTypesSupportedOk returns a tuple with the SubjectTypesSupported field value -// and a boolean to check if the value has been set. -func (o *ProxyOutpostConfigOidcConfiguration) GetSubjectTypesSupportedOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.SubjectTypesSupported, true -} - -// SetSubjectTypesSupported sets field value -func (o *ProxyOutpostConfigOidcConfiguration) SetSubjectTypesSupported(v []string) { - o.SubjectTypesSupported = v -} - -// GetTokenEndpointAuthMethodsSupported returns the TokenEndpointAuthMethodsSupported field value -func (o *ProxyOutpostConfigOidcConfiguration) GetTokenEndpointAuthMethodsSupported() []string { - if o == nil { - var ret []string - return ret - } - - return o.TokenEndpointAuthMethodsSupported -} - -// GetTokenEndpointAuthMethodsSupportedOk returns a tuple with the TokenEndpointAuthMethodsSupported field value -// and a boolean to check if the value has been set. -func (o *ProxyOutpostConfigOidcConfiguration) GetTokenEndpointAuthMethodsSupportedOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.TokenEndpointAuthMethodsSupported, true -} - -// SetTokenEndpointAuthMethodsSupported sets field value -func (o *ProxyOutpostConfigOidcConfiguration) SetTokenEndpointAuthMethodsSupported(v []string) { - o.TokenEndpointAuthMethodsSupported = v -} - -func (o ProxyOutpostConfigOidcConfiguration) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["issuer"] = o.Issuer - } - if true { - toSerialize["authorization_endpoint"] = o.AuthorizationEndpoint - } - if true { - toSerialize["token_endpoint"] = o.TokenEndpoint - } - if true { - toSerialize["userinfo_endpoint"] = o.UserinfoEndpoint - } - if true { - toSerialize["end_session_endpoint"] = o.EndSessionEndpoint - } - if true { - toSerialize["introspection_endpoint"] = o.IntrospectionEndpoint - } - if true { - toSerialize["jwks_uri"] = o.JwksUri - } - if true { - toSerialize["response_types_supported"] = o.ResponseTypesSupported - } - if true { - toSerialize["id_token_signing_alg_values_supported"] = o.IdTokenSigningAlgValuesSupported - } - if true { - toSerialize["subject_types_supported"] = o.SubjectTypesSupported - } - if true { - toSerialize["token_endpoint_auth_methods_supported"] = o.TokenEndpointAuthMethodsSupported - } - return json.Marshal(toSerialize) -} - -type NullableProxyOutpostConfigOidcConfiguration struct { - value *ProxyOutpostConfigOidcConfiguration - isSet bool -} - -func (v NullableProxyOutpostConfigOidcConfiguration) Get() *ProxyOutpostConfigOidcConfiguration { - return v.value -} - -func (v *NullableProxyOutpostConfigOidcConfiguration) Set(val *ProxyOutpostConfigOidcConfiguration) { - v.value = val - v.isSet = true -} - -func (v NullableProxyOutpostConfigOidcConfiguration) IsSet() bool { - return v.isSet -} - -func (v *NullableProxyOutpostConfigOidcConfiguration) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableProxyOutpostConfigOidcConfiguration(val *ProxyOutpostConfigOidcConfiguration) *NullableProxyOutpostConfigOidcConfiguration { - return &NullableProxyOutpostConfigOidcConfiguration{value: val, isSet: true} -} - -func (v NullableProxyOutpostConfigOidcConfiguration) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableProxyOutpostConfigOidcConfiguration) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/model_proxy_provider.go b/model_proxy_provider.go index 98d5b54f5..7d93e41c4 100644 --- a/model_proxy_provider.go +++ b/model_proxy_provider.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ProxyProvider type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ProxyProvider{} + // ProxyProvider ProxyProvider Serializer type ProxyProvider struct { Pk int32 `json:"pk"` @@ -49,9 +52,8 @@ type ProxyProvider struct { // User/Group Attribute used for the password part of the HTTP-Basic Header. BasicAuthPasswordAttribute *string `json:"basic_auth_password_attribute,omitempty"` // User/Group Attribute used for the user part of the HTTP-Basic Header. If not set, the user's Email address is used. - BasicAuthUserAttribute *string `json:"basic_auth_user_attribute,omitempty"` - // Enable support for forwardAuth in traefik and nginx auth_request. Exclusive with internal_host. * `proxy` - Proxy * `forward_single` - Forward Single * `forward_domain` - Forward Domain - Mode NullableProxyMode `json:"mode,omitempty"` + BasicAuthUserAttribute *string `json:"basic_auth_user_attribute,omitempty"` + Mode *ProxyMode `json:"mode,omitempty"` // When enabled, this provider will intercept the authorization header and authenticate requests based on its value. InterceptHeaderAuth *bool `json:"intercept_header_auth,omitempty"` RedirectUris string `json:"redirect_uris"` @@ -144,7 +146,7 @@ func (o *ProxyProvider) SetName(v string) { // GetAuthenticationFlow returns the AuthenticationFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *ProxyProvider) GetAuthenticationFlow() string { - if o == nil || o.AuthenticationFlow.Get() == nil { + if o == nil || IsNil(o.AuthenticationFlow.Get()) { var ret string return ret } @@ -211,7 +213,7 @@ func (o *ProxyProvider) SetAuthorizationFlow(v string) { // GetPropertyMappings returns the PropertyMappings field value if set, zero value otherwise. func (o *ProxyProvider) GetPropertyMappings() []string { - if o == nil || o.PropertyMappings == nil { + if o == nil || IsNil(o.PropertyMappings) { var ret []string return ret } @@ -221,7 +223,7 @@ func (o *ProxyProvider) GetPropertyMappings() []string { // GetPropertyMappingsOk returns a tuple with the PropertyMappings field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ProxyProvider) GetPropertyMappingsOk() ([]string, bool) { - if o == nil || o.PropertyMappings == nil { + if o == nil || IsNil(o.PropertyMappings) { return nil, false } return o.PropertyMappings, true @@ -229,7 +231,7 @@ func (o *ProxyProvider) GetPropertyMappingsOk() ([]string, bool) { // HasPropertyMappings returns a boolean if a field has been set. func (o *ProxyProvider) HasPropertyMappings() bool { - if o != nil && o.PropertyMappings != nil { + if o != nil && !IsNil(o.PropertyMappings) { return true } @@ -411,7 +413,7 @@ func (o *ProxyProvider) SetClientId(v string) { // GetInternalHost returns the InternalHost field value if set, zero value otherwise. func (o *ProxyProvider) GetInternalHost() string { - if o == nil || o.InternalHost == nil { + if o == nil || IsNil(o.InternalHost) { var ret string return ret } @@ -421,7 +423,7 @@ func (o *ProxyProvider) GetInternalHost() string { // GetInternalHostOk returns a tuple with the InternalHost field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ProxyProvider) GetInternalHostOk() (*string, bool) { - if o == nil || o.InternalHost == nil { + if o == nil || IsNil(o.InternalHost) { return nil, false } return o.InternalHost, true @@ -429,7 +431,7 @@ func (o *ProxyProvider) GetInternalHostOk() (*string, bool) { // HasInternalHost returns a boolean if a field has been set. func (o *ProxyProvider) HasInternalHost() bool { - if o != nil && o.InternalHost != nil { + if o != nil && !IsNil(o.InternalHost) { return true } @@ -467,7 +469,7 @@ func (o *ProxyProvider) SetExternalHost(v string) { // GetInternalHostSslValidation returns the InternalHostSslValidation field value if set, zero value otherwise. func (o *ProxyProvider) GetInternalHostSslValidation() bool { - if o == nil || o.InternalHostSslValidation == nil { + if o == nil || IsNil(o.InternalHostSslValidation) { var ret bool return ret } @@ -477,7 +479,7 @@ func (o *ProxyProvider) GetInternalHostSslValidation() bool { // GetInternalHostSslValidationOk returns a tuple with the InternalHostSslValidation field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ProxyProvider) GetInternalHostSslValidationOk() (*bool, bool) { - if o == nil || o.InternalHostSslValidation == nil { + if o == nil || IsNil(o.InternalHostSslValidation) { return nil, false } return o.InternalHostSslValidation, true @@ -485,7 +487,7 @@ func (o *ProxyProvider) GetInternalHostSslValidationOk() (*bool, bool) { // HasInternalHostSslValidation returns a boolean if a field has been set. func (o *ProxyProvider) HasInternalHostSslValidation() bool { - if o != nil && o.InternalHostSslValidation != nil { + if o != nil && !IsNil(o.InternalHostSslValidation) { return true } @@ -499,7 +501,7 @@ func (o *ProxyProvider) SetInternalHostSslValidation(v bool) { // GetCertificate returns the Certificate field value if set, zero value otherwise (both if not set or set to explicit null). func (o *ProxyProvider) GetCertificate() string { - if o == nil || o.Certificate.Get() == nil { + if o == nil || IsNil(o.Certificate.Get()) { var ret string return ret } @@ -542,7 +544,7 @@ func (o *ProxyProvider) UnsetCertificate() { // GetSkipPathRegex returns the SkipPathRegex field value if set, zero value otherwise. func (o *ProxyProvider) GetSkipPathRegex() string { - if o == nil || o.SkipPathRegex == nil { + if o == nil || IsNil(o.SkipPathRegex) { var ret string return ret } @@ -552,7 +554,7 @@ func (o *ProxyProvider) GetSkipPathRegex() string { // GetSkipPathRegexOk returns a tuple with the SkipPathRegex field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ProxyProvider) GetSkipPathRegexOk() (*string, bool) { - if o == nil || o.SkipPathRegex == nil { + if o == nil || IsNil(o.SkipPathRegex) { return nil, false } return o.SkipPathRegex, true @@ -560,7 +562,7 @@ func (o *ProxyProvider) GetSkipPathRegexOk() (*string, bool) { // HasSkipPathRegex returns a boolean if a field has been set. func (o *ProxyProvider) HasSkipPathRegex() bool { - if o != nil && o.SkipPathRegex != nil { + if o != nil && !IsNil(o.SkipPathRegex) { return true } @@ -574,7 +576,7 @@ func (o *ProxyProvider) SetSkipPathRegex(v string) { // GetBasicAuthEnabled returns the BasicAuthEnabled field value if set, zero value otherwise. func (o *ProxyProvider) GetBasicAuthEnabled() bool { - if o == nil || o.BasicAuthEnabled == nil { + if o == nil || IsNil(o.BasicAuthEnabled) { var ret bool return ret } @@ -584,7 +586,7 @@ func (o *ProxyProvider) GetBasicAuthEnabled() bool { // GetBasicAuthEnabledOk returns a tuple with the BasicAuthEnabled field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ProxyProvider) GetBasicAuthEnabledOk() (*bool, bool) { - if o == nil || o.BasicAuthEnabled == nil { + if o == nil || IsNil(o.BasicAuthEnabled) { return nil, false } return o.BasicAuthEnabled, true @@ -592,7 +594,7 @@ func (o *ProxyProvider) GetBasicAuthEnabledOk() (*bool, bool) { // HasBasicAuthEnabled returns a boolean if a field has been set. func (o *ProxyProvider) HasBasicAuthEnabled() bool { - if o != nil && o.BasicAuthEnabled != nil { + if o != nil && !IsNil(o.BasicAuthEnabled) { return true } @@ -606,7 +608,7 @@ func (o *ProxyProvider) SetBasicAuthEnabled(v bool) { // GetBasicAuthPasswordAttribute returns the BasicAuthPasswordAttribute field value if set, zero value otherwise. func (o *ProxyProvider) GetBasicAuthPasswordAttribute() string { - if o == nil || o.BasicAuthPasswordAttribute == nil { + if o == nil || IsNil(o.BasicAuthPasswordAttribute) { var ret string return ret } @@ -616,7 +618,7 @@ func (o *ProxyProvider) GetBasicAuthPasswordAttribute() string { // GetBasicAuthPasswordAttributeOk returns a tuple with the BasicAuthPasswordAttribute field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ProxyProvider) GetBasicAuthPasswordAttributeOk() (*string, bool) { - if o == nil || o.BasicAuthPasswordAttribute == nil { + if o == nil || IsNil(o.BasicAuthPasswordAttribute) { return nil, false } return o.BasicAuthPasswordAttribute, true @@ -624,7 +626,7 @@ func (o *ProxyProvider) GetBasicAuthPasswordAttributeOk() (*string, bool) { // HasBasicAuthPasswordAttribute returns a boolean if a field has been set. func (o *ProxyProvider) HasBasicAuthPasswordAttribute() bool { - if o != nil && o.BasicAuthPasswordAttribute != nil { + if o != nil && !IsNil(o.BasicAuthPasswordAttribute) { return true } @@ -638,7 +640,7 @@ func (o *ProxyProvider) SetBasicAuthPasswordAttribute(v string) { // GetBasicAuthUserAttribute returns the BasicAuthUserAttribute field value if set, zero value otherwise. func (o *ProxyProvider) GetBasicAuthUserAttribute() string { - if o == nil || o.BasicAuthUserAttribute == nil { + if o == nil || IsNil(o.BasicAuthUserAttribute) { var ret string return ret } @@ -648,7 +650,7 @@ func (o *ProxyProvider) GetBasicAuthUserAttribute() string { // GetBasicAuthUserAttributeOk returns a tuple with the BasicAuthUserAttribute field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ProxyProvider) GetBasicAuthUserAttributeOk() (*string, bool) { - if o == nil || o.BasicAuthUserAttribute == nil { + if o == nil || IsNil(o.BasicAuthUserAttribute) { return nil, false } return o.BasicAuthUserAttribute, true @@ -656,7 +658,7 @@ func (o *ProxyProvider) GetBasicAuthUserAttributeOk() (*string, bool) { // HasBasicAuthUserAttribute returns a boolean if a field has been set. func (o *ProxyProvider) HasBasicAuthUserAttribute() bool { - if o != nil && o.BasicAuthUserAttribute != nil { + if o != nil && !IsNil(o.BasicAuthUserAttribute) { return true } @@ -668,52 +670,41 @@ func (o *ProxyProvider) SetBasicAuthUserAttribute(v string) { o.BasicAuthUserAttribute = &v } -// GetMode returns the Mode field value if set, zero value otherwise (both if not set or set to explicit null). +// GetMode returns the Mode field value if set, zero value otherwise. func (o *ProxyProvider) GetMode() ProxyMode { - if o == nil || o.Mode.Get() == nil { + if o == nil || IsNil(o.Mode) { var ret ProxyMode return ret } - return *o.Mode.Get() + return *o.Mode } // GetModeOk returns a tuple with the Mode field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ProxyProvider) GetModeOk() (*ProxyMode, bool) { - if o == nil { + if o == nil || IsNil(o.Mode) { return nil, false } - return o.Mode.Get(), o.Mode.IsSet() + return o.Mode, true } // HasMode returns a boolean if a field has been set. func (o *ProxyProvider) HasMode() bool { - if o != nil && o.Mode.IsSet() { + if o != nil && !IsNil(o.Mode) { return true } return false } -// SetMode gets a reference to the given NullableProxyMode and assigns it to the Mode field. +// SetMode gets a reference to the given ProxyMode and assigns it to the Mode field. func (o *ProxyProvider) SetMode(v ProxyMode) { - o.Mode.Set(&v) -} - -// SetModeNil sets the value for Mode to be an explicit nil -func (o *ProxyProvider) SetModeNil() { - o.Mode.Set(nil) -} - -// UnsetMode ensures that no value is present for Mode, not even an explicit nil -func (o *ProxyProvider) UnsetMode() { - o.Mode.Unset() + o.Mode = &v } // GetInterceptHeaderAuth returns the InterceptHeaderAuth field value if set, zero value otherwise. func (o *ProxyProvider) GetInterceptHeaderAuth() bool { - if o == nil || o.InterceptHeaderAuth == nil { + if o == nil || IsNil(o.InterceptHeaderAuth) { var ret bool return ret } @@ -723,7 +714,7 @@ func (o *ProxyProvider) GetInterceptHeaderAuth() bool { // GetInterceptHeaderAuthOk returns a tuple with the InterceptHeaderAuth field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ProxyProvider) GetInterceptHeaderAuthOk() (*bool, bool) { - if o == nil || o.InterceptHeaderAuth == nil { + if o == nil || IsNil(o.InterceptHeaderAuth) { return nil, false } return o.InterceptHeaderAuth, true @@ -731,7 +722,7 @@ func (o *ProxyProvider) GetInterceptHeaderAuthOk() (*bool, bool) { // HasInterceptHeaderAuth returns a boolean if a field has been set. func (o *ProxyProvider) HasInterceptHeaderAuth() bool { - if o != nil && o.InterceptHeaderAuth != nil { + if o != nil && !IsNil(o.InterceptHeaderAuth) { return true } @@ -769,7 +760,7 @@ func (o *ProxyProvider) SetRedirectUris(v string) { // GetCookieDomain returns the CookieDomain field value if set, zero value otherwise. func (o *ProxyProvider) GetCookieDomain() string { - if o == nil || o.CookieDomain == nil { + if o == nil || IsNil(o.CookieDomain) { var ret string return ret } @@ -779,7 +770,7 @@ func (o *ProxyProvider) GetCookieDomain() string { // GetCookieDomainOk returns a tuple with the CookieDomain field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ProxyProvider) GetCookieDomainOk() (*string, bool) { - if o == nil || o.CookieDomain == nil { + if o == nil || IsNil(o.CookieDomain) { return nil, false } return o.CookieDomain, true @@ -787,7 +778,7 @@ func (o *ProxyProvider) GetCookieDomainOk() (*string, bool) { // HasCookieDomain returns a boolean if a field has been set. func (o *ProxyProvider) HasCookieDomain() bool { - if o != nil && o.CookieDomain != nil { + if o != nil && !IsNil(o.CookieDomain) { return true } @@ -801,7 +792,7 @@ func (o *ProxyProvider) SetCookieDomain(v string) { // GetJwksSources returns the JwksSources field value if set, zero value otherwise. func (o *ProxyProvider) GetJwksSources() []string { - if o == nil || o.JwksSources == nil { + if o == nil || IsNil(o.JwksSources) { var ret []string return ret } @@ -811,7 +802,7 @@ func (o *ProxyProvider) GetJwksSources() []string { // GetJwksSourcesOk returns a tuple with the JwksSources field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ProxyProvider) GetJwksSourcesOk() ([]string, bool) { - if o == nil || o.JwksSources == nil { + if o == nil || IsNil(o.JwksSources) { return nil, false } return o.JwksSources, true @@ -819,7 +810,7 @@ func (o *ProxyProvider) GetJwksSourcesOk() ([]string, bool) { // HasJwksSources returns a boolean if a field has been set. func (o *ProxyProvider) HasJwksSources() bool { - if o != nil && o.JwksSources != nil { + if o != nil && !IsNil(o.JwksSources) { return true } @@ -833,7 +824,7 @@ func (o *ProxyProvider) SetJwksSources(v []string) { // GetAccessTokenValidity returns the AccessTokenValidity field value if set, zero value otherwise. func (o *ProxyProvider) GetAccessTokenValidity() string { - if o == nil || o.AccessTokenValidity == nil { + if o == nil || IsNil(o.AccessTokenValidity) { var ret string return ret } @@ -843,7 +834,7 @@ func (o *ProxyProvider) GetAccessTokenValidity() string { // GetAccessTokenValidityOk returns a tuple with the AccessTokenValidity field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ProxyProvider) GetAccessTokenValidityOk() (*string, bool) { - if o == nil || o.AccessTokenValidity == nil { + if o == nil || IsNil(o.AccessTokenValidity) { return nil, false } return o.AccessTokenValidity, true @@ -851,7 +842,7 @@ func (o *ProxyProvider) GetAccessTokenValidityOk() (*string, bool) { // HasAccessTokenValidity returns a boolean if a field has been set. func (o *ProxyProvider) HasAccessTokenValidity() bool { - if o != nil && o.AccessTokenValidity != nil { + if o != nil && !IsNil(o.AccessTokenValidity) { return true } @@ -865,7 +856,7 @@ func (o *ProxyProvider) SetAccessTokenValidity(v string) { // GetRefreshTokenValidity returns the RefreshTokenValidity field value if set, zero value otherwise. func (o *ProxyProvider) GetRefreshTokenValidity() string { - if o == nil || o.RefreshTokenValidity == nil { + if o == nil || IsNil(o.RefreshTokenValidity) { var ret string return ret } @@ -875,7 +866,7 @@ func (o *ProxyProvider) GetRefreshTokenValidity() string { // GetRefreshTokenValidityOk returns a tuple with the RefreshTokenValidity field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ProxyProvider) GetRefreshTokenValidityOk() (*string, bool) { - if o == nil || o.RefreshTokenValidity == nil { + if o == nil || IsNil(o.RefreshTokenValidity) { return nil, false } return o.RefreshTokenValidity, true @@ -883,7 +874,7 @@ func (o *ProxyProvider) GetRefreshTokenValidityOk() (*string, bool) { // HasRefreshTokenValidity returns a boolean if a field has been set. func (o *ProxyProvider) HasRefreshTokenValidity() bool { - if o != nil && o.RefreshTokenValidity != nil { + if o != nil && !IsNil(o.RefreshTokenValidity) { return true } @@ -920,92 +911,74 @@ func (o *ProxyProvider) SetOutpostSet(v []string) { } func (o ProxyProvider) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } + return json.Marshal(toSerialize) +} + +func (o ProxyProvider) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name if o.AuthenticationFlow.IsSet() { toSerialize["authentication_flow"] = o.AuthenticationFlow.Get() } - if true { - toSerialize["authorization_flow"] = o.AuthorizationFlow - } - if o.PropertyMappings != nil { + toSerialize["authorization_flow"] = o.AuthorizationFlow + if !IsNil(o.PropertyMappings) { toSerialize["property_mappings"] = o.PropertyMappings } - if true { - toSerialize["component"] = o.Component - } - if true { - toSerialize["assigned_application_slug"] = o.AssignedApplicationSlug - } - if true { - toSerialize["assigned_application_name"] = o.AssignedApplicationName - } - if true { - toSerialize["verbose_name"] = o.VerboseName - } - if true { - toSerialize["verbose_name_plural"] = o.VerboseNamePlural - } - if true { - toSerialize["meta_model_name"] = o.MetaModelName - } - if true { - toSerialize["client_id"] = o.ClientId - } - if o.InternalHost != nil { + // skip: component is readOnly + // skip: assigned_application_slug is readOnly + // skip: assigned_application_name is readOnly + // skip: verbose_name is readOnly + // skip: verbose_name_plural is readOnly + // skip: meta_model_name is readOnly + // skip: client_id is readOnly + if !IsNil(o.InternalHost) { toSerialize["internal_host"] = o.InternalHost } - if true { - toSerialize["external_host"] = o.ExternalHost - } - if o.InternalHostSslValidation != nil { + toSerialize["external_host"] = o.ExternalHost + if !IsNil(o.InternalHostSslValidation) { toSerialize["internal_host_ssl_validation"] = o.InternalHostSslValidation } if o.Certificate.IsSet() { toSerialize["certificate"] = o.Certificate.Get() } - if o.SkipPathRegex != nil { + if !IsNil(o.SkipPathRegex) { toSerialize["skip_path_regex"] = o.SkipPathRegex } - if o.BasicAuthEnabled != nil { + if !IsNil(o.BasicAuthEnabled) { toSerialize["basic_auth_enabled"] = o.BasicAuthEnabled } - if o.BasicAuthPasswordAttribute != nil { + if !IsNil(o.BasicAuthPasswordAttribute) { toSerialize["basic_auth_password_attribute"] = o.BasicAuthPasswordAttribute } - if o.BasicAuthUserAttribute != nil { + if !IsNil(o.BasicAuthUserAttribute) { toSerialize["basic_auth_user_attribute"] = o.BasicAuthUserAttribute } - if o.Mode.IsSet() { - toSerialize["mode"] = o.Mode.Get() + if !IsNil(o.Mode) { + toSerialize["mode"] = o.Mode } - if o.InterceptHeaderAuth != nil { + if !IsNil(o.InterceptHeaderAuth) { toSerialize["intercept_header_auth"] = o.InterceptHeaderAuth } - if true { - toSerialize["redirect_uris"] = o.RedirectUris - } - if o.CookieDomain != nil { + // skip: redirect_uris is readOnly + if !IsNil(o.CookieDomain) { toSerialize["cookie_domain"] = o.CookieDomain } - if o.JwksSources != nil { + if !IsNil(o.JwksSources) { toSerialize["jwks_sources"] = o.JwksSources } - if o.AccessTokenValidity != nil { + if !IsNil(o.AccessTokenValidity) { toSerialize["access_token_validity"] = o.AccessTokenValidity } - if o.RefreshTokenValidity != nil { + if !IsNil(o.RefreshTokenValidity) { toSerialize["refresh_token_validity"] = o.RefreshTokenValidity } - if true { - toSerialize["outpost_set"] = o.OutpostSet - } - return json.Marshal(toSerialize) + // skip: outpost_set is readOnly + return toSerialize, nil } type NullableProxyProvider struct { diff --git a/model_proxy_provider_request.go b/model_proxy_provider_request.go index 1224f9b6f..43500c729 100644 --- a/model_proxy_provider_request.go +++ b/model_proxy_provider_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ProxyProviderRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ProxyProviderRequest{} + // ProxyProviderRequest ProxyProvider Serializer type ProxyProviderRequest struct { Name string `json:"name"` @@ -35,9 +38,8 @@ type ProxyProviderRequest struct { // User/Group Attribute used for the password part of the HTTP-Basic Header. BasicAuthPasswordAttribute *string `json:"basic_auth_password_attribute,omitempty"` // User/Group Attribute used for the user part of the HTTP-Basic Header. If not set, the user's Email address is used. - BasicAuthUserAttribute *string `json:"basic_auth_user_attribute,omitempty"` - // Enable support for forwardAuth in traefik and nginx auth_request. Exclusive with internal_host. * `proxy` - Proxy * `forward_single` - Forward Single * `forward_domain` - Forward Domain - Mode NullableProxyMode `json:"mode,omitempty"` + BasicAuthUserAttribute *string `json:"basic_auth_user_attribute,omitempty"` + Mode *ProxyMode `json:"mode,omitempty"` // When enabled, this provider will intercept the authorization header and authenticate requests based on its value. InterceptHeaderAuth *bool `json:"intercept_header_auth,omitempty"` CookieDomain *string `json:"cookie_domain,omitempty"` @@ -94,7 +96,7 @@ func (o *ProxyProviderRequest) SetName(v string) { // GetAuthenticationFlow returns the AuthenticationFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *ProxyProviderRequest) GetAuthenticationFlow() string { - if o == nil || o.AuthenticationFlow.Get() == nil { + if o == nil || IsNil(o.AuthenticationFlow.Get()) { var ret string return ret } @@ -161,7 +163,7 @@ func (o *ProxyProviderRequest) SetAuthorizationFlow(v string) { // GetPropertyMappings returns the PropertyMappings field value if set, zero value otherwise. func (o *ProxyProviderRequest) GetPropertyMappings() []string { - if o == nil || o.PropertyMappings == nil { + if o == nil || IsNil(o.PropertyMappings) { var ret []string return ret } @@ -171,7 +173,7 @@ func (o *ProxyProviderRequest) GetPropertyMappings() []string { // GetPropertyMappingsOk returns a tuple with the PropertyMappings field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ProxyProviderRequest) GetPropertyMappingsOk() ([]string, bool) { - if o == nil || o.PropertyMappings == nil { + if o == nil || IsNil(o.PropertyMappings) { return nil, false } return o.PropertyMappings, true @@ -179,7 +181,7 @@ func (o *ProxyProviderRequest) GetPropertyMappingsOk() ([]string, bool) { // HasPropertyMappings returns a boolean if a field has been set. func (o *ProxyProviderRequest) HasPropertyMappings() bool { - if o != nil && o.PropertyMappings != nil { + if o != nil && !IsNil(o.PropertyMappings) { return true } @@ -193,7 +195,7 @@ func (o *ProxyProviderRequest) SetPropertyMappings(v []string) { // GetInternalHost returns the InternalHost field value if set, zero value otherwise. func (o *ProxyProviderRequest) GetInternalHost() string { - if o == nil || o.InternalHost == nil { + if o == nil || IsNil(o.InternalHost) { var ret string return ret } @@ -203,7 +205,7 @@ func (o *ProxyProviderRequest) GetInternalHost() string { // GetInternalHostOk returns a tuple with the InternalHost field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ProxyProviderRequest) GetInternalHostOk() (*string, bool) { - if o == nil || o.InternalHost == nil { + if o == nil || IsNil(o.InternalHost) { return nil, false } return o.InternalHost, true @@ -211,7 +213,7 @@ func (o *ProxyProviderRequest) GetInternalHostOk() (*string, bool) { // HasInternalHost returns a boolean if a field has been set. func (o *ProxyProviderRequest) HasInternalHost() bool { - if o != nil && o.InternalHost != nil { + if o != nil && !IsNil(o.InternalHost) { return true } @@ -249,7 +251,7 @@ func (o *ProxyProviderRequest) SetExternalHost(v string) { // GetInternalHostSslValidation returns the InternalHostSslValidation field value if set, zero value otherwise. func (o *ProxyProviderRequest) GetInternalHostSslValidation() bool { - if o == nil || o.InternalHostSslValidation == nil { + if o == nil || IsNil(o.InternalHostSslValidation) { var ret bool return ret } @@ -259,7 +261,7 @@ func (o *ProxyProviderRequest) GetInternalHostSslValidation() bool { // GetInternalHostSslValidationOk returns a tuple with the InternalHostSslValidation field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ProxyProviderRequest) GetInternalHostSslValidationOk() (*bool, bool) { - if o == nil || o.InternalHostSslValidation == nil { + if o == nil || IsNil(o.InternalHostSslValidation) { return nil, false } return o.InternalHostSslValidation, true @@ -267,7 +269,7 @@ func (o *ProxyProviderRequest) GetInternalHostSslValidationOk() (*bool, bool) { // HasInternalHostSslValidation returns a boolean if a field has been set. func (o *ProxyProviderRequest) HasInternalHostSslValidation() bool { - if o != nil && o.InternalHostSslValidation != nil { + if o != nil && !IsNil(o.InternalHostSslValidation) { return true } @@ -281,7 +283,7 @@ func (o *ProxyProviderRequest) SetInternalHostSslValidation(v bool) { // GetCertificate returns the Certificate field value if set, zero value otherwise (both if not set or set to explicit null). func (o *ProxyProviderRequest) GetCertificate() string { - if o == nil || o.Certificate.Get() == nil { + if o == nil || IsNil(o.Certificate.Get()) { var ret string return ret } @@ -324,7 +326,7 @@ func (o *ProxyProviderRequest) UnsetCertificate() { // GetSkipPathRegex returns the SkipPathRegex field value if set, zero value otherwise. func (o *ProxyProviderRequest) GetSkipPathRegex() string { - if o == nil || o.SkipPathRegex == nil { + if o == nil || IsNil(o.SkipPathRegex) { var ret string return ret } @@ -334,7 +336,7 @@ func (o *ProxyProviderRequest) GetSkipPathRegex() string { // GetSkipPathRegexOk returns a tuple with the SkipPathRegex field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ProxyProviderRequest) GetSkipPathRegexOk() (*string, bool) { - if o == nil || o.SkipPathRegex == nil { + if o == nil || IsNil(o.SkipPathRegex) { return nil, false } return o.SkipPathRegex, true @@ -342,7 +344,7 @@ func (o *ProxyProviderRequest) GetSkipPathRegexOk() (*string, bool) { // HasSkipPathRegex returns a boolean if a field has been set. func (o *ProxyProviderRequest) HasSkipPathRegex() bool { - if o != nil && o.SkipPathRegex != nil { + if o != nil && !IsNil(o.SkipPathRegex) { return true } @@ -356,7 +358,7 @@ func (o *ProxyProviderRequest) SetSkipPathRegex(v string) { // GetBasicAuthEnabled returns the BasicAuthEnabled field value if set, zero value otherwise. func (o *ProxyProviderRequest) GetBasicAuthEnabled() bool { - if o == nil || o.BasicAuthEnabled == nil { + if o == nil || IsNil(o.BasicAuthEnabled) { var ret bool return ret } @@ -366,7 +368,7 @@ func (o *ProxyProviderRequest) GetBasicAuthEnabled() bool { // GetBasicAuthEnabledOk returns a tuple with the BasicAuthEnabled field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ProxyProviderRequest) GetBasicAuthEnabledOk() (*bool, bool) { - if o == nil || o.BasicAuthEnabled == nil { + if o == nil || IsNil(o.BasicAuthEnabled) { return nil, false } return o.BasicAuthEnabled, true @@ -374,7 +376,7 @@ func (o *ProxyProviderRequest) GetBasicAuthEnabledOk() (*bool, bool) { // HasBasicAuthEnabled returns a boolean if a field has been set. func (o *ProxyProviderRequest) HasBasicAuthEnabled() bool { - if o != nil && o.BasicAuthEnabled != nil { + if o != nil && !IsNil(o.BasicAuthEnabled) { return true } @@ -388,7 +390,7 @@ func (o *ProxyProviderRequest) SetBasicAuthEnabled(v bool) { // GetBasicAuthPasswordAttribute returns the BasicAuthPasswordAttribute field value if set, zero value otherwise. func (o *ProxyProviderRequest) GetBasicAuthPasswordAttribute() string { - if o == nil || o.BasicAuthPasswordAttribute == nil { + if o == nil || IsNil(o.BasicAuthPasswordAttribute) { var ret string return ret } @@ -398,7 +400,7 @@ func (o *ProxyProviderRequest) GetBasicAuthPasswordAttribute() string { // GetBasicAuthPasswordAttributeOk returns a tuple with the BasicAuthPasswordAttribute field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ProxyProviderRequest) GetBasicAuthPasswordAttributeOk() (*string, bool) { - if o == nil || o.BasicAuthPasswordAttribute == nil { + if o == nil || IsNil(o.BasicAuthPasswordAttribute) { return nil, false } return o.BasicAuthPasswordAttribute, true @@ -406,7 +408,7 @@ func (o *ProxyProviderRequest) GetBasicAuthPasswordAttributeOk() (*string, bool) // HasBasicAuthPasswordAttribute returns a boolean if a field has been set. func (o *ProxyProviderRequest) HasBasicAuthPasswordAttribute() bool { - if o != nil && o.BasicAuthPasswordAttribute != nil { + if o != nil && !IsNil(o.BasicAuthPasswordAttribute) { return true } @@ -420,7 +422,7 @@ func (o *ProxyProviderRequest) SetBasicAuthPasswordAttribute(v string) { // GetBasicAuthUserAttribute returns the BasicAuthUserAttribute field value if set, zero value otherwise. func (o *ProxyProviderRequest) GetBasicAuthUserAttribute() string { - if o == nil || o.BasicAuthUserAttribute == nil { + if o == nil || IsNil(o.BasicAuthUserAttribute) { var ret string return ret } @@ -430,7 +432,7 @@ func (o *ProxyProviderRequest) GetBasicAuthUserAttribute() string { // GetBasicAuthUserAttributeOk returns a tuple with the BasicAuthUserAttribute field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ProxyProviderRequest) GetBasicAuthUserAttributeOk() (*string, bool) { - if o == nil || o.BasicAuthUserAttribute == nil { + if o == nil || IsNil(o.BasicAuthUserAttribute) { return nil, false } return o.BasicAuthUserAttribute, true @@ -438,7 +440,7 @@ func (o *ProxyProviderRequest) GetBasicAuthUserAttributeOk() (*string, bool) { // HasBasicAuthUserAttribute returns a boolean if a field has been set. func (o *ProxyProviderRequest) HasBasicAuthUserAttribute() bool { - if o != nil && o.BasicAuthUserAttribute != nil { + if o != nil && !IsNil(o.BasicAuthUserAttribute) { return true } @@ -450,52 +452,41 @@ func (o *ProxyProviderRequest) SetBasicAuthUserAttribute(v string) { o.BasicAuthUserAttribute = &v } -// GetMode returns the Mode field value if set, zero value otherwise (both if not set or set to explicit null). +// GetMode returns the Mode field value if set, zero value otherwise. func (o *ProxyProviderRequest) GetMode() ProxyMode { - if o == nil || o.Mode.Get() == nil { + if o == nil || IsNil(o.Mode) { var ret ProxyMode return ret } - return *o.Mode.Get() + return *o.Mode } // GetModeOk returns a tuple with the Mode field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ProxyProviderRequest) GetModeOk() (*ProxyMode, bool) { - if o == nil { + if o == nil || IsNil(o.Mode) { return nil, false } - return o.Mode.Get(), o.Mode.IsSet() + return o.Mode, true } // HasMode returns a boolean if a field has been set. func (o *ProxyProviderRequest) HasMode() bool { - if o != nil && o.Mode.IsSet() { + if o != nil && !IsNil(o.Mode) { return true } return false } -// SetMode gets a reference to the given NullableProxyMode and assigns it to the Mode field. +// SetMode gets a reference to the given ProxyMode and assigns it to the Mode field. func (o *ProxyProviderRequest) SetMode(v ProxyMode) { - o.Mode.Set(&v) -} - -// SetModeNil sets the value for Mode to be an explicit nil -func (o *ProxyProviderRequest) SetModeNil() { - o.Mode.Set(nil) -} - -// UnsetMode ensures that no value is present for Mode, not even an explicit nil -func (o *ProxyProviderRequest) UnsetMode() { - o.Mode.Unset() + o.Mode = &v } // GetInterceptHeaderAuth returns the InterceptHeaderAuth field value if set, zero value otherwise. func (o *ProxyProviderRequest) GetInterceptHeaderAuth() bool { - if o == nil || o.InterceptHeaderAuth == nil { + if o == nil || IsNil(o.InterceptHeaderAuth) { var ret bool return ret } @@ -505,7 +496,7 @@ func (o *ProxyProviderRequest) GetInterceptHeaderAuth() bool { // GetInterceptHeaderAuthOk returns a tuple with the InterceptHeaderAuth field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ProxyProviderRequest) GetInterceptHeaderAuthOk() (*bool, bool) { - if o == nil || o.InterceptHeaderAuth == nil { + if o == nil || IsNil(o.InterceptHeaderAuth) { return nil, false } return o.InterceptHeaderAuth, true @@ -513,7 +504,7 @@ func (o *ProxyProviderRequest) GetInterceptHeaderAuthOk() (*bool, bool) { // HasInterceptHeaderAuth returns a boolean if a field has been set. func (o *ProxyProviderRequest) HasInterceptHeaderAuth() bool { - if o != nil && o.InterceptHeaderAuth != nil { + if o != nil && !IsNil(o.InterceptHeaderAuth) { return true } @@ -527,7 +518,7 @@ func (o *ProxyProviderRequest) SetInterceptHeaderAuth(v bool) { // GetCookieDomain returns the CookieDomain field value if set, zero value otherwise. func (o *ProxyProviderRequest) GetCookieDomain() string { - if o == nil || o.CookieDomain == nil { + if o == nil || IsNil(o.CookieDomain) { var ret string return ret } @@ -537,7 +528,7 @@ func (o *ProxyProviderRequest) GetCookieDomain() string { // GetCookieDomainOk returns a tuple with the CookieDomain field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ProxyProviderRequest) GetCookieDomainOk() (*string, bool) { - if o == nil || o.CookieDomain == nil { + if o == nil || IsNil(o.CookieDomain) { return nil, false } return o.CookieDomain, true @@ -545,7 +536,7 @@ func (o *ProxyProviderRequest) GetCookieDomainOk() (*string, bool) { // HasCookieDomain returns a boolean if a field has been set. func (o *ProxyProviderRequest) HasCookieDomain() bool { - if o != nil && o.CookieDomain != nil { + if o != nil && !IsNil(o.CookieDomain) { return true } @@ -559,7 +550,7 @@ func (o *ProxyProviderRequest) SetCookieDomain(v string) { // GetJwksSources returns the JwksSources field value if set, zero value otherwise. func (o *ProxyProviderRequest) GetJwksSources() []string { - if o == nil || o.JwksSources == nil { + if o == nil || IsNil(o.JwksSources) { var ret []string return ret } @@ -569,7 +560,7 @@ func (o *ProxyProviderRequest) GetJwksSources() []string { // GetJwksSourcesOk returns a tuple with the JwksSources field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ProxyProviderRequest) GetJwksSourcesOk() ([]string, bool) { - if o == nil || o.JwksSources == nil { + if o == nil || IsNil(o.JwksSources) { return nil, false } return o.JwksSources, true @@ -577,7 +568,7 @@ func (o *ProxyProviderRequest) GetJwksSourcesOk() ([]string, bool) { // HasJwksSources returns a boolean if a field has been set. func (o *ProxyProviderRequest) HasJwksSources() bool { - if o != nil && o.JwksSources != nil { + if o != nil && !IsNil(o.JwksSources) { return true } @@ -591,7 +582,7 @@ func (o *ProxyProviderRequest) SetJwksSources(v []string) { // GetAccessTokenValidity returns the AccessTokenValidity field value if set, zero value otherwise. func (o *ProxyProviderRequest) GetAccessTokenValidity() string { - if o == nil || o.AccessTokenValidity == nil { + if o == nil || IsNil(o.AccessTokenValidity) { var ret string return ret } @@ -601,7 +592,7 @@ func (o *ProxyProviderRequest) GetAccessTokenValidity() string { // GetAccessTokenValidityOk returns a tuple with the AccessTokenValidity field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ProxyProviderRequest) GetAccessTokenValidityOk() (*string, bool) { - if o == nil || o.AccessTokenValidity == nil { + if o == nil || IsNil(o.AccessTokenValidity) { return nil, false } return o.AccessTokenValidity, true @@ -609,7 +600,7 @@ func (o *ProxyProviderRequest) GetAccessTokenValidityOk() (*string, bool) { // HasAccessTokenValidity returns a boolean if a field has been set. func (o *ProxyProviderRequest) HasAccessTokenValidity() bool { - if o != nil && o.AccessTokenValidity != nil { + if o != nil && !IsNil(o.AccessTokenValidity) { return true } @@ -623,7 +614,7 @@ func (o *ProxyProviderRequest) SetAccessTokenValidity(v string) { // GetRefreshTokenValidity returns the RefreshTokenValidity field value if set, zero value otherwise. func (o *ProxyProviderRequest) GetRefreshTokenValidity() string { - if o == nil || o.RefreshTokenValidity == nil { + if o == nil || IsNil(o.RefreshTokenValidity) { var ret string return ret } @@ -633,7 +624,7 @@ func (o *ProxyProviderRequest) GetRefreshTokenValidity() string { // GetRefreshTokenValidityOk returns a tuple with the RefreshTokenValidity field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ProxyProviderRequest) GetRefreshTokenValidityOk() (*string, bool) { - if o == nil || o.RefreshTokenValidity == nil { + if o == nil || IsNil(o.RefreshTokenValidity) { return nil, false } return o.RefreshTokenValidity, true @@ -641,7 +632,7 @@ func (o *ProxyProviderRequest) GetRefreshTokenValidityOk() (*string, bool) { // HasRefreshTokenValidity returns a boolean if a field has been set. func (o *ProxyProviderRequest) HasRefreshTokenValidity() bool { - if o != nil && o.RefreshTokenValidity != nil { + if o != nil && !IsNil(o.RefreshTokenValidity) { return true } @@ -654,62 +645,64 @@ func (o *ProxyProviderRequest) SetRefreshTokenValidity(v string) { } func (o ProxyProviderRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } + return json.Marshal(toSerialize) +} + +func (o ProxyProviderRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name if o.AuthenticationFlow.IsSet() { toSerialize["authentication_flow"] = o.AuthenticationFlow.Get() } - if true { - toSerialize["authorization_flow"] = o.AuthorizationFlow - } - if o.PropertyMappings != nil { + toSerialize["authorization_flow"] = o.AuthorizationFlow + if !IsNil(o.PropertyMappings) { toSerialize["property_mappings"] = o.PropertyMappings } - if o.InternalHost != nil { + if !IsNil(o.InternalHost) { toSerialize["internal_host"] = o.InternalHost } - if true { - toSerialize["external_host"] = o.ExternalHost - } - if o.InternalHostSslValidation != nil { + toSerialize["external_host"] = o.ExternalHost + if !IsNil(o.InternalHostSslValidation) { toSerialize["internal_host_ssl_validation"] = o.InternalHostSslValidation } if o.Certificate.IsSet() { toSerialize["certificate"] = o.Certificate.Get() } - if o.SkipPathRegex != nil { + if !IsNil(o.SkipPathRegex) { toSerialize["skip_path_regex"] = o.SkipPathRegex } - if o.BasicAuthEnabled != nil { + if !IsNil(o.BasicAuthEnabled) { toSerialize["basic_auth_enabled"] = o.BasicAuthEnabled } - if o.BasicAuthPasswordAttribute != nil { + if !IsNil(o.BasicAuthPasswordAttribute) { toSerialize["basic_auth_password_attribute"] = o.BasicAuthPasswordAttribute } - if o.BasicAuthUserAttribute != nil { + if !IsNil(o.BasicAuthUserAttribute) { toSerialize["basic_auth_user_attribute"] = o.BasicAuthUserAttribute } - if o.Mode.IsSet() { - toSerialize["mode"] = o.Mode.Get() + if !IsNil(o.Mode) { + toSerialize["mode"] = o.Mode } - if o.InterceptHeaderAuth != nil { + if !IsNil(o.InterceptHeaderAuth) { toSerialize["intercept_header_auth"] = o.InterceptHeaderAuth } - if o.CookieDomain != nil { + if !IsNil(o.CookieDomain) { toSerialize["cookie_domain"] = o.CookieDomain } - if o.JwksSources != nil { + if !IsNil(o.JwksSources) { toSerialize["jwks_sources"] = o.JwksSources } - if o.AccessTokenValidity != nil { + if !IsNil(o.AccessTokenValidity) { toSerialize["access_token_validity"] = o.AccessTokenValidity } - if o.RefreshTokenValidity != nil { + if !IsNil(o.RefreshTokenValidity) { toSerialize["refresh_token_validity"] = o.RefreshTokenValidity } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableProxyProviderRequest struct { diff --git a/model_radius_outpost_config.go b/model_radius_outpost_config.go index 21f0ade67..d8fb7d647 100644 --- a/model_radius_outpost_config.go +++ b/model_radius_outpost_config.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the RadiusOutpostConfig type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RadiusOutpostConfig{} + // RadiusOutpostConfig RadiusProvider Serializer type RadiusOutpostConfig struct { Pk int32 `json:"pk"` @@ -146,7 +149,7 @@ func (o *RadiusOutpostConfig) SetAuthFlowSlug(v string) { // GetClientNetworks returns the ClientNetworks field value if set, zero value otherwise. func (o *RadiusOutpostConfig) GetClientNetworks() string { - if o == nil || o.ClientNetworks == nil { + if o == nil || IsNil(o.ClientNetworks) { var ret string return ret } @@ -156,7 +159,7 @@ func (o *RadiusOutpostConfig) GetClientNetworks() string { // GetClientNetworksOk returns a tuple with the ClientNetworks field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *RadiusOutpostConfig) GetClientNetworksOk() (*string, bool) { - if o == nil || o.ClientNetworks == nil { + if o == nil || IsNil(o.ClientNetworks) { return nil, false } return o.ClientNetworks, true @@ -164,7 +167,7 @@ func (o *RadiusOutpostConfig) GetClientNetworksOk() (*string, bool) { // HasClientNetworks returns a boolean if a field has been set. func (o *RadiusOutpostConfig) HasClientNetworks() bool { - if o != nil && o.ClientNetworks != nil { + if o != nil && !IsNil(o.ClientNetworks) { return true } @@ -178,7 +181,7 @@ func (o *RadiusOutpostConfig) SetClientNetworks(v string) { // GetSharedSecret returns the SharedSecret field value if set, zero value otherwise. func (o *RadiusOutpostConfig) GetSharedSecret() string { - if o == nil || o.SharedSecret == nil { + if o == nil || IsNil(o.SharedSecret) { var ret string return ret } @@ -188,7 +191,7 @@ func (o *RadiusOutpostConfig) GetSharedSecret() string { // GetSharedSecretOk returns a tuple with the SharedSecret field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *RadiusOutpostConfig) GetSharedSecretOk() (*string, bool) { - if o == nil || o.SharedSecret == nil { + if o == nil || IsNil(o.SharedSecret) { return nil, false } return o.SharedSecret, true @@ -196,7 +199,7 @@ func (o *RadiusOutpostConfig) GetSharedSecretOk() (*string, bool) { // HasSharedSecret returns a boolean if a field has been set. func (o *RadiusOutpostConfig) HasSharedSecret() bool { - if o != nil && o.SharedSecret != nil { + if o != nil && !IsNil(o.SharedSecret) { return true } @@ -209,26 +212,26 @@ func (o *RadiusOutpostConfig) SetSharedSecret(v string) { } func (o RadiusOutpostConfig) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["application_slug"] = o.ApplicationSlug - } - if true { - toSerialize["auth_flow_slug"] = o.AuthFlowSlug + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.ClientNetworks != nil { + return json.Marshal(toSerialize) +} + +func (o RadiusOutpostConfig) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name + toSerialize["application_slug"] = o.ApplicationSlug + toSerialize["auth_flow_slug"] = o.AuthFlowSlug + if !IsNil(o.ClientNetworks) { toSerialize["client_networks"] = o.ClientNetworks } - if o.SharedSecret != nil { + if !IsNil(o.SharedSecret) { toSerialize["shared_secret"] = o.SharedSecret } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableRadiusOutpostConfig struct { diff --git a/model_radius_provider.go b/model_radius_provider.go index 7734d0b6c..001532844 100644 --- a/model_radius_provider.go +++ b/model_radius_provider.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the RadiusProvider type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RadiusProvider{} + // RadiusProvider RadiusProvider Serializer type RadiusProvider struct { Pk int32 `json:"pk"` @@ -118,7 +121,7 @@ func (o *RadiusProvider) SetName(v string) { // GetAuthenticationFlow returns the AuthenticationFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *RadiusProvider) GetAuthenticationFlow() string { - if o == nil || o.AuthenticationFlow.Get() == nil { + if o == nil || IsNil(o.AuthenticationFlow.Get()) { var ret string return ret } @@ -185,7 +188,7 @@ func (o *RadiusProvider) SetAuthorizationFlow(v string) { // GetPropertyMappings returns the PropertyMappings field value if set, zero value otherwise. func (o *RadiusProvider) GetPropertyMappings() []string { - if o == nil || o.PropertyMappings == nil { + if o == nil || IsNil(o.PropertyMappings) { var ret []string return ret } @@ -195,7 +198,7 @@ func (o *RadiusProvider) GetPropertyMappings() []string { // GetPropertyMappingsOk returns a tuple with the PropertyMappings field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *RadiusProvider) GetPropertyMappingsOk() ([]string, bool) { - if o == nil || o.PropertyMappings == nil { + if o == nil || IsNil(o.PropertyMappings) { return nil, false } return o.PropertyMappings, true @@ -203,7 +206,7 @@ func (o *RadiusProvider) GetPropertyMappingsOk() ([]string, bool) { // HasPropertyMappings returns a boolean if a field has been set. func (o *RadiusProvider) HasPropertyMappings() bool { - if o != nil && o.PropertyMappings != nil { + if o != nil && !IsNil(o.PropertyMappings) { return true } @@ -361,7 +364,7 @@ func (o *RadiusProvider) SetMetaModelName(v string) { // GetClientNetworks returns the ClientNetworks field value if set, zero value otherwise. func (o *RadiusProvider) GetClientNetworks() string { - if o == nil || o.ClientNetworks == nil { + if o == nil || IsNil(o.ClientNetworks) { var ret string return ret } @@ -371,7 +374,7 @@ func (o *RadiusProvider) GetClientNetworks() string { // GetClientNetworksOk returns a tuple with the ClientNetworks field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *RadiusProvider) GetClientNetworksOk() (*string, bool) { - if o == nil || o.ClientNetworks == nil { + if o == nil || IsNil(o.ClientNetworks) { return nil, false } return o.ClientNetworks, true @@ -379,7 +382,7 @@ func (o *RadiusProvider) GetClientNetworksOk() (*string, bool) { // HasClientNetworks returns a boolean if a field has been set. func (o *RadiusProvider) HasClientNetworks() bool { - if o != nil && o.ClientNetworks != nil { + if o != nil && !IsNil(o.ClientNetworks) { return true } @@ -393,7 +396,7 @@ func (o *RadiusProvider) SetClientNetworks(v string) { // GetSharedSecret returns the SharedSecret field value if set, zero value otherwise. func (o *RadiusProvider) GetSharedSecret() string { - if o == nil || o.SharedSecret == nil { + if o == nil || IsNil(o.SharedSecret) { var ret string return ret } @@ -403,7 +406,7 @@ func (o *RadiusProvider) GetSharedSecret() string { // GetSharedSecretOk returns a tuple with the SharedSecret field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *RadiusProvider) GetSharedSecretOk() (*string, bool) { - if o == nil || o.SharedSecret == nil { + if o == nil || IsNil(o.SharedSecret) { return nil, false } return o.SharedSecret, true @@ -411,7 +414,7 @@ func (o *RadiusProvider) GetSharedSecretOk() (*string, bool) { // HasSharedSecret returns a boolean if a field has been set. func (o *RadiusProvider) HasSharedSecret() bool { - if o != nil && o.SharedSecret != nil { + if o != nil && !IsNil(o.SharedSecret) { return true } @@ -424,47 +427,37 @@ func (o *RadiusProvider) SetSharedSecret(v string) { } func (o RadiusProvider) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } + return json.Marshal(toSerialize) +} + +func (o RadiusProvider) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name if o.AuthenticationFlow.IsSet() { toSerialize["authentication_flow"] = o.AuthenticationFlow.Get() } - if true { - toSerialize["authorization_flow"] = o.AuthorizationFlow - } - if o.PropertyMappings != nil { + toSerialize["authorization_flow"] = o.AuthorizationFlow + if !IsNil(o.PropertyMappings) { toSerialize["property_mappings"] = o.PropertyMappings } - if true { - toSerialize["component"] = o.Component - } - if true { - toSerialize["assigned_application_slug"] = o.AssignedApplicationSlug - } - if true { - toSerialize["assigned_application_name"] = o.AssignedApplicationName - } - if true { - toSerialize["verbose_name"] = o.VerboseName - } - if true { - toSerialize["verbose_name_plural"] = o.VerboseNamePlural - } - if true { - toSerialize["meta_model_name"] = o.MetaModelName - } - if o.ClientNetworks != nil { + // skip: component is readOnly + // skip: assigned_application_slug is readOnly + // skip: assigned_application_name is readOnly + // skip: verbose_name is readOnly + // skip: verbose_name_plural is readOnly + // skip: meta_model_name is readOnly + if !IsNil(o.ClientNetworks) { toSerialize["client_networks"] = o.ClientNetworks } - if o.SharedSecret != nil { + if !IsNil(o.SharedSecret) { toSerialize["shared_secret"] = o.SharedSecret } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableRadiusProvider struct { diff --git a/model_radius_provider_request.go b/model_radius_provider_request.go index 0416d602f..b24688809 100644 --- a/model_radius_provider_request.go +++ b/model_radius_provider_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the RadiusProviderRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RadiusProviderRequest{} + // RadiusProviderRequest RadiusProvider Serializer type RadiusProviderRequest struct { Name string `json:"name"` @@ -74,7 +77,7 @@ func (o *RadiusProviderRequest) SetName(v string) { // GetAuthenticationFlow returns the AuthenticationFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *RadiusProviderRequest) GetAuthenticationFlow() string { - if o == nil || o.AuthenticationFlow.Get() == nil { + if o == nil || IsNil(o.AuthenticationFlow.Get()) { var ret string return ret } @@ -141,7 +144,7 @@ func (o *RadiusProviderRequest) SetAuthorizationFlow(v string) { // GetPropertyMappings returns the PropertyMappings field value if set, zero value otherwise. func (o *RadiusProviderRequest) GetPropertyMappings() []string { - if o == nil || o.PropertyMappings == nil { + if o == nil || IsNil(o.PropertyMappings) { var ret []string return ret } @@ -151,7 +154,7 @@ func (o *RadiusProviderRequest) GetPropertyMappings() []string { // GetPropertyMappingsOk returns a tuple with the PropertyMappings field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *RadiusProviderRequest) GetPropertyMappingsOk() ([]string, bool) { - if o == nil || o.PropertyMappings == nil { + if o == nil || IsNil(o.PropertyMappings) { return nil, false } return o.PropertyMappings, true @@ -159,7 +162,7 @@ func (o *RadiusProviderRequest) GetPropertyMappingsOk() ([]string, bool) { // HasPropertyMappings returns a boolean if a field has been set. func (o *RadiusProviderRequest) HasPropertyMappings() bool { - if o != nil && o.PropertyMappings != nil { + if o != nil && !IsNil(o.PropertyMappings) { return true } @@ -173,7 +176,7 @@ func (o *RadiusProviderRequest) SetPropertyMappings(v []string) { // GetClientNetworks returns the ClientNetworks field value if set, zero value otherwise. func (o *RadiusProviderRequest) GetClientNetworks() string { - if o == nil || o.ClientNetworks == nil { + if o == nil || IsNil(o.ClientNetworks) { var ret string return ret } @@ -183,7 +186,7 @@ func (o *RadiusProviderRequest) GetClientNetworks() string { // GetClientNetworksOk returns a tuple with the ClientNetworks field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *RadiusProviderRequest) GetClientNetworksOk() (*string, bool) { - if o == nil || o.ClientNetworks == nil { + if o == nil || IsNil(o.ClientNetworks) { return nil, false } return o.ClientNetworks, true @@ -191,7 +194,7 @@ func (o *RadiusProviderRequest) GetClientNetworksOk() (*string, bool) { // HasClientNetworks returns a boolean if a field has been set. func (o *RadiusProviderRequest) HasClientNetworks() bool { - if o != nil && o.ClientNetworks != nil { + if o != nil && !IsNil(o.ClientNetworks) { return true } @@ -205,7 +208,7 @@ func (o *RadiusProviderRequest) SetClientNetworks(v string) { // GetSharedSecret returns the SharedSecret field value if set, zero value otherwise. func (o *RadiusProviderRequest) GetSharedSecret() string { - if o == nil || o.SharedSecret == nil { + if o == nil || IsNil(o.SharedSecret) { var ret string return ret } @@ -215,7 +218,7 @@ func (o *RadiusProviderRequest) GetSharedSecret() string { // GetSharedSecretOk returns a tuple with the SharedSecret field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *RadiusProviderRequest) GetSharedSecretOk() (*string, bool) { - if o == nil || o.SharedSecret == nil { + if o == nil || IsNil(o.SharedSecret) { return nil, false } return o.SharedSecret, true @@ -223,7 +226,7 @@ func (o *RadiusProviderRequest) GetSharedSecretOk() (*string, bool) { // HasSharedSecret returns a boolean if a field has been set. func (o *RadiusProviderRequest) HasSharedSecret() bool { - if o != nil && o.SharedSecret != nil { + if o != nil && !IsNil(o.SharedSecret) { return true } @@ -236,26 +239,30 @@ func (o *RadiusProviderRequest) SetSharedSecret(v string) { } func (o RadiusProviderRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } + return json.Marshal(toSerialize) +} + +func (o RadiusProviderRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name if o.AuthenticationFlow.IsSet() { toSerialize["authentication_flow"] = o.AuthenticationFlow.Get() } - if true { - toSerialize["authorization_flow"] = o.AuthorizationFlow - } - if o.PropertyMappings != nil { + toSerialize["authorization_flow"] = o.AuthorizationFlow + if !IsNil(o.PropertyMappings) { toSerialize["property_mappings"] = o.PropertyMappings } - if o.ClientNetworks != nil { + if !IsNil(o.ClientNetworks) { toSerialize["client_networks"] = o.ClientNetworks } - if o.SharedSecret != nil { + if !IsNil(o.SharedSecret) { toSerialize["shared_secret"] = o.SharedSecret } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableRadiusProviderRequest struct { diff --git a/model_redirect_challenge.go b/model_redirect_challenge.go index e9d087a72..9ded2a86b 100644 --- a/model_redirect_challenge.go +++ b/model_redirect_challenge.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the RedirectChallenge type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RedirectChallenge{} + // RedirectChallenge Challenge type to redirect the client type RedirectChallenge struct { Type ChallengeChoices `json:"type"` @@ -73,7 +76,7 @@ func (o *RedirectChallenge) SetType(v ChallengeChoices) { // GetFlowInfo returns the FlowInfo field value if set, zero value otherwise. func (o *RedirectChallenge) GetFlowInfo() ContextualFlowInfo { - if o == nil || o.FlowInfo == nil { + if o == nil || IsNil(o.FlowInfo) { var ret ContextualFlowInfo return ret } @@ -83,7 +86,7 @@ func (o *RedirectChallenge) GetFlowInfo() ContextualFlowInfo { // GetFlowInfoOk returns a tuple with the FlowInfo field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *RedirectChallenge) GetFlowInfoOk() (*ContextualFlowInfo, bool) { - if o == nil || o.FlowInfo == nil { + if o == nil || IsNil(o.FlowInfo) { return nil, false } return o.FlowInfo, true @@ -91,7 +94,7 @@ func (o *RedirectChallenge) GetFlowInfoOk() (*ContextualFlowInfo, bool) { // HasFlowInfo returns a boolean if a field has been set. func (o *RedirectChallenge) HasFlowInfo() bool { - if o != nil && o.FlowInfo != nil { + if o != nil && !IsNil(o.FlowInfo) { return true } @@ -105,7 +108,7 @@ func (o *RedirectChallenge) SetFlowInfo(v ContextualFlowInfo) { // GetComponent returns the Component field value if set, zero value otherwise. func (o *RedirectChallenge) GetComponent() string { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { var ret string return ret } @@ -115,7 +118,7 @@ func (o *RedirectChallenge) GetComponent() string { // GetComponentOk returns a tuple with the Component field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *RedirectChallenge) GetComponentOk() (*string, bool) { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { return nil, false } return o.Component, true @@ -123,7 +126,7 @@ func (o *RedirectChallenge) GetComponentOk() (*string, bool) { // HasComponent returns a boolean if a field has been set. func (o *RedirectChallenge) HasComponent() bool { - if o != nil && o.Component != nil { + if o != nil && !IsNil(o.Component) { return true } @@ -137,7 +140,7 @@ func (o *RedirectChallenge) SetComponent(v string) { // GetResponseErrors returns the ResponseErrors field value if set, zero value otherwise. func (o *RedirectChallenge) GetResponseErrors() map[string][]ErrorDetail { - if o == nil || o.ResponseErrors == nil { + if o == nil || IsNil(o.ResponseErrors) { var ret map[string][]ErrorDetail return ret } @@ -147,7 +150,7 @@ func (o *RedirectChallenge) GetResponseErrors() map[string][]ErrorDetail { // GetResponseErrorsOk returns a tuple with the ResponseErrors field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *RedirectChallenge) GetResponseErrorsOk() (*map[string][]ErrorDetail, bool) { - if o == nil || o.ResponseErrors == nil { + if o == nil || IsNil(o.ResponseErrors) { return nil, false } return o.ResponseErrors, true @@ -155,7 +158,7 @@ func (o *RedirectChallenge) GetResponseErrorsOk() (*map[string][]ErrorDetail, bo // HasResponseErrors returns a boolean if a field has been set. func (o *RedirectChallenge) HasResponseErrors() bool { - if o != nil && o.ResponseErrors != nil { + if o != nil && !IsNil(o.ResponseErrors) { return true } @@ -192,23 +195,27 @@ func (o *RedirectChallenge) SetTo(v string) { } func (o RedirectChallenge) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["type"] = o.Type + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.FlowInfo != nil { + return json.Marshal(toSerialize) +} + +func (o RedirectChallenge) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + if !IsNil(o.FlowInfo) { toSerialize["flow_info"] = o.FlowInfo } - if o.Component != nil { + if !IsNil(o.Component) { toSerialize["component"] = o.Component } - if o.ResponseErrors != nil { + if !IsNil(o.ResponseErrors) { toSerialize["response_errors"] = o.ResponseErrors } - if true { - toSerialize["to"] = o.To - } - return json.Marshal(toSerialize) + toSerialize["to"] = o.To + return toSerialize, nil } type NullableRedirectChallenge struct { diff --git a/model_reputation.go b/model_reputation.go index 8cddb9416..b2275c232 100644 --- a/model_reputation.go +++ b/model_reputation.go @@ -16,6 +16,9 @@ import ( "time" ) +// checks if the Reputation type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Reputation{} + // Reputation Reputation Serializer type Reputation struct { Pk *string `json:"pk,omitempty"` @@ -48,7 +51,7 @@ func NewReputationWithDefaults() *Reputation { // GetPk returns the Pk field value if set, zero value otherwise. func (o *Reputation) GetPk() string { - if o == nil || o.Pk == nil { + if o == nil || IsNil(o.Pk) { var ret string return ret } @@ -58,7 +61,7 @@ func (o *Reputation) GetPk() string { // GetPkOk returns a tuple with the Pk field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Reputation) GetPkOk() (*string, bool) { - if o == nil || o.Pk == nil { + if o == nil || IsNil(o.Pk) { return nil, false } return o.Pk, true @@ -66,7 +69,7 @@ func (o *Reputation) GetPkOk() (*string, bool) { // HasPk returns a boolean if a field has been set. func (o *Reputation) HasPk() bool { - if o != nil && o.Pk != nil { + if o != nil && !IsNil(o.Pk) { return true } @@ -128,7 +131,7 @@ func (o *Reputation) SetIp(v string) { // GetIpGeoData returns the IpGeoData field value if set, zero value otherwise. func (o *Reputation) GetIpGeoData() map[string]interface{} { - if o == nil || o.IpGeoData == nil { + if o == nil || IsNil(o.IpGeoData) { var ret map[string]interface{} return ret } @@ -138,15 +141,15 @@ func (o *Reputation) GetIpGeoData() map[string]interface{} { // GetIpGeoDataOk returns a tuple with the IpGeoData field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Reputation) GetIpGeoDataOk() (map[string]interface{}, bool) { - if o == nil || o.IpGeoData == nil { - return nil, false + if o == nil || IsNil(o.IpGeoData) { + return map[string]interface{}{}, false } return o.IpGeoData, true } // HasIpGeoData returns a boolean if a field has been set. func (o *Reputation) HasIpGeoData() bool { - if o != nil && o.IpGeoData != nil { + if o != nil && !IsNil(o.IpGeoData) { return true } @@ -160,7 +163,7 @@ func (o *Reputation) SetIpGeoData(v map[string]interface{}) { // GetScore returns the Score field value if set, zero value otherwise. func (o *Reputation) GetScore() int64 { - if o == nil || o.Score == nil { + if o == nil || IsNil(o.Score) { var ret int64 return ret } @@ -170,7 +173,7 @@ func (o *Reputation) GetScore() int64 { // GetScoreOk returns a tuple with the Score field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Reputation) GetScoreOk() (*int64, bool) { - if o == nil || o.Score == nil { + if o == nil || IsNil(o.Score) { return nil, false } return o.Score, true @@ -178,7 +181,7 @@ func (o *Reputation) GetScoreOk() (*int64, bool) { // HasScore returns a boolean if a field has been set. func (o *Reputation) HasScore() bool { - if o != nil && o.Score != nil { + if o != nil && !IsNil(o.Score) { return true } @@ -215,26 +218,28 @@ func (o *Reputation) SetUpdated(v time.Time) { } func (o Reputation) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Reputation) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Pk != nil { + if !IsNil(o.Pk) { toSerialize["pk"] = o.Pk } - if true { - toSerialize["identifier"] = o.Identifier - } - if true { - toSerialize["ip"] = o.Ip - } - if o.IpGeoData != nil { + toSerialize["identifier"] = o.Identifier + toSerialize["ip"] = o.Ip + if !IsNil(o.IpGeoData) { toSerialize["ip_geo_data"] = o.IpGeoData } - if o.Score != nil { + if !IsNil(o.Score) { toSerialize["score"] = o.Score } - if true { - toSerialize["updated"] = o.Updated - } - return json.Marshal(toSerialize) + // skip: updated is readOnly + return toSerialize, nil } type NullableReputation struct { diff --git a/model_reputation_policy.go b/model_reputation_policy.go index 71b35676e..fe1f8af4d 100644 --- a/model_reputation_policy.go +++ b/model_reputation_policy.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ReputationPolicy type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ReputationPolicy{} + // ReputationPolicy Reputation Policy Serializer type ReputationPolicy struct { Pk string `json:"pk"` @@ -110,7 +113,7 @@ func (o *ReputationPolicy) SetName(v string) { // GetExecutionLogging returns the ExecutionLogging field value if set, zero value otherwise. func (o *ReputationPolicy) GetExecutionLogging() bool { - if o == nil || o.ExecutionLogging == nil { + if o == nil || IsNil(o.ExecutionLogging) { var ret bool return ret } @@ -120,7 +123,7 @@ func (o *ReputationPolicy) GetExecutionLogging() bool { // GetExecutionLoggingOk returns a tuple with the ExecutionLogging field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ReputationPolicy) GetExecutionLoggingOk() (*bool, bool) { - if o == nil || o.ExecutionLogging == nil { + if o == nil || IsNil(o.ExecutionLogging) { return nil, false } return o.ExecutionLogging, true @@ -128,7 +131,7 @@ func (o *ReputationPolicy) GetExecutionLoggingOk() (*bool, bool) { // HasExecutionLogging returns a boolean if a field has been set. func (o *ReputationPolicy) HasExecutionLogging() bool { - if o != nil && o.ExecutionLogging != nil { + if o != nil && !IsNil(o.ExecutionLogging) { return true } @@ -262,7 +265,7 @@ func (o *ReputationPolicy) SetBoundTo(v int32) { // GetCheckIp returns the CheckIp field value if set, zero value otherwise. func (o *ReputationPolicy) GetCheckIp() bool { - if o == nil || o.CheckIp == nil { + if o == nil || IsNil(o.CheckIp) { var ret bool return ret } @@ -272,7 +275,7 @@ func (o *ReputationPolicy) GetCheckIp() bool { // GetCheckIpOk returns a tuple with the CheckIp field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ReputationPolicy) GetCheckIpOk() (*bool, bool) { - if o == nil || o.CheckIp == nil { + if o == nil || IsNil(o.CheckIp) { return nil, false } return o.CheckIp, true @@ -280,7 +283,7 @@ func (o *ReputationPolicy) GetCheckIpOk() (*bool, bool) { // HasCheckIp returns a boolean if a field has been set. func (o *ReputationPolicy) HasCheckIp() bool { - if o != nil && o.CheckIp != nil { + if o != nil && !IsNil(o.CheckIp) { return true } @@ -294,7 +297,7 @@ func (o *ReputationPolicy) SetCheckIp(v bool) { // GetCheckUsername returns the CheckUsername field value if set, zero value otherwise. func (o *ReputationPolicy) GetCheckUsername() bool { - if o == nil || o.CheckUsername == nil { + if o == nil || IsNil(o.CheckUsername) { var ret bool return ret } @@ -304,7 +307,7 @@ func (o *ReputationPolicy) GetCheckUsername() bool { // GetCheckUsernameOk returns a tuple with the CheckUsername field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ReputationPolicy) GetCheckUsernameOk() (*bool, bool) { - if o == nil || o.CheckUsername == nil { + if o == nil || IsNil(o.CheckUsername) { return nil, false } return o.CheckUsername, true @@ -312,7 +315,7 @@ func (o *ReputationPolicy) GetCheckUsernameOk() (*bool, bool) { // HasCheckUsername returns a boolean if a field has been set. func (o *ReputationPolicy) HasCheckUsername() bool { - if o != nil && o.CheckUsername != nil { + if o != nil && !IsNil(o.CheckUsername) { return true } @@ -326,7 +329,7 @@ func (o *ReputationPolicy) SetCheckUsername(v bool) { // GetThreshold returns the Threshold field value if set, zero value otherwise. func (o *ReputationPolicy) GetThreshold() int32 { - if o == nil || o.Threshold == nil { + if o == nil || IsNil(o.Threshold) { var ret int32 return ret } @@ -336,7 +339,7 @@ func (o *ReputationPolicy) GetThreshold() int32 { // GetThresholdOk returns a tuple with the Threshold field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ReputationPolicy) GetThresholdOk() (*int32, bool) { - if o == nil || o.Threshold == nil { + if o == nil || IsNil(o.Threshold) { return nil, false } return o.Threshold, true @@ -344,7 +347,7 @@ func (o *ReputationPolicy) GetThresholdOk() (*int32, bool) { // HasThreshold returns a boolean if a field has been set. func (o *ReputationPolicy) HasThreshold() bool { - if o != nil && o.Threshold != nil { + if o != nil && !IsNil(o.Threshold) { return true } @@ -357,41 +360,35 @@ func (o *ReputationPolicy) SetThreshold(v int32) { } func (o ReputationPolicy) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if true { - toSerialize["name"] = o.Name - } - if o.ExecutionLogging != nil { + return json.Marshal(toSerialize) +} + +func (o ReputationPolicy) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name + if !IsNil(o.ExecutionLogging) { toSerialize["execution_logging"] = o.ExecutionLogging } - if true { - toSerialize["component"] = o.Component - } - if true { - toSerialize["verbose_name"] = o.VerboseName - } - if true { - toSerialize["verbose_name_plural"] = o.VerboseNamePlural - } - if true { - toSerialize["meta_model_name"] = o.MetaModelName - } - if true { - toSerialize["bound_to"] = o.BoundTo - } - if o.CheckIp != nil { + // skip: component is readOnly + // skip: verbose_name is readOnly + // skip: verbose_name_plural is readOnly + // skip: meta_model_name is readOnly + // skip: bound_to is readOnly + if !IsNil(o.CheckIp) { toSerialize["check_ip"] = o.CheckIp } - if o.CheckUsername != nil { + if !IsNil(o.CheckUsername) { toSerialize["check_username"] = o.CheckUsername } - if o.Threshold != nil { + if !IsNil(o.Threshold) { toSerialize["threshold"] = o.Threshold } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableReputationPolicy struct { diff --git a/model_reputation_policy_request.go b/model_reputation_policy_request.go index f1e6810b5..03a9b271e 100644 --- a/model_reputation_policy_request.go +++ b/model_reputation_policy_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ReputationPolicyRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ReputationPolicyRequest{} + // ReputationPolicyRequest Reputation Policy Serializer type ReputationPolicyRequest struct { Name string `json:"name"` @@ -69,7 +72,7 @@ func (o *ReputationPolicyRequest) SetName(v string) { // GetExecutionLogging returns the ExecutionLogging field value if set, zero value otherwise. func (o *ReputationPolicyRequest) GetExecutionLogging() bool { - if o == nil || o.ExecutionLogging == nil { + if o == nil || IsNil(o.ExecutionLogging) { var ret bool return ret } @@ -79,7 +82,7 @@ func (o *ReputationPolicyRequest) GetExecutionLogging() bool { // GetExecutionLoggingOk returns a tuple with the ExecutionLogging field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ReputationPolicyRequest) GetExecutionLoggingOk() (*bool, bool) { - if o == nil || o.ExecutionLogging == nil { + if o == nil || IsNil(o.ExecutionLogging) { return nil, false } return o.ExecutionLogging, true @@ -87,7 +90,7 @@ func (o *ReputationPolicyRequest) GetExecutionLoggingOk() (*bool, bool) { // HasExecutionLogging returns a boolean if a field has been set. func (o *ReputationPolicyRequest) HasExecutionLogging() bool { - if o != nil && o.ExecutionLogging != nil { + if o != nil && !IsNil(o.ExecutionLogging) { return true } @@ -101,7 +104,7 @@ func (o *ReputationPolicyRequest) SetExecutionLogging(v bool) { // GetCheckIp returns the CheckIp field value if set, zero value otherwise. func (o *ReputationPolicyRequest) GetCheckIp() bool { - if o == nil || o.CheckIp == nil { + if o == nil || IsNil(o.CheckIp) { var ret bool return ret } @@ -111,7 +114,7 @@ func (o *ReputationPolicyRequest) GetCheckIp() bool { // GetCheckIpOk returns a tuple with the CheckIp field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ReputationPolicyRequest) GetCheckIpOk() (*bool, bool) { - if o == nil || o.CheckIp == nil { + if o == nil || IsNil(o.CheckIp) { return nil, false } return o.CheckIp, true @@ -119,7 +122,7 @@ func (o *ReputationPolicyRequest) GetCheckIpOk() (*bool, bool) { // HasCheckIp returns a boolean if a field has been set. func (o *ReputationPolicyRequest) HasCheckIp() bool { - if o != nil && o.CheckIp != nil { + if o != nil && !IsNil(o.CheckIp) { return true } @@ -133,7 +136,7 @@ func (o *ReputationPolicyRequest) SetCheckIp(v bool) { // GetCheckUsername returns the CheckUsername field value if set, zero value otherwise. func (o *ReputationPolicyRequest) GetCheckUsername() bool { - if o == nil || o.CheckUsername == nil { + if o == nil || IsNil(o.CheckUsername) { var ret bool return ret } @@ -143,7 +146,7 @@ func (o *ReputationPolicyRequest) GetCheckUsername() bool { // GetCheckUsernameOk returns a tuple with the CheckUsername field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ReputationPolicyRequest) GetCheckUsernameOk() (*bool, bool) { - if o == nil || o.CheckUsername == nil { + if o == nil || IsNil(o.CheckUsername) { return nil, false } return o.CheckUsername, true @@ -151,7 +154,7 @@ func (o *ReputationPolicyRequest) GetCheckUsernameOk() (*bool, bool) { // HasCheckUsername returns a boolean if a field has been set. func (o *ReputationPolicyRequest) HasCheckUsername() bool { - if o != nil && o.CheckUsername != nil { + if o != nil && !IsNil(o.CheckUsername) { return true } @@ -165,7 +168,7 @@ func (o *ReputationPolicyRequest) SetCheckUsername(v bool) { // GetThreshold returns the Threshold field value if set, zero value otherwise. func (o *ReputationPolicyRequest) GetThreshold() int32 { - if o == nil || o.Threshold == nil { + if o == nil || IsNil(o.Threshold) { var ret int32 return ret } @@ -175,7 +178,7 @@ func (o *ReputationPolicyRequest) GetThreshold() int32 { // GetThresholdOk returns a tuple with the Threshold field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ReputationPolicyRequest) GetThresholdOk() (*int32, bool) { - if o == nil || o.Threshold == nil { + if o == nil || IsNil(o.Threshold) { return nil, false } return o.Threshold, true @@ -183,7 +186,7 @@ func (o *ReputationPolicyRequest) GetThresholdOk() (*int32, bool) { // HasThreshold returns a boolean if a field has been set. func (o *ReputationPolicyRequest) HasThreshold() bool { - if o != nil && o.Threshold != nil { + if o != nil && !IsNil(o.Threshold) { return true } @@ -196,23 +199,29 @@ func (o *ReputationPolicyRequest) SetThreshold(v int32) { } func (o ReputationPolicyRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.ExecutionLogging != nil { + return json.Marshal(toSerialize) +} + +func (o ReputationPolicyRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.ExecutionLogging) { toSerialize["execution_logging"] = o.ExecutionLogging } - if o.CheckIp != nil { + if !IsNil(o.CheckIp) { toSerialize["check_ip"] = o.CheckIp } - if o.CheckUsername != nil { + if !IsNil(o.CheckUsername) { toSerialize["check_username"] = o.CheckUsername } - if o.Threshold != nil { + if !IsNil(o.Threshold) { toSerialize["threshold"] = o.Threshold } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableReputationPolicyRequest struct { diff --git a/model_saml_metadata.go b/model_saml_metadata.go index 4ad8266e2..7ddc794ff 100644 --- a/model_saml_metadata.go +++ b/model_saml_metadata.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the SAMLMetadata type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SAMLMetadata{} + // SAMLMetadata SAML Provider Metadata serializer type SAMLMetadata struct { Metadata string `json:"metadata"` @@ -89,16 +92,20 @@ func (o *SAMLMetadata) SetDownloadUrl(v string) { } func (o SAMLMetadata) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["metadata"] = o.Metadata - } - if true { - toSerialize["download_url"] = o.DownloadUrl + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o SAMLMetadata) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: metadata is readOnly + // skip: download_url is readOnly + return toSerialize, nil +} + type NullableSAMLMetadata struct { value *SAMLMetadata isSet bool diff --git a/model_saml_property_mapping.go b/model_saml_property_mapping.go index dab642ac9..d4724dde4 100644 --- a/model_saml_property_mapping.go +++ b/model_saml_property_mapping.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the SAMLPropertyMapping type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SAMLPropertyMapping{} + // SAMLPropertyMapping SAMLPropertyMapping Serializer type SAMLPropertyMapping struct { Pk string `json:"pk"` @@ -85,7 +88,7 @@ func (o *SAMLPropertyMapping) SetPk(v string) { // GetManaged returns the Managed field value if set, zero value otherwise (both if not set or set to explicit null). func (o *SAMLPropertyMapping) GetManaged() string { - if o == nil || o.Managed.Get() == nil { + if o == nil || IsNil(o.Managed.Get()) { var ret string return ret } @@ -296,7 +299,7 @@ func (o *SAMLPropertyMapping) SetSamlName(v string) { // GetFriendlyName returns the FriendlyName field value if set, zero value otherwise (both if not set or set to explicit null). func (o *SAMLPropertyMapping) GetFriendlyName() string { - if o == nil || o.FriendlyName.Get() == nil { + if o == nil || IsNil(o.FriendlyName.Get()) { var ret string return ret } @@ -338,38 +341,30 @@ func (o *SAMLPropertyMapping) UnsetFriendlyName() { } func (o SAMLPropertyMapping) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } + return json.Marshal(toSerialize) +} + +func (o SAMLPropertyMapping) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly if o.Managed.IsSet() { toSerialize["managed"] = o.Managed.Get() } - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["expression"] = o.Expression - } - if true { - toSerialize["component"] = o.Component - } - if true { - toSerialize["verbose_name"] = o.VerboseName - } - if true { - toSerialize["verbose_name_plural"] = o.VerboseNamePlural - } - if true { - toSerialize["meta_model_name"] = o.MetaModelName - } - if true { - toSerialize["saml_name"] = o.SamlName - } + toSerialize["name"] = o.Name + toSerialize["expression"] = o.Expression + // skip: component is readOnly + // skip: verbose_name is readOnly + // skip: verbose_name_plural is readOnly + // skip: meta_model_name is readOnly + toSerialize["saml_name"] = o.SamlName if o.FriendlyName.IsSet() { toSerialize["friendly_name"] = o.FriendlyName.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableSAMLPropertyMapping struct { diff --git a/model_saml_property_mapping_request.go b/model_saml_property_mapping_request.go index baa955f53..fccc7db35 100644 --- a/model_saml_property_mapping_request.go +++ b/model_saml_property_mapping_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the SAMLPropertyMappingRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SAMLPropertyMappingRequest{} + // SAMLPropertyMappingRequest SAMLPropertyMapping Serializer type SAMLPropertyMappingRequest struct { // Objects which are managed by authentik. These objects are created and updated automatically. This is flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. @@ -47,7 +50,7 @@ func NewSAMLPropertyMappingRequestWithDefaults() *SAMLPropertyMappingRequest { // GetManaged returns the Managed field value if set, zero value otherwise (both if not set or set to explicit null). func (o *SAMLPropertyMappingRequest) GetManaged() string { - if o == nil || o.Managed.Get() == nil { + if o == nil || IsNil(o.Managed.Get()) { var ret string return ret } @@ -162,7 +165,7 @@ func (o *SAMLPropertyMappingRequest) SetSamlName(v string) { // GetFriendlyName returns the FriendlyName field value if set, zero value otherwise (both if not set or set to explicit null). func (o *SAMLPropertyMappingRequest) GetFriendlyName() string { - if o == nil || o.FriendlyName.Get() == nil { + if o == nil || IsNil(o.FriendlyName.Get()) { var ret string return ret } @@ -204,23 +207,25 @@ func (o *SAMLPropertyMappingRequest) UnsetFriendlyName() { } func (o SAMLPropertyMappingRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SAMLPropertyMappingRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Managed.IsSet() { toSerialize["managed"] = o.Managed.Get() } - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["expression"] = o.Expression - } - if true { - toSerialize["saml_name"] = o.SamlName - } + toSerialize["name"] = o.Name + toSerialize["expression"] = o.Expression + toSerialize["saml_name"] = o.SamlName if o.FriendlyName.IsSet() { toSerialize["friendly_name"] = o.FriendlyName.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableSAMLPropertyMappingRequest struct { diff --git a/model_saml_provider.go b/model_saml_provider.go index ad315f33e..a978a841b 100644 --- a/model_saml_provider.go +++ b/model_saml_provider.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the SAMLProvider type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SAMLProvider{} + // SAMLProvider SAMLProvider Serializer type SAMLProvider struct { Pk int32 `json:"pk"` @@ -55,8 +58,7 @@ type SAMLProvider struct { SigningKp NullableString `json:"signing_kp,omitempty"` // When selected, incoming assertion's Signatures will be validated against this certificate. To allow unsigned Requests, leave on default. VerificationKp NullableString `json:"verification_kp,omitempty"` - // This determines how authentik sends the response back to the Service Provider. * `redirect` - Redirect * `post` - Post - SpBinding NullableSpBindingEnum `json:"sp_binding,omitempty"` + SpBinding *SpBindingEnum `json:"sp_binding,omitempty"` // Get metadata download URL UrlDownloadMetadata string `json:"url_download_metadata"` // Get SSO Post URL @@ -154,7 +156,7 @@ func (o *SAMLProvider) SetName(v string) { // GetAuthenticationFlow returns the AuthenticationFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *SAMLProvider) GetAuthenticationFlow() string { - if o == nil || o.AuthenticationFlow.Get() == nil { + if o == nil || IsNil(o.AuthenticationFlow.Get()) { var ret string return ret } @@ -221,7 +223,7 @@ func (o *SAMLProvider) SetAuthorizationFlow(v string) { // GetPropertyMappings returns the PropertyMappings field value if set, zero value otherwise. func (o *SAMLProvider) GetPropertyMappings() []string { - if o == nil || o.PropertyMappings == nil { + if o == nil || IsNil(o.PropertyMappings) { var ret []string return ret } @@ -231,7 +233,7 @@ func (o *SAMLProvider) GetPropertyMappings() []string { // GetPropertyMappingsOk returns a tuple with the PropertyMappings field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SAMLProvider) GetPropertyMappingsOk() ([]string, bool) { - if o == nil || o.PropertyMappings == nil { + if o == nil || IsNil(o.PropertyMappings) { return nil, false } return o.PropertyMappings, true @@ -239,7 +241,7 @@ func (o *SAMLProvider) GetPropertyMappingsOk() ([]string, bool) { // HasPropertyMappings returns a boolean if a field has been set. func (o *SAMLProvider) HasPropertyMappings() bool { - if o != nil && o.PropertyMappings != nil { + if o != nil && !IsNil(o.PropertyMappings) { return true } @@ -421,7 +423,7 @@ func (o *SAMLProvider) SetAcsUrl(v string) { // GetAudience returns the Audience field value if set, zero value otherwise. func (o *SAMLProvider) GetAudience() string { - if o == nil || o.Audience == nil { + if o == nil || IsNil(o.Audience) { var ret string return ret } @@ -431,7 +433,7 @@ func (o *SAMLProvider) GetAudience() string { // GetAudienceOk returns a tuple with the Audience field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SAMLProvider) GetAudienceOk() (*string, bool) { - if o == nil || o.Audience == nil { + if o == nil || IsNil(o.Audience) { return nil, false } return o.Audience, true @@ -439,7 +441,7 @@ func (o *SAMLProvider) GetAudienceOk() (*string, bool) { // HasAudience returns a boolean if a field has been set. func (o *SAMLProvider) HasAudience() bool { - if o != nil && o.Audience != nil { + if o != nil && !IsNil(o.Audience) { return true } @@ -453,7 +455,7 @@ func (o *SAMLProvider) SetAudience(v string) { // GetIssuer returns the Issuer field value if set, zero value otherwise. func (o *SAMLProvider) GetIssuer() string { - if o == nil || o.Issuer == nil { + if o == nil || IsNil(o.Issuer) { var ret string return ret } @@ -463,7 +465,7 @@ func (o *SAMLProvider) GetIssuer() string { // GetIssuerOk returns a tuple with the Issuer field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SAMLProvider) GetIssuerOk() (*string, bool) { - if o == nil || o.Issuer == nil { + if o == nil || IsNil(o.Issuer) { return nil, false } return o.Issuer, true @@ -471,7 +473,7 @@ func (o *SAMLProvider) GetIssuerOk() (*string, bool) { // HasIssuer returns a boolean if a field has been set. func (o *SAMLProvider) HasIssuer() bool { - if o != nil && o.Issuer != nil { + if o != nil && !IsNil(o.Issuer) { return true } @@ -485,7 +487,7 @@ func (o *SAMLProvider) SetIssuer(v string) { // GetAssertionValidNotBefore returns the AssertionValidNotBefore field value if set, zero value otherwise. func (o *SAMLProvider) GetAssertionValidNotBefore() string { - if o == nil || o.AssertionValidNotBefore == nil { + if o == nil || IsNil(o.AssertionValidNotBefore) { var ret string return ret } @@ -495,7 +497,7 @@ func (o *SAMLProvider) GetAssertionValidNotBefore() string { // GetAssertionValidNotBeforeOk returns a tuple with the AssertionValidNotBefore field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SAMLProvider) GetAssertionValidNotBeforeOk() (*string, bool) { - if o == nil || o.AssertionValidNotBefore == nil { + if o == nil || IsNil(o.AssertionValidNotBefore) { return nil, false } return o.AssertionValidNotBefore, true @@ -503,7 +505,7 @@ func (o *SAMLProvider) GetAssertionValidNotBeforeOk() (*string, bool) { // HasAssertionValidNotBefore returns a boolean if a field has been set. func (o *SAMLProvider) HasAssertionValidNotBefore() bool { - if o != nil && o.AssertionValidNotBefore != nil { + if o != nil && !IsNil(o.AssertionValidNotBefore) { return true } @@ -517,7 +519,7 @@ func (o *SAMLProvider) SetAssertionValidNotBefore(v string) { // GetAssertionValidNotOnOrAfter returns the AssertionValidNotOnOrAfter field value if set, zero value otherwise. func (o *SAMLProvider) GetAssertionValidNotOnOrAfter() string { - if o == nil || o.AssertionValidNotOnOrAfter == nil { + if o == nil || IsNil(o.AssertionValidNotOnOrAfter) { var ret string return ret } @@ -527,7 +529,7 @@ func (o *SAMLProvider) GetAssertionValidNotOnOrAfter() string { // GetAssertionValidNotOnOrAfterOk returns a tuple with the AssertionValidNotOnOrAfter field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SAMLProvider) GetAssertionValidNotOnOrAfterOk() (*string, bool) { - if o == nil || o.AssertionValidNotOnOrAfter == nil { + if o == nil || IsNil(o.AssertionValidNotOnOrAfter) { return nil, false } return o.AssertionValidNotOnOrAfter, true @@ -535,7 +537,7 @@ func (o *SAMLProvider) GetAssertionValidNotOnOrAfterOk() (*string, bool) { // HasAssertionValidNotOnOrAfter returns a boolean if a field has been set. func (o *SAMLProvider) HasAssertionValidNotOnOrAfter() bool { - if o != nil && o.AssertionValidNotOnOrAfter != nil { + if o != nil && !IsNil(o.AssertionValidNotOnOrAfter) { return true } @@ -549,7 +551,7 @@ func (o *SAMLProvider) SetAssertionValidNotOnOrAfter(v string) { // GetSessionValidNotOnOrAfter returns the SessionValidNotOnOrAfter field value if set, zero value otherwise. func (o *SAMLProvider) GetSessionValidNotOnOrAfter() string { - if o == nil || o.SessionValidNotOnOrAfter == nil { + if o == nil || IsNil(o.SessionValidNotOnOrAfter) { var ret string return ret } @@ -559,7 +561,7 @@ func (o *SAMLProvider) GetSessionValidNotOnOrAfter() string { // GetSessionValidNotOnOrAfterOk returns a tuple with the SessionValidNotOnOrAfter field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SAMLProvider) GetSessionValidNotOnOrAfterOk() (*string, bool) { - if o == nil || o.SessionValidNotOnOrAfter == nil { + if o == nil || IsNil(o.SessionValidNotOnOrAfter) { return nil, false } return o.SessionValidNotOnOrAfter, true @@ -567,7 +569,7 @@ func (o *SAMLProvider) GetSessionValidNotOnOrAfterOk() (*string, bool) { // HasSessionValidNotOnOrAfter returns a boolean if a field has been set. func (o *SAMLProvider) HasSessionValidNotOnOrAfter() bool { - if o != nil && o.SessionValidNotOnOrAfter != nil { + if o != nil && !IsNil(o.SessionValidNotOnOrAfter) { return true } @@ -581,7 +583,7 @@ func (o *SAMLProvider) SetSessionValidNotOnOrAfter(v string) { // GetNameIdMapping returns the NameIdMapping field value if set, zero value otherwise (both if not set or set to explicit null). func (o *SAMLProvider) GetNameIdMapping() string { - if o == nil || o.NameIdMapping.Get() == nil { + if o == nil || IsNil(o.NameIdMapping.Get()) { var ret string return ret } @@ -624,7 +626,7 @@ func (o *SAMLProvider) UnsetNameIdMapping() { // GetDigestAlgorithm returns the DigestAlgorithm field value if set, zero value otherwise. func (o *SAMLProvider) GetDigestAlgorithm() DigestAlgorithmEnum { - if o == nil || o.DigestAlgorithm == nil { + if o == nil || IsNil(o.DigestAlgorithm) { var ret DigestAlgorithmEnum return ret } @@ -634,7 +636,7 @@ func (o *SAMLProvider) GetDigestAlgorithm() DigestAlgorithmEnum { // GetDigestAlgorithmOk returns a tuple with the DigestAlgorithm field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SAMLProvider) GetDigestAlgorithmOk() (*DigestAlgorithmEnum, bool) { - if o == nil || o.DigestAlgorithm == nil { + if o == nil || IsNil(o.DigestAlgorithm) { return nil, false } return o.DigestAlgorithm, true @@ -642,7 +644,7 @@ func (o *SAMLProvider) GetDigestAlgorithmOk() (*DigestAlgorithmEnum, bool) { // HasDigestAlgorithm returns a boolean if a field has been set. func (o *SAMLProvider) HasDigestAlgorithm() bool { - if o != nil && o.DigestAlgorithm != nil { + if o != nil && !IsNil(o.DigestAlgorithm) { return true } @@ -656,7 +658,7 @@ func (o *SAMLProvider) SetDigestAlgorithm(v DigestAlgorithmEnum) { // GetSignatureAlgorithm returns the SignatureAlgorithm field value if set, zero value otherwise. func (o *SAMLProvider) GetSignatureAlgorithm() SignatureAlgorithmEnum { - if o == nil || o.SignatureAlgorithm == nil { + if o == nil || IsNil(o.SignatureAlgorithm) { var ret SignatureAlgorithmEnum return ret } @@ -666,7 +668,7 @@ func (o *SAMLProvider) GetSignatureAlgorithm() SignatureAlgorithmEnum { // GetSignatureAlgorithmOk returns a tuple with the SignatureAlgorithm field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SAMLProvider) GetSignatureAlgorithmOk() (*SignatureAlgorithmEnum, bool) { - if o == nil || o.SignatureAlgorithm == nil { + if o == nil || IsNil(o.SignatureAlgorithm) { return nil, false } return o.SignatureAlgorithm, true @@ -674,7 +676,7 @@ func (o *SAMLProvider) GetSignatureAlgorithmOk() (*SignatureAlgorithmEnum, bool) // HasSignatureAlgorithm returns a boolean if a field has been set. func (o *SAMLProvider) HasSignatureAlgorithm() bool { - if o != nil && o.SignatureAlgorithm != nil { + if o != nil && !IsNil(o.SignatureAlgorithm) { return true } @@ -688,7 +690,7 @@ func (o *SAMLProvider) SetSignatureAlgorithm(v SignatureAlgorithmEnum) { // GetSigningKp returns the SigningKp field value if set, zero value otherwise (both if not set or set to explicit null). func (o *SAMLProvider) GetSigningKp() string { - if o == nil || o.SigningKp.Get() == nil { + if o == nil || IsNil(o.SigningKp.Get()) { var ret string return ret } @@ -731,7 +733,7 @@ func (o *SAMLProvider) UnsetSigningKp() { // GetVerificationKp returns the VerificationKp field value if set, zero value otherwise (both if not set or set to explicit null). func (o *SAMLProvider) GetVerificationKp() string { - if o == nil || o.VerificationKp.Get() == nil { + if o == nil || IsNil(o.VerificationKp.Get()) { var ret string return ret } @@ -772,47 +774,36 @@ func (o *SAMLProvider) UnsetVerificationKp() { o.VerificationKp.Unset() } -// GetSpBinding returns the SpBinding field value if set, zero value otherwise (both if not set or set to explicit null). +// GetSpBinding returns the SpBinding field value if set, zero value otherwise. func (o *SAMLProvider) GetSpBinding() SpBindingEnum { - if o == nil || o.SpBinding.Get() == nil { + if o == nil || IsNil(o.SpBinding) { var ret SpBindingEnum return ret } - return *o.SpBinding.Get() + return *o.SpBinding } // GetSpBindingOk returns a tuple with the SpBinding field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *SAMLProvider) GetSpBindingOk() (*SpBindingEnum, bool) { - if o == nil { + if o == nil || IsNil(o.SpBinding) { return nil, false } - return o.SpBinding.Get(), o.SpBinding.IsSet() + return o.SpBinding, true } // HasSpBinding returns a boolean if a field has been set. func (o *SAMLProvider) HasSpBinding() bool { - if o != nil && o.SpBinding.IsSet() { + if o != nil && !IsNil(o.SpBinding) { return true } return false } -// SetSpBinding gets a reference to the given NullableSpBindingEnum and assigns it to the SpBinding field. +// SetSpBinding gets a reference to the given SpBindingEnum and assigns it to the SpBinding field. func (o *SAMLProvider) SetSpBinding(v SpBindingEnum) { - o.SpBinding.Set(&v) -} - -// SetSpBindingNil sets the value for SpBinding to be an explicit nil -func (o *SAMLProvider) SetSpBindingNil() { - o.SpBinding.Set(nil) -} - -// UnsetSpBinding ensures that no value is present for SpBinding, not even an explicit nil -func (o *SAMLProvider) UnsetSpBinding() { - o.SpBinding.Unset() + o.SpBinding = &v } // GetUrlDownloadMetadata returns the UrlDownloadMetadata field value @@ -960,65 +951,53 @@ func (o *SAMLProvider) SetUrlSloRedirect(v string) { } func (o SAMLProvider) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } + return json.Marshal(toSerialize) +} + +func (o SAMLProvider) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name if o.AuthenticationFlow.IsSet() { toSerialize["authentication_flow"] = o.AuthenticationFlow.Get() } - if true { - toSerialize["authorization_flow"] = o.AuthorizationFlow - } - if o.PropertyMappings != nil { + toSerialize["authorization_flow"] = o.AuthorizationFlow + if !IsNil(o.PropertyMappings) { toSerialize["property_mappings"] = o.PropertyMappings } - if true { - toSerialize["component"] = o.Component - } - if true { - toSerialize["assigned_application_slug"] = o.AssignedApplicationSlug - } - if true { - toSerialize["assigned_application_name"] = o.AssignedApplicationName - } - if true { - toSerialize["verbose_name"] = o.VerboseName - } - if true { - toSerialize["verbose_name_plural"] = o.VerboseNamePlural - } - if true { - toSerialize["meta_model_name"] = o.MetaModelName - } - if true { - toSerialize["acs_url"] = o.AcsUrl - } - if o.Audience != nil { + // skip: component is readOnly + // skip: assigned_application_slug is readOnly + // skip: assigned_application_name is readOnly + // skip: verbose_name is readOnly + // skip: verbose_name_plural is readOnly + // skip: meta_model_name is readOnly + toSerialize["acs_url"] = o.AcsUrl + if !IsNil(o.Audience) { toSerialize["audience"] = o.Audience } - if o.Issuer != nil { + if !IsNil(o.Issuer) { toSerialize["issuer"] = o.Issuer } - if o.AssertionValidNotBefore != nil { + if !IsNil(o.AssertionValidNotBefore) { toSerialize["assertion_valid_not_before"] = o.AssertionValidNotBefore } - if o.AssertionValidNotOnOrAfter != nil { + if !IsNil(o.AssertionValidNotOnOrAfter) { toSerialize["assertion_valid_not_on_or_after"] = o.AssertionValidNotOnOrAfter } - if o.SessionValidNotOnOrAfter != nil { + if !IsNil(o.SessionValidNotOnOrAfter) { toSerialize["session_valid_not_on_or_after"] = o.SessionValidNotOnOrAfter } if o.NameIdMapping.IsSet() { toSerialize["name_id_mapping"] = o.NameIdMapping.Get() } - if o.DigestAlgorithm != nil { + if !IsNil(o.DigestAlgorithm) { toSerialize["digest_algorithm"] = o.DigestAlgorithm } - if o.SignatureAlgorithm != nil { + if !IsNil(o.SignatureAlgorithm) { toSerialize["signature_algorithm"] = o.SignatureAlgorithm } if o.SigningKp.IsSet() { @@ -1027,28 +1006,16 @@ func (o SAMLProvider) MarshalJSON() ([]byte, error) { if o.VerificationKp.IsSet() { toSerialize["verification_kp"] = o.VerificationKp.Get() } - if o.SpBinding.IsSet() { - toSerialize["sp_binding"] = o.SpBinding.Get() + if !IsNil(o.SpBinding) { + toSerialize["sp_binding"] = o.SpBinding } - if true { - toSerialize["url_download_metadata"] = o.UrlDownloadMetadata - } - if true { - toSerialize["url_sso_post"] = o.UrlSsoPost - } - if true { - toSerialize["url_sso_redirect"] = o.UrlSsoRedirect - } - if true { - toSerialize["url_sso_init"] = o.UrlSsoInit - } - if true { - toSerialize["url_slo_post"] = o.UrlSloPost - } - if true { - toSerialize["url_slo_redirect"] = o.UrlSloRedirect - } - return json.Marshal(toSerialize) + // skip: url_download_metadata is readOnly + // skip: url_sso_post is readOnly + // skip: url_sso_redirect is readOnly + // skip: url_sso_init is readOnly + // skip: url_slo_post is readOnly + // skip: url_slo_redirect is readOnly + return toSerialize, nil } type NullableSAMLProvider struct { diff --git a/model_saml_provider_request.go b/model_saml_provider_request.go index a4d5ab218..521d72526 100644 --- a/model_saml_provider_request.go +++ b/model_saml_provider_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the SAMLProviderRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SAMLProviderRequest{} + // SAMLProviderRequest SAMLProvider Serializer type SAMLProviderRequest struct { Name string `json:"name"` @@ -42,8 +45,7 @@ type SAMLProviderRequest struct { SigningKp NullableString `json:"signing_kp,omitempty"` // When selected, incoming assertion's Signatures will be validated against this certificate. To allow unsigned Requests, leave on default. VerificationKp NullableString `json:"verification_kp,omitempty"` - // This determines how authentik sends the response back to the Service Provider. * `redirect` - Redirect * `post` - Post - SpBinding NullableSpBindingEnum `json:"sp_binding,omitempty"` + SpBinding *SpBindingEnum `json:"sp_binding,omitempty"` } // NewSAMLProviderRequest instantiates a new SAMLProviderRequest object @@ -92,7 +94,7 @@ func (o *SAMLProviderRequest) SetName(v string) { // GetAuthenticationFlow returns the AuthenticationFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *SAMLProviderRequest) GetAuthenticationFlow() string { - if o == nil || o.AuthenticationFlow.Get() == nil { + if o == nil || IsNil(o.AuthenticationFlow.Get()) { var ret string return ret } @@ -159,7 +161,7 @@ func (o *SAMLProviderRequest) SetAuthorizationFlow(v string) { // GetPropertyMappings returns the PropertyMappings field value if set, zero value otherwise. func (o *SAMLProviderRequest) GetPropertyMappings() []string { - if o == nil || o.PropertyMappings == nil { + if o == nil || IsNil(o.PropertyMappings) { var ret []string return ret } @@ -169,7 +171,7 @@ func (o *SAMLProviderRequest) GetPropertyMappings() []string { // GetPropertyMappingsOk returns a tuple with the PropertyMappings field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SAMLProviderRequest) GetPropertyMappingsOk() ([]string, bool) { - if o == nil || o.PropertyMappings == nil { + if o == nil || IsNil(o.PropertyMappings) { return nil, false } return o.PropertyMappings, true @@ -177,7 +179,7 @@ func (o *SAMLProviderRequest) GetPropertyMappingsOk() ([]string, bool) { // HasPropertyMappings returns a boolean if a field has been set. func (o *SAMLProviderRequest) HasPropertyMappings() bool { - if o != nil && o.PropertyMappings != nil { + if o != nil && !IsNil(o.PropertyMappings) { return true } @@ -215,7 +217,7 @@ func (o *SAMLProviderRequest) SetAcsUrl(v string) { // GetAudience returns the Audience field value if set, zero value otherwise. func (o *SAMLProviderRequest) GetAudience() string { - if o == nil || o.Audience == nil { + if o == nil || IsNil(o.Audience) { var ret string return ret } @@ -225,7 +227,7 @@ func (o *SAMLProviderRequest) GetAudience() string { // GetAudienceOk returns a tuple with the Audience field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SAMLProviderRequest) GetAudienceOk() (*string, bool) { - if o == nil || o.Audience == nil { + if o == nil || IsNil(o.Audience) { return nil, false } return o.Audience, true @@ -233,7 +235,7 @@ func (o *SAMLProviderRequest) GetAudienceOk() (*string, bool) { // HasAudience returns a boolean if a field has been set. func (o *SAMLProviderRequest) HasAudience() bool { - if o != nil && o.Audience != nil { + if o != nil && !IsNil(o.Audience) { return true } @@ -247,7 +249,7 @@ func (o *SAMLProviderRequest) SetAudience(v string) { // GetIssuer returns the Issuer field value if set, zero value otherwise. func (o *SAMLProviderRequest) GetIssuer() string { - if o == nil || o.Issuer == nil { + if o == nil || IsNil(o.Issuer) { var ret string return ret } @@ -257,7 +259,7 @@ func (o *SAMLProviderRequest) GetIssuer() string { // GetIssuerOk returns a tuple with the Issuer field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SAMLProviderRequest) GetIssuerOk() (*string, bool) { - if o == nil || o.Issuer == nil { + if o == nil || IsNil(o.Issuer) { return nil, false } return o.Issuer, true @@ -265,7 +267,7 @@ func (o *SAMLProviderRequest) GetIssuerOk() (*string, bool) { // HasIssuer returns a boolean if a field has been set. func (o *SAMLProviderRequest) HasIssuer() bool { - if o != nil && o.Issuer != nil { + if o != nil && !IsNil(o.Issuer) { return true } @@ -279,7 +281,7 @@ func (o *SAMLProviderRequest) SetIssuer(v string) { // GetAssertionValidNotBefore returns the AssertionValidNotBefore field value if set, zero value otherwise. func (o *SAMLProviderRequest) GetAssertionValidNotBefore() string { - if o == nil || o.AssertionValidNotBefore == nil { + if o == nil || IsNil(o.AssertionValidNotBefore) { var ret string return ret } @@ -289,7 +291,7 @@ func (o *SAMLProviderRequest) GetAssertionValidNotBefore() string { // GetAssertionValidNotBeforeOk returns a tuple with the AssertionValidNotBefore field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SAMLProviderRequest) GetAssertionValidNotBeforeOk() (*string, bool) { - if o == nil || o.AssertionValidNotBefore == nil { + if o == nil || IsNil(o.AssertionValidNotBefore) { return nil, false } return o.AssertionValidNotBefore, true @@ -297,7 +299,7 @@ func (o *SAMLProviderRequest) GetAssertionValidNotBeforeOk() (*string, bool) { // HasAssertionValidNotBefore returns a boolean if a field has been set. func (o *SAMLProviderRequest) HasAssertionValidNotBefore() bool { - if o != nil && o.AssertionValidNotBefore != nil { + if o != nil && !IsNil(o.AssertionValidNotBefore) { return true } @@ -311,7 +313,7 @@ func (o *SAMLProviderRequest) SetAssertionValidNotBefore(v string) { // GetAssertionValidNotOnOrAfter returns the AssertionValidNotOnOrAfter field value if set, zero value otherwise. func (o *SAMLProviderRequest) GetAssertionValidNotOnOrAfter() string { - if o == nil || o.AssertionValidNotOnOrAfter == nil { + if o == nil || IsNil(o.AssertionValidNotOnOrAfter) { var ret string return ret } @@ -321,7 +323,7 @@ func (o *SAMLProviderRequest) GetAssertionValidNotOnOrAfter() string { // GetAssertionValidNotOnOrAfterOk returns a tuple with the AssertionValidNotOnOrAfter field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SAMLProviderRequest) GetAssertionValidNotOnOrAfterOk() (*string, bool) { - if o == nil || o.AssertionValidNotOnOrAfter == nil { + if o == nil || IsNil(o.AssertionValidNotOnOrAfter) { return nil, false } return o.AssertionValidNotOnOrAfter, true @@ -329,7 +331,7 @@ func (o *SAMLProviderRequest) GetAssertionValidNotOnOrAfterOk() (*string, bool) // HasAssertionValidNotOnOrAfter returns a boolean if a field has been set. func (o *SAMLProviderRequest) HasAssertionValidNotOnOrAfter() bool { - if o != nil && o.AssertionValidNotOnOrAfter != nil { + if o != nil && !IsNil(o.AssertionValidNotOnOrAfter) { return true } @@ -343,7 +345,7 @@ func (o *SAMLProviderRequest) SetAssertionValidNotOnOrAfter(v string) { // GetSessionValidNotOnOrAfter returns the SessionValidNotOnOrAfter field value if set, zero value otherwise. func (o *SAMLProviderRequest) GetSessionValidNotOnOrAfter() string { - if o == nil || o.SessionValidNotOnOrAfter == nil { + if o == nil || IsNil(o.SessionValidNotOnOrAfter) { var ret string return ret } @@ -353,7 +355,7 @@ func (o *SAMLProviderRequest) GetSessionValidNotOnOrAfter() string { // GetSessionValidNotOnOrAfterOk returns a tuple with the SessionValidNotOnOrAfter field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SAMLProviderRequest) GetSessionValidNotOnOrAfterOk() (*string, bool) { - if o == nil || o.SessionValidNotOnOrAfter == nil { + if o == nil || IsNil(o.SessionValidNotOnOrAfter) { return nil, false } return o.SessionValidNotOnOrAfter, true @@ -361,7 +363,7 @@ func (o *SAMLProviderRequest) GetSessionValidNotOnOrAfterOk() (*string, bool) { // HasSessionValidNotOnOrAfter returns a boolean if a field has been set. func (o *SAMLProviderRequest) HasSessionValidNotOnOrAfter() bool { - if o != nil && o.SessionValidNotOnOrAfter != nil { + if o != nil && !IsNil(o.SessionValidNotOnOrAfter) { return true } @@ -375,7 +377,7 @@ func (o *SAMLProviderRequest) SetSessionValidNotOnOrAfter(v string) { // GetNameIdMapping returns the NameIdMapping field value if set, zero value otherwise (both if not set or set to explicit null). func (o *SAMLProviderRequest) GetNameIdMapping() string { - if o == nil || o.NameIdMapping.Get() == nil { + if o == nil || IsNil(o.NameIdMapping.Get()) { var ret string return ret } @@ -418,7 +420,7 @@ func (o *SAMLProviderRequest) UnsetNameIdMapping() { // GetDigestAlgorithm returns the DigestAlgorithm field value if set, zero value otherwise. func (o *SAMLProviderRequest) GetDigestAlgorithm() DigestAlgorithmEnum { - if o == nil || o.DigestAlgorithm == nil { + if o == nil || IsNil(o.DigestAlgorithm) { var ret DigestAlgorithmEnum return ret } @@ -428,7 +430,7 @@ func (o *SAMLProviderRequest) GetDigestAlgorithm() DigestAlgorithmEnum { // GetDigestAlgorithmOk returns a tuple with the DigestAlgorithm field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SAMLProviderRequest) GetDigestAlgorithmOk() (*DigestAlgorithmEnum, bool) { - if o == nil || o.DigestAlgorithm == nil { + if o == nil || IsNil(o.DigestAlgorithm) { return nil, false } return o.DigestAlgorithm, true @@ -436,7 +438,7 @@ func (o *SAMLProviderRequest) GetDigestAlgorithmOk() (*DigestAlgorithmEnum, bool // HasDigestAlgorithm returns a boolean if a field has been set. func (o *SAMLProviderRequest) HasDigestAlgorithm() bool { - if o != nil && o.DigestAlgorithm != nil { + if o != nil && !IsNil(o.DigestAlgorithm) { return true } @@ -450,7 +452,7 @@ func (o *SAMLProviderRequest) SetDigestAlgorithm(v DigestAlgorithmEnum) { // GetSignatureAlgorithm returns the SignatureAlgorithm field value if set, zero value otherwise. func (o *SAMLProviderRequest) GetSignatureAlgorithm() SignatureAlgorithmEnum { - if o == nil || o.SignatureAlgorithm == nil { + if o == nil || IsNil(o.SignatureAlgorithm) { var ret SignatureAlgorithmEnum return ret } @@ -460,7 +462,7 @@ func (o *SAMLProviderRequest) GetSignatureAlgorithm() SignatureAlgorithmEnum { // GetSignatureAlgorithmOk returns a tuple with the SignatureAlgorithm field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SAMLProviderRequest) GetSignatureAlgorithmOk() (*SignatureAlgorithmEnum, bool) { - if o == nil || o.SignatureAlgorithm == nil { + if o == nil || IsNil(o.SignatureAlgorithm) { return nil, false } return o.SignatureAlgorithm, true @@ -468,7 +470,7 @@ func (o *SAMLProviderRequest) GetSignatureAlgorithmOk() (*SignatureAlgorithmEnum // HasSignatureAlgorithm returns a boolean if a field has been set. func (o *SAMLProviderRequest) HasSignatureAlgorithm() bool { - if o != nil && o.SignatureAlgorithm != nil { + if o != nil && !IsNil(o.SignatureAlgorithm) { return true } @@ -482,7 +484,7 @@ func (o *SAMLProviderRequest) SetSignatureAlgorithm(v SignatureAlgorithmEnum) { // GetSigningKp returns the SigningKp field value if set, zero value otherwise (both if not set or set to explicit null). func (o *SAMLProviderRequest) GetSigningKp() string { - if o == nil || o.SigningKp.Get() == nil { + if o == nil || IsNil(o.SigningKp.Get()) { var ret string return ret } @@ -525,7 +527,7 @@ func (o *SAMLProviderRequest) UnsetSigningKp() { // GetVerificationKp returns the VerificationKp field value if set, zero value otherwise (both if not set or set to explicit null). func (o *SAMLProviderRequest) GetVerificationKp() string { - if o == nil || o.VerificationKp.Get() == nil { + if o == nil || IsNil(o.VerificationKp.Get()) { var ret string return ret } @@ -566,88 +568,79 @@ func (o *SAMLProviderRequest) UnsetVerificationKp() { o.VerificationKp.Unset() } -// GetSpBinding returns the SpBinding field value if set, zero value otherwise (both if not set or set to explicit null). +// GetSpBinding returns the SpBinding field value if set, zero value otherwise. func (o *SAMLProviderRequest) GetSpBinding() SpBindingEnum { - if o == nil || o.SpBinding.Get() == nil { + if o == nil || IsNil(o.SpBinding) { var ret SpBindingEnum return ret } - return *o.SpBinding.Get() + return *o.SpBinding } // GetSpBindingOk returns a tuple with the SpBinding field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *SAMLProviderRequest) GetSpBindingOk() (*SpBindingEnum, bool) { - if o == nil { + if o == nil || IsNil(o.SpBinding) { return nil, false } - return o.SpBinding.Get(), o.SpBinding.IsSet() + return o.SpBinding, true } // HasSpBinding returns a boolean if a field has been set. func (o *SAMLProviderRequest) HasSpBinding() bool { - if o != nil && o.SpBinding.IsSet() { + if o != nil && !IsNil(o.SpBinding) { return true } return false } -// SetSpBinding gets a reference to the given NullableSpBindingEnum and assigns it to the SpBinding field. +// SetSpBinding gets a reference to the given SpBindingEnum and assigns it to the SpBinding field. func (o *SAMLProviderRequest) SetSpBinding(v SpBindingEnum) { - o.SpBinding.Set(&v) + o.SpBinding = &v } -// SetSpBindingNil sets the value for SpBinding to be an explicit nil -func (o *SAMLProviderRequest) SetSpBindingNil() { - o.SpBinding.Set(nil) -} - -// UnsetSpBinding ensures that no value is present for SpBinding, not even an explicit nil -func (o *SAMLProviderRequest) UnsetSpBinding() { - o.SpBinding.Unset() +func (o SAMLProviderRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) } -func (o SAMLProviderRequest) MarshalJSON() ([]byte, error) { +func (o SAMLProviderRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name - } + toSerialize["name"] = o.Name if o.AuthenticationFlow.IsSet() { toSerialize["authentication_flow"] = o.AuthenticationFlow.Get() } - if true { - toSerialize["authorization_flow"] = o.AuthorizationFlow - } - if o.PropertyMappings != nil { + toSerialize["authorization_flow"] = o.AuthorizationFlow + if !IsNil(o.PropertyMappings) { toSerialize["property_mappings"] = o.PropertyMappings } - if true { - toSerialize["acs_url"] = o.AcsUrl - } - if o.Audience != nil { + toSerialize["acs_url"] = o.AcsUrl + if !IsNil(o.Audience) { toSerialize["audience"] = o.Audience } - if o.Issuer != nil { + if !IsNil(o.Issuer) { toSerialize["issuer"] = o.Issuer } - if o.AssertionValidNotBefore != nil { + if !IsNil(o.AssertionValidNotBefore) { toSerialize["assertion_valid_not_before"] = o.AssertionValidNotBefore } - if o.AssertionValidNotOnOrAfter != nil { + if !IsNil(o.AssertionValidNotOnOrAfter) { toSerialize["assertion_valid_not_on_or_after"] = o.AssertionValidNotOnOrAfter } - if o.SessionValidNotOnOrAfter != nil { + if !IsNil(o.SessionValidNotOnOrAfter) { toSerialize["session_valid_not_on_or_after"] = o.SessionValidNotOnOrAfter } if o.NameIdMapping.IsSet() { toSerialize["name_id_mapping"] = o.NameIdMapping.Get() } - if o.DigestAlgorithm != nil { + if !IsNil(o.DigestAlgorithm) { toSerialize["digest_algorithm"] = o.DigestAlgorithm } - if o.SignatureAlgorithm != nil { + if !IsNil(o.SignatureAlgorithm) { toSerialize["signature_algorithm"] = o.SignatureAlgorithm } if o.SigningKp.IsSet() { @@ -656,10 +649,10 @@ func (o SAMLProviderRequest) MarshalJSON() ([]byte, error) { if o.VerificationKp.IsSet() { toSerialize["verification_kp"] = o.VerificationKp.Get() } - if o.SpBinding.IsSet() { - toSerialize["sp_binding"] = o.SpBinding.Get() + if !IsNil(o.SpBinding) { + toSerialize["sp_binding"] = o.SpBinding } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableSAMLProviderRequest struct { diff --git a/model_saml_source.go b/model_saml_source.go index db2b52914..7d7ef093c 100644 --- a/model_saml_source.go +++ b/model_saml_source.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the SAMLSource type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SAMLSource{} + // SAMLSource SAMLSource Serializer type SAMLSource struct { Pk string `json:"pk"` @@ -34,10 +37,9 @@ type SAMLSource struct { // Return object's plural verbose_name VerboseNamePlural string `json:"verbose_name_plural"` // Return internal model name - MetaModelName string `json:"meta_model_name"` - PolicyEngineMode *PolicyEngineMode `json:"policy_engine_mode,omitempty"` - // How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. - UserMatchingMode NullableUserMatchingModeEnum `json:"user_matching_mode,omitempty"` + MetaModelName string `json:"meta_model_name"` + PolicyEngineMode *PolicyEngineMode `json:"policy_engine_mode,omitempty"` + UserMatchingMode *UserMatchingModeEnum `json:"user_matching_mode,omitempty"` // Objects which are managed by authentik. These objects are created and updated automatically. This is flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. Managed NullableString `json:"managed"` UserPathTemplate *string `json:"user_path_template,omitempty"` @@ -52,10 +54,9 @@ type SAMLSource struct { // Optional URL if your IDP supports Single-Logout. SloUrl NullableString `json:"slo_url,omitempty"` // Allows authentication flows initiated by the IdP. This can be a security risk, as no validation of the request ID is done. - AllowIdpInitiated *bool `json:"allow_idp_initiated,omitempty"` - // NameID Policy sent to the IdP. Can be unset, in which case no Policy is sent. * `urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress` - Email * `urn:oasis:names:tc:SAML:2.0:nameid-format:persistent` - Persistent * `urn:oasis:names:tc:SAML:2.0:nameid-format:X509SubjectName` - X509 * `urn:oasis:names:tc:SAML:2.0:nameid-format:WindowsDomainQualifiedName` - Windows * `urn:oasis:names:tc:SAML:2.0:nameid-format:transient` - Transient - NameIdPolicy NullableNameIdPolicyEnum `json:"name_id_policy,omitempty"` - BindingType *BindingTypeEnum `json:"binding_type,omitempty"` + AllowIdpInitiated *bool `json:"allow_idp_initiated,omitempty"` + NameIdPolicy *NameIdPolicyEnum `json:"name_id_policy,omitempty"` + BindingType *BindingTypeEnum `json:"binding_type,omitempty"` // Keypair which is used to sign outgoing requests. Leave empty to disable signing. SigningKp NullableString `json:"signing_kp,omitempty"` DigestAlgorithm *DigestAlgorithmEnum `json:"digest_algorithm,omitempty"` @@ -166,7 +167,7 @@ func (o *SAMLSource) SetSlug(v string) { // GetEnabled returns the Enabled field value if set, zero value otherwise. func (o *SAMLSource) GetEnabled() bool { - if o == nil || o.Enabled == nil { + if o == nil || IsNil(o.Enabled) { var ret bool return ret } @@ -176,7 +177,7 @@ func (o *SAMLSource) GetEnabled() bool { // GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SAMLSource) GetEnabledOk() (*bool, bool) { - if o == nil || o.Enabled == nil { + if o == nil || IsNil(o.Enabled) { return nil, false } return o.Enabled, true @@ -184,7 +185,7 @@ func (o *SAMLSource) GetEnabledOk() (*bool, bool) { // HasEnabled returns a boolean if a field has been set. func (o *SAMLSource) HasEnabled() bool { - if o != nil && o.Enabled != nil { + if o != nil && !IsNil(o.Enabled) { return true } @@ -198,7 +199,7 @@ func (o *SAMLSource) SetEnabled(v bool) { // GetAuthenticationFlow returns the AuthenticationFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *SAMLSource) GetAuthenticationFlow() string { - if o == nil || o.AuthenticationFlow.Get() == nil { + if o == nil || IsNil(o.AuthenticationFlow.Get()) { var ret string return ret } @@ -241,7 +242,7 @@ func (o *SAMLSource) UnsetAuthenticationFlow() { // GetEnrollmentFlow returns the EnrollmentFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *SAMLSource) GetEnrollmentFlow() string { - if o == nil || o.EnrollmentFlow.Get() == nil { + if o == nil || IsNil(o.EnrollmentFlow.Get()) { var ret string return ret } @@ -380,7 +381,7 @@ func (o *SAMLSource) SetMetaModelName(v string) { // GetPolicyEngineMode returns the PolicyEngineMode field value if set, zero value otherwise. func (o *SAMLSource) GetPolicyEngineMode() PolicyEngineMode { - if o == nil || o.PolicyEngineMode == nil { + if o == nil || IsNil(o.PolicyEngineMode) { var ret PolicyEngineMode return ret } @@ -390,7 +391,7 @@ func (o *SAMLSource) GetPolicyEngineMode() PolicyEngineMode { // GetPolicyEngineModeOk returns a tuple with the PolicyEngineMode field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SAMLSource) GetPolicyEngineModeOk() (*PolicyEngineMode, bool) { - if o == nil || o.PolicyEngineMode == nil { + if o == nil || IsNil(o.PolicyEngineMode) { return nil, false } return o.PolicyEngineMode, true @@ -398,7 +399,7 @@ func (o *SAMLSource) GetPolicyEngineModeOk() (*PolicyEngineMode, bool) { // HasPolicyEngineMode returns a boolean if a field has been set. func (o *SAMLSource) HasPolicyEngineMode() bool { - if o != nil && o.PolicyEngineMode != nil { + if o != nil && !IsNil(o.PolicyEngineMode) { return true } @@ -410,47 +411,36 @@ func (o *SAMLSource) SetPolicyEngineMode(v PolicyEngineMode) { o.PolicyEngineMode = &v } -// GetUserMatchingMode returns the UserMatchingMode field value if set, zero value otherwise (both if not set or set to explicit null). +// GetUserMatchingMode returns the UserMatchingMode field value if set, zero value otherwise. func (o *SAMLSource) GetUserMatchingMode() UserMatchingModeEnum { - if o == nil || o.UserMatchingMode.Get() == nil { + if o == nil || IsNil(o.UserMatchingMode) { var ret UserMatchingModeEnum return ret } - return *o.UserMatchingMode.Get() + return *o.UserMatchingMode } // GetUserMatchingModeOk returns a tuple with the UserMatchingMode field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *SAMLSource) GetUserMatchingModeOk() (*UserMatchingModeEnum, bool) { - if o == nil { + if o == nil || IsNil(o.UserMatchingMode) { return nil, false } - return o.UserMatchingMode.Get(), o.UserMatchingMode.IsSet() + return o.UserMatchingMode, true } // HasUserMatchingMode returns a boolean if a field has been set. func (o *SAMLSource) HasUserMatchingMode() bool { - if o != nil && o.UserMatchingMode.IsSet() { + if o != nil && !IsNil(o.UserMatchingMode) { return true } return false } -// SetUserMatchingMode gets a reference to the given NullableUserMatchingModeEnum and assigns it to the UserMatchingMode field. +// SetUserMatchingMode gets a reference to the given UserMatchingModeEnum and assigns it to the UserMatchingMode field. func (o *SAMLSource) SetUserMatchingMode(v UserMatchingModeEnum) { - o.UserMatchingMode.Set(&v) -} - -// SetUserMatchingModeNil sets the value for UserMatchingMode to be an explicit nil -func (o *SAMLSource) SetUserMatchingModeNil() { - o.UserMatchingMode.Set(nil) -} - -// UnsetUserMatchingMode ensures that no value is present for UserMatchingMode, not even an explicit nil -func (o *SAMLSource) UnsetUserMatchingMode() { - o.UserMatchingMode.Unset() + o.UserMatchingMode = &v } // GetManaged returns the Managed field value @@ -481,7 +471,7 @@ func (o *SAMLSource) SetManaged(v string) { // GetUserPathTemplate returns the UserPathTemplate field value if set, zero value otherwise. func (o *SAMLSource) GetUserPathTemplate() string { - if o == nil || o.UserPathTemplate == nil { + if o == nil || IsNil(o.UserPathTemplate) { var ret string return ret } @@ -491,7 +481,7 @@ func (o *SAMLSource) GetUserPathTemplate() string { // GetUserPathTemplateOk returns a tuple with the UserPathTemplate field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SAMLSource) GetUserPathTemplateOk() (*string, bool) { - if o == nil || o.UserPathTemplate == nil { + if o == nil || IsNil(o.UserPathTemplate) { return nil, false } return o.UserPathTemplate, true @@ -499,7 +489,7 @@ func (o *SAMLSource) GetUserPathTemplateOk() (*string, bool) { // HasUserPathTemplate returns a boolean if a field has been set. func (o *SAMLSource) HasUserPathTemplate() bool { - if o != nil && o.UserPathTemplate != nil { + if o != nil && !IsNil(o.UserPathTemplate) { return true } @@ -563,7 +553,7 @@ func (o *SAMLSource) SetPreAuthenticationFlow(v string) { // GetIssuer returns the Issuer field value if set, zero value otherwise. func (o *SAMLSource) GetIssuer() string { - if o == nil || o.Issuer == nil { + if o == nil || IsNil(o.Issuer) { var ret string return ret } @@ -573,7 +563,7 @@ func (o *SAMLSource) GetIssuer() string { // GetIssuerOk returns a tuple with the Issuer field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SAMLSource) GetIssuerOk() (*string, bool) { - if o == nil || o.Issuer == nil { + if o == nil || IsNil(o.Issuer) { return nil, false } return o.Issuer, true @@ -581,7 +571,7 @@ func (o *SAMLSource) GetIssuerOk() (*string, bool) { // HasIssuer returns a boolean if a field has been set. func (o *SAMLSource) HasIssuer() bool { - if o != nil && o.Issuer != nil { + if o != nil && !IsNil(o.Issuer) { return true } @@ -619,7 +609,7 @@ func (o *SAMLSource) SetSsoUrl(v string) { // GetSloUrl returns the SloUrl field value if set, zero value otherwise (both if not set or set to explicit null). func (o *SAMLSource) GetSloUrl() string { - if o == nil || o.SloUrl.Get() == nil { + if o == nil || IsNil(o.SloUrl.Get()) { var ret string return ret } @@ -662,7 +652,7 @@ func (o *SAMLSource) UnsetSloUrl() { // GetAllowIdpInitiated returns the AllowIdpInitiated field value if set, zero value otherwise. func (o *SAMLSource) GetAllowIdpInitiated() bool { - if o == nil || o.AllowIdpInitiated == nil { + if o == nil || IsNil(o.AllowIdpInitiated) { var ret bool return ret } @@ -672,7 +662,7 @@ func (o *SAMLSource) GetAllowIdpInitiated() bool { // GetAllowIdpInitiatedOk returns a tuple with the AllowIdpInitiated field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SAMLSource) GetAllowIdpInitiatedOk() (*bool, bool) { - if o == nil || o.AllowIdpInitiated == nil { + if o == nil || IsNil(o.AllowIdpInitiated) { return nil, false } return o.AllowIdpInitiated, true @@ -680,7 +670,7 @@ func (o *SAMLSource) GetAllowIdpInitiatedOk() (*bool, bool) { // HasAllowIdpInitiated returns a boolean if a field has been set. func (o *SAMLSource) HasAllowIdpInitiated() bool { - if o != nil && o.AllowIdpInitiated != nil { + if o != nil && !IsNil(o.AllowIdpInitiated) { return true } @@ -692,52 +682,41 @@ func (o *SAMLSource) SetAllowIdpInitiated(v bool) { o.AllowIdpInitiated = &v } -// GetNameIdPolicy returns the NameIdPolicy field value if set, zero value otherwise (both if not set or set to explicit null). +// GetNameIdPolicy returns the NameIdPolicy field value if set, zero value otherwise. func (o *SAMLSource) GetNameIdPolicy() NameIdPolicyEnum { - if o == nil || o.NameIdPolicy.Get() == nil { + if o == nil || IsNil(o.NameIdPolicy) { var ret NameIdPolicyEnum return ret } - return *o.NameIdPolicy.Get() + return *o.NameIdPolicy } // GetNameIdPolicyOk returns a tuple with the NameIdPolicy field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *SAMLSource) GetNameIdPolicyOk() (*NameIdPolicyEnum, bool) { - if o == nil { + if o == nil || IsNil(o.NameIdPolicy) { return nil, false } - return o.NameIdPolicy.Get(), o.NameIdPolicy.IsSet() + return o.NameIdPolicy, true } // HasNameIdPolicy returns a boolean if a field has been set. func (o *SAMLSource) HasNameIdPolicy() bool { - if o != nil && o.NameIdPolicy.IsSet() { + if o != nil && !IsNil(o.NameIdPolicy) { return true } return false } -// SetNameIdPolicy gets a reference to the given NullableNameIdPolicyEnum and assigns it to the NameIdPolicy field. +// SetNameIdPolicy gets a reference to the given NameIdPolicyEnum and assigns it to the NameIdPolicy field. func (o *SAMLSource) SetNameIdPolicy(v NameIdPolicyEnum) { - o.NameIdPolicy.Set(&v) -} - -// SetNameIdPolicyNil sets the value for NameIdPolicy to be an explicit nil -func (o *SAMLSource) SetNameIdPolicyNil() { - o.NameIdPolicy.Set(nil) -} - -// UnsetNameIdPolicy ensures that no value is present for NameIdPolicy, not even an explicit nil -func (o *SAMLSource) UnsetNameIdPolicy() { - o.NameIdPolicy.Unset() + o.NameIdPolicy = &v } // GetBindingType returns the BindingType field value if set, zero value otherwise. func (o *SAMLSource) GetBindingType() BindingTypeEnum { - if o == nil || o.BindingType == nil { + if o == nil || IsNil(o.BindingType) { var ret BindingTypeEnum return ret } @@ -747,7 +726,7 @@ func (o *SAMLSource) GetBindingType() BindingTypeEnum { // GetBindingTypeOk returns a tuple with the BindingType field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SAMLSource) GetBindingTypeOk() (*BindingTypeEnum, bool) { - if o == nil || o.BindingType == nil { + if o == nil || IsNil(o.BindingType) { return nil, false } return o.BindingType, true @@ -755,7 +734,7 @@ func (o *SAMLSource) GetBindingTypeOk() (*BindingTypeEnum, bool) { // HasBindingType returns a boolean if a field has been set. func (o *SAMLSource) HasBindingType() bool { - if o != nil && o.BindingType != nil { + if o != nil && !IsNil(o.BindingType) { return true } @@ -769,7 +748,7 @@ func (o *SAMLSource) SetBindingType(v BindingTypeEnum) { // GetSigningKp returns the SigningKp field value if set, zero value otherwise (both if not set or set to explicit null). func (o *SAMLSource) GetSigningKp() string { - if o == nil || o.SigningKp.Get() == nil { + if o == nil || IsNil(o.SigningKp.Get()) { var ret string return ret } @@ -812,7 +791,7 @@ func (o *SAMLSource) UnsetSigningKp() { // GetDigestAlgorithm returns the DigestAlgorithm field value if set, zero value otherwise. func (o *SAMLSource) GetDigestAlgorithm() DigestAlgorithmEnum { - if o == nil || o.DigestAlgorithm == nil { + if o == nil || IsNil(o.DigestAlgorithm) { var ret DigestAlgorithmEnum return ret } @@ -822,7 +801,7 @@ func (o *SAMLSource) GetDigestAlgorithm() DigestAlgorithmEnum { // GetDigestAlgorithmOk returns a tuple with the DigestAlgorithm field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SAMLSource) GetDigestAlgorithmOk() (*DigestAlgorithmEnum, bool) { - if o == nil || o.DigestAlgorithm == nil { + if o == nil || IsNil(o.DigestAlgorithm) { return nil, false } return o.DigestAlgorithm, true @@ -830,7 +809,7 @@ func (o *SAMLSource) GetDigestAlgorithmOk() (*DigestAlgorithmEnum, bool) { // HasDigestAlgorithm returns a boolean if a field has been set. func (o *SAMLSource) HasDigestAlgorithm() bool { - if o != nil && o.DigestAlgorithm != nil { + if o != nil && !IsNil(o.DigestAlgorithm) { return true } @@ -844,7 +823,7 @@ func (o *SAMLSource) SetDigestAlgorithm(v DigestAlgorithmEnum) { // GetSignatureAlgorithm returns the SignatureAlgorithm field value if set, zero value otherwise. func (o *SAMLSource) GetSignatureAlgorithm() SignatureAlgorithmEnum { - if o == nil || o.SignatureAlgorithm == nil { + if o == nil || IsNil(o.SignatureAlgorithm) { var ret SignatureAlgorithmEnum return ret } @@ -854,7 +833,7 @@ func (o *SAMLSource) GetSignatureAlgorithm() SignatureAlgorithmEnum { // GetSignatureAlgorithmOk returns a tuple with the SignatureAlgorithm field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SAMLSource) GetSignatureAlgorithmOk() (*SignatureAlgorithmEnum, bool) { - if o == nil || o.SignatureAlgorithm == nil { + if o == nil || IsNil(o.SignatureAlgorithm) { return nil, false } return o.SignatureAlgorithm, true @@ -862,7 +841,7 @@ func (o *SAMLSource) GetSignatureAlgorithmOk() (*SignatureAlgorithmEnum, bool) { // HasSignatureAlgorithm returns a boolean if a field has been set. func (o *SAMLSource) HasSignatureAlgorithm() bool { - if o != nil && o.SignatureAlgorithm != nil { + if o != nil && !IsNil(o.SignatureAlgorithm) { return true } @@ -876,7 +855,7 @@ func (o *SAMLSource) SetSignatureAlgorithm(v SignatureAlgorithmEnum) { // GetTemporaryUserDeleteAfter returns the TemporaryUserDeleteAfter field value if set, zero value otherwise. func (o *SAMLSource) GetTemporaryUserDeleteAfter() string { - if o == nil || o.TemporaryUserDeleteAfter == nil { + if o == nil || IsNil(o.TemporaryUserDeleteAfter) { var ret string return ret } @@ -886,7 +865,7 @@ func (o *SAMLSource) GetTemporaryUserDeleteAfter() string { // GetTemporaryUserDeleteAfterOk returns a tuple with the TemporaryUserDeleteAfter field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SAMLSource) GetTemporaryUserDeleteAfterOk() (*string, bool) { - if o == nil || o.TemporaryUserDeleteAfter == nil { + if o == nil || IsNil(o.TemporaryUserDeleteAfter) { return nil, false } return o.TemporaryUserDeleteAfter, true @@ -894,7 +873,7 @@ func (o *SAMLSource) GetTemporaryUserDeleteAfterOk() (*string, bool) { // HasTemporaryUserDeleteAfter returns a boolean if a field has been set. func (o *SAMLSource) HasTemporaryUserDeleteAfter() bool { - if o != nil && o.TemporaryUserDeleteAfter != nil { + if o != nil && !IsNil(o.TemporaryUserDeleteAfter) { return true } @@ -907,17 +886,19 @@ func (o *SAMLSource) SetTemporaryUserDeleteAfter(v string) { } func (o SAMLSource) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if true { - toSerialize["slug"] = o.Slug - } - if o.Enabled != nil { + return json.Marshal(toSerialize) +} + +func (o SAMLSource) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name + toSerialize["slug"] = o.Slug + if !IsNil(o.Enabled) { toSerialize["enabled"] = o.Enabled } if o.AuthenticationFlow.IsSet() { @@ -926,67 +907,51 @@ func (o SAMLSource) MarshalJSON() ([]byte, error) { if o.EnrollmentFlow.IsSet() { toSerialize["enrollment_flow"] = o.EnrollmentFlow.Get() } - if true { - toSerialize["component"] = o.Component - } - if true { - toSerialize["verbose_name"] = o.VerboseName - } - if true { - toSerialize["verbose_name_plural"] = o.VerboseNamePlural - } - if true { - toSerialize["meta_model_name"] = o.MetaModelName - } - if o.PolicyEngineMode != nil { + // skip: component is readOnly + // skip: verbose_name is readOnly + // skip: verbose_name_plural is readOnly + // skip: meta_model_name is readOnly + if !IsNil(o.PolicyEngineMode) { toSerialize["policy_engine_mode"] = o.PolicyEngineMode } - if o.UserMatchingMode.IsSet() { - toSerialize["user_matching_mode"] = o.UserMatchingMode.Get() + if !IsNil(o.UserMatchingMode) { + toSerialize["user_matching_mode"] = o.UserMatchingMode } - if true { - toSerialize["managed"] = o.Managed.Get() - } - if o.UserPathTemplate != nil { + toSerialize["managed"] = o.Managed.Get() + if !IsNil(o.UserPathTemplate) { toSerialize["user_path_template"] = o.UserPathTemplate } - if true { - toSerialize["icon"] = o.Icon.Get() - } - if true { - toSerialize["pre_authentication_flow"] = o.PreAuthenticationFlow - } - if o.Issuer != nil { + toSerialize["icon"] = o.Icon.Get() + toSerialize["pre_authentication_flow"] = o.PreAuthenticationFlow + if !IsNil(o.Issuer) { toSerialize["issuer"] = o.Issuer } - if true { - toSerialize["sso_url"] = o.SsoUrl - } + toSerialize["sso_url"] = o.SsoUrl if o.SloUrl.IsSet() { toSerialize["slo_url"] = o.SloUrl.Get() } - if o.AllowIdpInitiated != nil { + if !IsNil(o.AllowIdpInitiated) { toSerialize["allow_idp_initiated"] = o.AllowIdpInitiated } - if o.NameIdPolicy.IsSet() { - toSerialize["name_id_policy"] = o.NameIdPolicy.Get() + if !IsNil(o.NameIdPolicy) { + toSerialize["name_id_policy"] = o.NameIdPolicy } - if o.BindingType != nil { + if !IsNil(o.BindingType) { toSerialize["binding_type"] = o.BindingType } if o.SigningKp.IsSet() { toSerialize["signing_kp"] = o.SigningKp.Get() } - if o.DigestAlgorithm != nil { + if !IsNil(o.DigestAlgorithm) { toSerialize["digest_algorithm"] = o.DigestAlgorithm } - if o.SignatureAlgorithm != nil { + if !IsNil(o.SignatureAlgorithm) { toSerialize["signature_algorithm"] = o.SignatureAlgorithm } - if o.TemporaryUserDeleteAfter != nil { + if !IsNil(o.TemporaryUserDeleteAfter) { toSerialize["temporary_user_delete_after"] = o.TemporaryUserDeleteAfter } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableSAMLSource struct { diff --git a/model_saml_source_request.go b/model_saml_source_request.go index 6dfaaf70c..dd3028923 100644 --- a/model_saml_source_request.go +++ b/model_saml_source_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the SAMLSourceRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SAMLSourceRequest{} + // SAMLSourceRequest SAMLSource Serializer type SAMLSourceRequest struct { // Source's display Name. @@ -25,11 +28,10 @@ type SAMLSourceRequest struct { // Flow to use when authenticating existing users. AuthenticationFlow NullableString `json:"authentication_flow,omitempty"` // Flow to use when enrolling new users. - EnrollmentFlow NullableString `json:"enrollment_flow,omitempty"` - PolicyEngineMode *PolicyEngineMode `json:"policy_engine_mode,omitempty"` - // How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. - UserMatchingMode NullableUserMatchingModeEnum `json:"user_matching_mode,omitempty"` - UserPathTemplate *string `json:"user_path_template,omitempty"` + EnrollmentFlow NullableString `json:"enrollment_flow,omitempty"` + PolicyEngineMode *PolicyEngineMode `json:"policy_engine_mode,omitempty"` + UserMatchingMode *UserMatchingModeEnum `json:"user_matching_mode,omitempty"` + UserPathTemplate *string `json:"user_path_template,omitempty"` // Flow used before authentication. PreAuthenticationFlow string `json:"pre_authentication_flow"` // Also known as Entity ID. Defaults the Metadata URL. @@ -39,10 +41,9 @@ type SAMLSourceRequest struct { // Optional URL if your IDP supports Single-Logout. SloUrl NullableString `json:"slo_url,omitempty"` // Allows authentication flows initiated by the IdP. This can be a security risk, as no validation of the request ID is done. - AllowIdpInitiated *bool `json:"allow_idp_initiated,omitempty"` - // NameID Policy sent to the IdP. Can be unset, in which case no Policy is sent. * `urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress` - Email * `urn:oasis:names:tc:SAML:2.0:nameid-format:persistent` - Persistent * `urn:oasis:names:tc:SAML:2.0:nameid-format:X509SubjectName` - X509 * `urn:oasis:names:tc:SAML:2.0:nameid-format:WindowsDomainQualifiedName` - Windows * `urn:oasis:names:tc:SAML:2.0:nameid-format:transient` - Transient - NameIdPolicy NullableNameIdPolicyEnum `json:"name_id_policy,omitempty"` - BindingType *BindingTypeEnum `json:"binding_type,omitempty"` + AllowIdpInitiated *bool `json:"allow_idp_initiated,omitempty"` + NameIdPolicy *NameIdPolicyEnum `json:"name_id_policy,omitempty"` + BindingType *BindingTypeEnum `json:"binding_type,omitempty"` // Keypair which is used to sign outgoing requests. Leave empty to disable signing. SigningKp NullableString `json:"signing_kp,omitempty"` DigestAlgorithm *DigestAlgorithmEnum `json:"digest_algorithm,omitempty"` @@ -122,7 +123,7 @@ func (o *SAMLSourceRequest) SetSlug(v string) { // GetEnabled returns the Enabled field value if set, zero value otherwise. func (o *SAMLSourceRequest) GetEnabled() bool { - if o == nil || o.Enabled == nil { + if o == nil || IsNil(o.Enabled) { var ret bool return ret } @@ -132,7 +133,7 @@ func (o *SAMLSourceRequest) GetEnabled() bool { // GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SAMLSourceRequest) GetEnabledOk() (*bool, bool) { - if o == nil || o.Enabled == nil { + if o == nil || IsNil(o.Enabled) { return nil, false } return o.Enabled, true @@ -140,7 +141,7 @@ func (o *SAMLSourceRequest) GetEnabledOk() (*bool, bool) { // HasEnabled returns a boolean if a field has been set. func (o *SAMLSourceRequest) HasEnabled() bool { - if o != nil && o.Enabled != nil { + if o != nil && !IsNil(o.Enabled) { return true } @@ -154,7 +155,7 @@ func (o *SAMLSourceRequest) SetEnabled(v bool) { // GetAuthenticationFlow returns the AuthenticationFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *SAMLSourceRequest) GetAuthenticationFlow() string { - if o == nil || o.AuthenticationFlow.Get() == nil { + if o == nil || IsNil(o.AuthenticationFlow.Get()) { var ret string return ret } @@ -197,7 +198,7 @@ func (o *SAMLSourceRequest) UnsetAuthenticationFlow() { // GetEnrollmentFlow returns the EnrollmentFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *SAMLSourceRequest) GetEnrollmentFlow() string { - if o == nil || o.EnrollmentFlow.Get() == nil { + if o == nil || IsNil(o.EnrollmentFlow.Get()) { var ret string return ret } @@ -240,7 +241,7 @@ func (o *SAMLSourceRequest) UnsetEnrollmentFlow() { // GetPolicyEngineMode returns the PolicyEngineMode field value if set, zero value otherwise. func (o *SAMLSourceRequest) GetPolicyEngineMode() PolicyEngineMode { - if o == nil || o.PolicyEngineMode == nil { + if o == nil || IsNil(o.PolicyEngineMode) { var ret PolicyEngineMode return ret } @@ -250,7 +251,7 @@ func (o *SAMLSourceRequest) GetPolicyEngineMode() PolicyEngineMode { // GetPolicyEngineModeOk returns a tuple with the PolicyEngineMode field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SAMLSourceRequest) GetPolicyEngineModeOk() (*PolicyEngineMode, bool) { - if o == nil || o.PolicyEngineMode == nil { + if o == nil || IsNil(o.PolicyEngineMode) { return nil, false } return o.PolicyEngineMode, true @@ -258,7 +259,7 @@ func (o *SAMLSourceRequest) GetPolicyEngineModeOk() (*PolicyEngineMode, bool) { // HasPolicyEngineMode returns a boolean if a field has been set. func (o *SAMLSourceRequest) HasPolicyEngineMode() bool { - if o != nil && o.PolicyEngineMode != nil { + if o != nil && !IsNil(o.PolicyEngineMode) { return true } @@ -270,52 +271,41 @@ func (o *SAMLSourceRequest) SetPolicyEngineMode(v PolicyEngineMode) { o.PolicyEngineMode = &v } -// GetUserMatchingMode returns the UserMatchingMode field value if set, zero value otherwise (both if not set or set to explicit null). +// GetUserMatchingMode returns the UserMatchingMode field value if set, zero value otherwise. func (o *SAMLSourceRequest) GetUserMatchingMode() UserMatchingModeEnum { - if o == nil || o.UserMatchingMode.Get() == nil { + if o == nil || IsNil(o.UserMatchingMode) { var ret UserMatchingModeEnum return ret } - return *o.UserMatchingMode.Get() + return *o.UserMatchingMode } // GetUserMatchingModeOk returns a tuple with the UserMatchingMode field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *SAMLSourceRequest) GetUserMatchingModeOk() (*UserMatchingModeEnum, bool) { - if o == nil { + if o == nil || IsNil(o.UserMatchingMode) { return nil, false } - return o.UserMatchingMode.Get(), o.UserMatchingMode.IsSet() + return o.UserMatchingMode, true } // HasUserMatchingMode returns a boolean if a field has been set. func (o *SAMLSourceRequest) HasUserMatchingMode() bool { - if o != nil && o.UserMatchingMode.IsSet() { + if o != nil && !IsNil(o.UserMatchingMode) { return true } return false } -// SetUserMatchingMode gets a reference to the given NullableUserMatchingModeEnum and assigns it to the UserMatchingMode field. +// SetUserMatchingMode gets a reference to the given UserMatchingModeEnum and assigns it to the UserMatchingMode field. func (o *SAMLSourceRequest) SetUserMatchingMode(v UserMatchingModeEnum) { - o.UserMatchingMode.Set(&v) -} - -// SetUserMatchingModeNil sets the value for UserMatchingMode to be an explicit nil -func (o *SAMLSourceRequest) SetUserMatchingModeNil() { - o.UserMatchingMode.Set(nil) -} - -// UnsetUserMatchingMode ensures that no value is present for UserMatchingMode, not even an explicit nil -func (o *SAMLSourceRequest) UnsetUserMatchingMode() { - o.UserMatchingMode.Unset() + o.UserMatchingMode = &v } // GetUserPathTemplate returns the UserPathTemplate field value if set, zero value otherwise. func (o *SAMLSourceRequest) GetUserPathTemplate() string { - if o == nil || o.UserPathTemplate == nil { + if o == nil || IsNil(o.UserPathTemplate) { var ret string return ret } @@ -325,7 +315,7 @@ func (o *SAMLSourceRequest) GetUserPathTemplate() string { // GetUserPathTemplateOk returns a tuple with the UserPathTemplate field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SAMLSourceRequest) GetUserPathTemplateOk() (*string, bool) { - if o == nil || o.UserPathTemplate == nil { + if o == nil || IsNil(o.UserPathTemplate) { return nil, false } return o.UserPathTemplate, true @@ -333,7 +323,7 @@ func (o *SAMLSourceRequest) GetUserPathTemplateOk() (*string, bool) { // HasUserPathTemplate returns a boolean if a field has been set. func (o *SAMLSourceRequest) HasUserPathTemplate() bool { - if o != nil && o.UserPathTemplate != nil { + if o != nil && !IsNil(o.UserPathTemplate) { return true } @@ -371,7 +361,7 @@ func (o *SAMLSourceRequest) SetPreAuthenticationFlow(v string) { // GetIssuer returns the Issuer field value if set, zero value otherwise. func (o *SAMLSourceRequest) GetIssuer() string { - if o == nil || o.Issuer == nil { + if o == nil || IsNil(o.Issuer) { var ret string return ret } @@ -381,7 +371,7 @@ func (o *SAMLSourceRequest) GetIssuer() string { // GetIssuerOk returns a tuple with the Issuer field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SAMLSourceRequest) GetIssuerOk() (*string, bool) { - if o == nil || o.Issuer == nil { + if o == nil || IsNil(o.Issuer) { return nil, false } return o.Issuer, true @@ -389,7 +379,7 @@ func (o *SAMLSourceRequest) GetIssuerOk() (*string, bool) { // HasIssuer returns a boolean if a field has been set. func (o *SAMLSourceRequest) HasIssuer() bool { - if o != nil && o.Issuer != nil { + if o != nil && !IsNil(o.Issuer) { return true } @@ -427,7 +417,7 @@ func (o *SAMLSourceRequest) SetSsoUrl(v string) { // GetSloUrl returns the SloUrl field value if set, zero value otherwise (both if not set or set to explicit null). func (o *SAMLSourceRequest) GetSloUrl() string { - if o == nil || o.SloUrl.Get() == nil { + if o == nil || IsNil(o.SloUrl.Get()) { var ret string return ret } @@ -470,7 +460,7 @@ func (o *SAMLSourceRequest) UnsetSloUrl() { // GetAllowIdpInitiated returns the AllowIdpInitiated field value if set, zero value otherwise. func (o *SAMLSourceRequest) GetAllowIdpInitiated() bool { - if o == nil || o.AllowIdpInitiated == nil { + if o == nil || IsNil(o.AllowIdpInitiated) { var ret bool return ret } @@ -480,7 +470,7 @@ func (o *SAMLSourceRequest) GetAllowIdpInitiated() bool { // GetAllowIdpInitiatedOk returns a tuple with the AllowIdpInitiated field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SAMLSourceRequest) GetAllowIdpInitiatedOk() (*bool, bool) { - if o == nil || o.AllowIdpInitiated == nil { + if o == nil || IsNil(o.AllowIdpInitiated) { return nil, false } return o.AllowIdpInitiated, true @@ -488,7 +478,7 @@ func (o *SAMLSourceRequest) GetAllowIdpInitiatedOk() (*bool, bool) { // HasAllowIdpInitiated returns a boolean if a field has been set. func (o *SAMLSourceRequest) HasAllowIdpInitiated() bool { - if o != nil && o.AllowIdpInitiated != nil { + if o != nil && !IsNil(o.AllowIdpInitiated) { return true } @@ -500,52 +490,41 @@ func (o *SAMLSourceRequest) SetAllowIdpInitiated(v bool) { o.AllowIdpInitiated = &v } -// GetNameIdPolicy returns the NameIdPolicy field value if set, zero value otherwise (both if not set or set to explicit null). +// GetNameIdPolicy returns the NameIdPolicy field value if set, zero value otherwise. func (o *SAMLSourceRequest) GetNameIdPolicy() NameIdPolicyEnum { - if o == nil || o.NameIdPolicy.Get() == nil { + if o == nil || IsNil(o.NameIdPolicy) { var ret NameIdPolicyEnum return ret } - return *o.NameIdPolicy.Get() + return *o.NameIdPolicy } // GetNameIdPolicyOk returns a tuple with the NameIdPolicy field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *SAMLSourceRequest) GetNameIdPolicyOk() (*NameIdPolicyEnum, bool) { - if o == nil { + if o == nil || IsNil(o.NameIdPolicy) { return nil, false } - return o.NameIdPolicy.Get(), o.NameIdPolicy.IsSet() + return o.NameIdPolicy, true } // HasNameIdPolicy returns a boolean if a field has been set. func (o *SAMLSourceRequest) HasNameIdPolicy() bool { - if o != nil && o.NameIdPolicy.IsSet() { + if o != nil && !IsNil(o.NameIdPolicy) { return true } return false } -// SetNameIdPolicy gets a reference to the given NullableNameIdPolicyEnum and assigns it to the NameIdPolicy field. +// SetNameIdPolicy gets a reference to the given NameIdPolicyEnum and assigns it to the NameIdPolicy field. func (o *SAMLSourceRequest) SetNameIdPolicy(v NameIdPolicyEnum) { - o.NameIdPolicy.Set(&v) -} - -// SetNameIdPolicyNil sets the value for NameIdPolicy to be an explicit nil -func (o *SAMLSourceRequest) SetNameIdPolicyNil() { - o.NameIdPolicy.Set(nil) -} - -// UnsetNameIdPolicy ensures that no value is present for NameIdPolicy, not even an explicit nil -func (o *SAMLSourceRequest) UnsetNameIdPolicy() { - o.NameIdPolicy.Unset() + o.NameIdPolicy = &v } // GetBindingType returns the BindingType field value if set, zero value otherwise. func (o *SAMLSourceRequest) GetBindingType() BindingTypeEnum { - if o == nil || o.BindingType == nil { + if o == nil || IsNil(o.BindingType) { var ret BindingTypeEnum return ret } @@ -555,7 +534,7 @@ func (o *SAMLSourceRequest) GetBindingType() BindingTypeEnum { // GetBindingTypeOk returns a tuple with the BindingType field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SAMLSourceRequest) GetBindingTypeOk() (*BindingTypeEnum, bool) { - if o == nil || o.BindingType == nil { + if o == nil || IsNil(o.BindingType) { return nil, false } return o.BindingType, true @@ -563,7 +542,7 @@ func (o *SAMLSourceRequest) GetBindingTypeOk() (*BindingTypeEnum, bool) { // HasBindingType returns a boolean if a field has been set. func (o *SAMLSourceRequest) HasBindingType() bool { - if o != nil && o.BindingType != nil { + if o != nil && !IsNil(o.BindingType) { return true } @@ -577,7 +556,7 @@ func (o *SAMLSourceRequest) SetBindingType(v BindingTypeEnum) { // GetSigningKp returns the SigningKp field value if set, zero value otherwise (both if not set or set to explicit null). func (o *SAMLSourceRequest) GetSigningKp() string { - if o == nil || o.SigningKp.Get() == nil { + if o == nil || IsNil(o.SigningKp.Get()) { var ret string return ret } @@ -620,7 +599,7 @@ func (o *SAMLSourceRequest) UnsetSigningKp() { // GetDigestAlgorithm returns the DigestAlgorithm field value if set, zero value otherwise. func (o *SAMLSourceRequest) GetDigestAlgorithm() DigestAlgorithmEnum { - if o == nil || o.DigestAlgorithm == nil { + if o == nil || IsNil(o.DigestAlgorithm) { var ret DigestAlgorithmEnum return ret } @@ -630,7 +609,7 @@ func (o *SAMLSourceRequest) GetDigestAlgorithm() DigestAlgorithmEnum { // GetDigestAlgorithmOk returns a tuple with the DigestAlgorithm field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SAMLSourceRequest) GetDigestAlgorithmOk() (*DigestAlgorithmEnum, bool) { - if o == nil || o.DigestAlgorithm == nil { + if o == nil || IsNil(o.DigestAlgorithm) { return nil, false } return o.DigestAlgorithm, true @@ -638,7 +617,7 @@ func (o *SAMLSourceRequest) GetDigestAlgorithmOk() (*DigestAlgorithmEnum, bool) // HasDigestAlgorithm returns a boolean if a field has been set. func (o *SAMLSourceRequest) HasDigestAlgorithm() bool { - if o != nil && o.DigestAlgorithm != nil { + if o != nil && !IsNil(o.DigestAlgorithm) { return true } @@ -652,7 +631,7 @@ func (o *SAMLSourceRequest) SetDigestAlgorithm(v DigestAlgorithmEnum) { // GetSignatureAlgorithm returns the SignatureAlgorithm field value if set, zero value otherwise. func (o *SAMLSourceRequest) GetSignatureAlgorithm() SignatureAlgorithmEnum { - if o == nil || o.SignatureAlgorithm == nil { + if o == nil || IsNil(o.SignatureAlgorithm) { var ret SignatureAlgorithmEnum return ret } @@ -662,7 +641,7 @@ func (o *SAMLSourceRequest) GetSignatureAlgorithm() SignatureAlgorithmEnum { // GetSignatureAlgorithmOk returns a tuple with the SignatureAlgorithm field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SAMLSourceRequest) GetSignatureAlgorithmOk() (*SignatureAlgorithmEnum, bool) { - if o == nil || o.SignatureAlgorithm == nil { + if o == nil || IsNil(o.SignatureAlgorithm) { return nil, false } return o.SignatureAlgorithm, true @@ -670,7 +649,7 @@ func (o *SAMLSourceRequest) GetSignatureAlgorithmOk() (*SignatureAlgorithmEnum, // HasSignatureAlgorithm returns a boolean if a field has been set. func (o *SAMLSourceRequest) HasSignatureAlgorithm() bool { - if o != nil && o.SignatureAlgorithm != nil { + if o != nil && !IsNil(o.SignatureAlgorithm) { return true } @@ -684,7 +663,7 @@ func (o *SAMLSourceRequest) SetSignatureAlgorithm(v SignatureAlgorithmEnum) { // GetTemporaryUserDeleteAfter returns the TemporaryUserDeleteAfter field value if set, zero value otherwise. func (o *SAMLSourceRequest) GetTemporaryUserDeleteAfter() string { - if o == nil || o.TemporaryUserDeleteAfter == nil { + if o == nil || IsNil(o.TemporaryUserDeleteAfter) { var ret string return ret } @@ -694,7 +673,7 @@ func (o *SAMLSourceRequest) GetTemporaryUserDeleteAfter() string { // GetTemporaryUserDeleteAfterOk returns a tuple with the TemporaryUserDeleteAfter field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SAMLSourceRequest) GetTemporaryUserDeleteAfterOk() (*string, bool) { - if o == nil || o.TemporaryUserDeleteAfter == nil { + if o == nil || IsNil(o.TemporaryUserDeleteAfter) { return nil, false } return o.TemporaryUserDeleteAfter, true @@ -702,7 +681,7 @@ func (o *SAMLSourceRequest) GetTemporaryUserDeleteAfterOk() (*string, bool) { // HasTemporaryUserDeleteAfter returns a boolean if a field has been set. func (o *SAMLSourceRequest) HasTemporaryUserDeleteAfter() bool { - if o != nil && o.TemporaryUserDeleteAfter != nil { + if o != nil && !IsNil(o.TemporaryUserDeleteAfter) { return true } @@ -715,14 +694,18 @@ func (o *SAMLSourceRequest) SetTemporaryUserDeleteAfter(v string) { } func (o SAMLSourceRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if true { - toSerialize["slug"] = o.Slug - } - if o.Enabled != nil { + return json.Marshal(toSerialize) +} + +func (o SAMLSourceRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["slug"] = o.Slug + if !IsNil(o.Enabled) { toSerialize["enabled"] = o.Enabled } if o.AuthenticationFlow.IsSet() { @@ -731,49 +714,45 @@ func (o SAMLSourceRequest) MarshalJSON() ([]byte, error) { if o.EnrollmentFlow.IsSet() { toSerialize["enrollment_flow"] = o.EnrollmentFlow.Get() } - if o.PolicyEngineMode != nil { + if !IsNil(o.PolicyEngineMode) { toSerialize["policy_engine_mode"] = o.PolicyEngineMode } - if o.UserMatchingMode.IsSet() { - toSerialize["user_matching_mode"] = o.UserMatchingMode.Get() + if !IsNil(o.UserMatchingMode) { + toSerialize["user_matching_mode"] = o.UserMatchingMode } - if o.UserPathTemplate != nil { + if !IsNil(o.UserPathTemplate) { toSerialize["user_path_template"] = o.UserPathTemplate } - if true { - toSerialize["pre_authentication_flow"] = o.PreAuthenticationFlow - } - if o.Issuer != nil { + toSerialize["pre_authentication_flow"] = o.PreAuthenticationFlow + if !IsNil(o.Issuer) { toSerialize["issuer"] = o.Issuer } - if true { - toSerialize["sso_url"] = o.SsoUrl - } + toSerialize["sso_url"] = o.SsoUrl if o.SloUrl.IsSet() { toSerialize["slo_url"] = o.SloUrl.Get() } - if o.AllowIdpInitiated != nil { + if !IsNil(o.AllowIdpInitiated) { toSerialize["allow_idp_initiated"] = o.AllowIdpInitiated } - if o.NameIdPolicy.IsSet() { - toSerialize["name_id_policy"] = o.NameIdPolicy.Get() + if !IsNil(o.NameIdPolicy) { + toSerialize["name_id_policy"] = o.NameIdPolicy } - if o.BindingType != nil { + if !IsNil(o.BindingType) { toSerialize["binding_type"] = o.BindingType } if o.SigningKp.IsSet() { toSerialize["signing_kp"] = o.SigningKp.Get() } - if o.DigestAlgorithm != nil { + if !IsNil(o.DigestAlgorithm) { toSerialize["digest_algorithm"] = o.DigestAlgorithm } - if o.SignatureAlgorithm != nil { + if !IsNil(o.SignatureAlgorithm) { toSerialize["signature_algorithm"] = o.SignatureAlgorithm } - if o.TemporaryUserDeleteAfter != nil { + if !IsNil(o.TemporaryUserDeleteAfter) { toSerialize["temporary_user_delete_after"] = o.TemporaryUserDeleteAfter } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableSAMLSourceRequest struct { diff --git a/model_scim_mapping.go b/model_scim_mapping.go index 4ed9577bb..784c67987 100644 --- a/model_scim_mapping.go +++ b/model_scim_mapping.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the SCIMMapping type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SCIMMapping{} + // SCIMMapping SCIMMapping Serializer type SCIMMapping struct { Pk string `json:"pk"` @@ -82,7 +85,7 @@ func (o *SCIMMapping) SetPk(v string) { // GetManaged returns the Managed field value if set, zero value otherwise (both if not set or set to explicit null). func (o *SCIMMapping) GetManaged() string { - if o == nil || o.Managed.Get() == nil { + if o == nil || IsNil(o.Managed.Get()) { var ret string return ret } @@ -268,32 +271,26 @@ func (o *SCIMMapping) SetMetaModelName(v string) { } func (o SCIMMapping) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } + return json.Marshal(toSerialize) +} + +func (o SCIMMapping) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly if o.Managed.IsSet() { toSerialize["managed"] = o.Managed.Get() } - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["expression"] = o.Expression - } - if true { - toSerialize["component"] = o.Component - } - if true { - toSerialize["verbose_name"] = o.VerboseName - } - if true { - toSerialize["verbose_name_plural"] = o.VerboseNamePlural - } - if true { - toSerialize["meta_model_name"] = o.MetaModelName - } - return json.Marshal(toSerialize) + toSerialize["name"] = o.Name + toSerialize["expression"] = o.Expression + // skip: component is readOnly + // skip: verbose_name is readOnly + // skip: verbose_name_plural is readOnly + // skip: meta_model_name is readOnly + return toSerialize, nil } type NullableSCIMMapping struct { diff --git a/model_scim_mapping_request.go b/model_scim_mapping_request.go index a1ec1fdd9..db47dc98b 100644 --- a/model_scim_mapping_request.go +++ b/model_scim_mapping_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the SCIMMappingRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SCIMMappingRequest{} + // SCIMMappingRequest SCIMMapping Serializer type SCIMMappingRequest struct { // Objects which are managed by authentik. These objects are created and updated automatically. This is flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. @@ -44,7 +47,7 @@ func NewSCIMMappingRequestWithDefaults() *SCIMMappingRequest { // GetManaged returns the Managed field value if set, zero value otherwise (both if not set or set to explicit null). func (o *SCIMMappingRequest) GetManaged() string { - if o == nil || o.Managed.Get() == nil { + if o == nil || IsNil(o.Managed.Get()) { var ret string return ret } @@ -134,17 +137,21 @@ func (o *SCIMMappingRequest) SetExpression(v string) { } func (o SCIMMappingRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SCIMMappingRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Managed.IsSet() { toSerialize["managed"] = o.Managed.Get() } - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["expression"] = o.Expression - } - return json.Marshal(toSerialize) + toSerialize["name"] = o.Name + toSerialize["expression"] = o.Expression + return toSerialize, nil } type NullableSCIMMappingRequest struct { diff --git a/model_scim_provider.go b/model_scim_provider.go index 31d2231a1..1904e3a33 100644 --- a/model_scim_provider.go +++ b/model_scim_provider.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the SCIMProvider type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SCIMProvider{} + // SCIMProvider SCIMProvider Serializer type SCIMProvider struct { Pk int32 `json:"pk"` @@ -119,7 +122,7 @@ func (o *SCIMProvider) SetName(v string) { // GetPropertyMappings returns the PropertyMappings field value if set, zero value otherwise. func (o *SCIMProvider) GetPropertyMappings() []string { - if o == nil || o.PropertyMappings == nil { + if o == nil || IsNil(o.PropertyMappings) { var ret []string return ret } @@ -129,7 +132,7 @@ func (o *SCIMProvider) GetPropertyMappings() []string { // GetPropertyMappingsOk returns a tuple with the PropertyMappings field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SCIMProvider) GetPropertyMappingsOk() ([]string, bool) { - if o == nil || o.PropertyMappings == nil { + if o == nil || IsNil(o.PropertyMappings) { return nil, false } return o.PropertyMappings, true @@ -137,7 +140,7 @@ func (o *SCIMProvider) GetPropertyMappingsOk() ([]string, bool) { // HasPropertyMappings returns a boolean if a field has been set. func (o *SCIMProvider) HasPropertyMappings() bool { - if o != nil && o.PropertyMappings != nil { + if o != nil && !IsNil(o.PropertyMappings) { return true } @@ -151,7 +154,7 @@ func (o *SCIMProvider) SetPropertyMappings(v []string) { // GetPropertyMappingsGroup returns the PropertyMappingsGroup field value if set, zero value otherwise. func (o *SCIMProvider) GetPropertyMappingsGroup() []string { - if o == nil || o.PropertyMappingsGroup == nil { + if o == nil || IsNil(o.PropertyMappingsGroup) { var ret []string return ret } @@ -161,7 +164,7 @@ func (o *SCIMProvider) GetPropertyMappingsGroup() []string { // GetPropertyMappingsGroupOk returns a tuple with the PropertyMappingsGroup field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SCIMProvider) GetPropertyMappingsGroupOk() ([]string, bool) { - if o == nil || o.PropertyMappingsGroup == nil { + if o == nil || IsNil(o.PropertyMappingsGroup) { return nil, false } return o.PropertyMappingsGroup, true @@ -169,7 +172,7 @@ func (o *SCIMProvider) GetPropertyMappingsGroupOk() ([]string, bool) { // HasPropertyMappingsGroup returns a boolean if a field has been set. func (o *SCIMProvider) HasPropertyMappingsGroup() bool { - if o != nil && o.PropertyMappingsGroup != nil { + if o != nil && !IsNil(o.PropertyMappingsGroup) { return true } @@ -375,7 +378,7 @@ func (o *SCIMProvider) SetToken(v string) { // GetExcludeUsersServiceAccount returns the ExcludeUsersServiceAccount field value if set, zero value otherwise. func (o *SCIMProvider) GetExcludeUsersServiceAccount() bool { - if o == nil || o.ExcludeUsersServiceAccount == nil { + if o == nil || IsNil(o.ExcludeUsersServiceAccount) { var ret bool return ret } @@ -385,7 +388,7 @@ func (o *SCIMProvider) GetExcludeUsersServiceAccount() bool { // GetExcludeUsersServiceAccountOk returns a tuple with the ExcludeUsersServiceAccount field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SCIMProvider) GetExcludeUsersServiceAccountOk() (*bool, bool) { - if o == nil || o.ExcludeUsersServiceAccount == nil { + if o == nil || IsNil(o.ExcludeUsersServiceAccount) { return nil, false } return o.ExcludeUsersServiceAccount, true @@ -393,7 +396,7 @@ func (o *SCIMProvider) GetExcludeUsersServiceAccountOk() (*bool, bool) { // HasExcludeUsersServiceAccount returns a boolean if a field has been set. func (o *SCIMProvider) HasExcludeUsersServiceAccount() bool { - if o != nil && o.ExcludeUsersServiceAccount != nil { + if o != nil && !IsNil(o.ExcludeUsersServiceAccount) { return true } @@ -407,7 +410,7 @@ func (o *SCIMProvider) SetExcludeUsersServiceAccount(v bool) { // GetFilterGroup returns the FilterGroup field value if set, zero value otherwise (both if not set or set to explicit null). func (o *SCIMProvider) GetFilterGroup() string { - if o == nil || o.FilterGroup.Get() == nil { + if o == nil || IsNil(o.FilterGroup.Get()) { var ret string return ret } @@ -449,50 +452,38 @@ func (o *SCIMProvider) UnsetFilterGroup() { } func (o SCIMProvider) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if true { - toSerialize["name"] = o.Name - } - if o.PropertyMappings != nil { + return json.Marshal(toSerialize) +} + +func (o SCIMProvider) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name + if !IsNil(o.PropertyMappings) { toSerialize["property_mappings"] = o.PropertyMappings } - if o.PropertyMappingsGroup != nil { + if !IsNil(o.PropertyMappingsGroup) { toSerialize["property_mappings_group"] = o.PropertyMappingsGroup } - if true { - toSerialize["component"] = o.Component - } - if true { - toSerialize["assigned_application_slug"] = o.AssignedApplicationSlug - } - if true { - toSerialize["assigned_application_name"] = o.AssignedApplicationName - } - if true { - toSerialize["verbose_name"] = o.VerboseName - } - if true { - toSerialize["verbose_name_plural"] = o.VerboseNamePlural - } - if true { - toSerialize["meta_model_name"] = o.MetaModelName - } - if true { - toSerialize["url"] = o.Url - } - if true { - toSerialize["token"] = o.Token - } - if o.ExcludeUsersServiceAccount != nil { + // skip: component is readOnly + // skip: assigned_application_slug is readOnly + // skip: assigned_application_name is readOnly + // skip: verbose_name is readOnly + // skip: verbose_name_plural is readOnly + // skip: meta_model_name is readOnly + toSerialize["url"] = o.Url + toSerialize["token"] = o.Token + if !IsNil(o.ExcludeUsersServiceAccount) { toSerialize["exclude_users_service_account"] = o.ExcludeUsersServiceAccount } if o.FilterGroup.IsSet() { toSerialize["filter_group"] = o.FilterGroup.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableSCIMProvider struct { diff --git a/model_scim_provider_request.go b/model_scim_provider_request.go index 8449c675e..17f4b3088 100644 --- a/model_scim_provider_request.go +++ b/model_scim_provider_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the SCIMProviderRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SCIMProviderRequest{} + // SCIMProviderRequest SCIMProvider Serializer type SCIMProviderRequest struct { Name string `json:"name"` @@ -75,7 +78,7 @@ func (o *SCIMProviderRequest) SetName(v string) { // GetPropertyMappings returns the PropertyMappings field value if set, zero value otherwise. func (o *SCIMProviderRequest) GetPropertyMappings() []string { - if o == nil || o.PropertyMappings == nil { + if o == nil || IsNil(o.PropertyMappings) { var ret []string return ret } @@ -85,7 +88,7 @@ func (o *SCIMProviderRequest) GetPropertyMappings() []string { // GetPropertyMappingsOk returns a tuple with the PropertyMappings field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SCIMProviderRequest) GetPropertyMappingsOk() ([]string, bool) { - if o == nil || o.PropertyMappings == nil { + if o == nil || IsNil(o.PropertyMappings) { return nil, false } return o.PropertyMappings, true @@ -93,7 +96,7 @@ func (o *SCIMProviderRequest) GetPropertyMappingsOk() ([]string, bool) { // HasPropertyMappings returns a boolean if a field has been set. func (o *SCIMProviderRequest) HasPropertyMappings() bool { - if o != nil && o.PropertyMappings != nil { + if o != nil && !IsNil(o.PropertyMappings) { return true } @@ -107,7 +110,7 @@ func (o *SCIMProviderRequest) SetPropertyMappings(v []string) { // GetPropertyMappingsGroup returns the PropertyMappingsGroup field value if set, zero value otherwise. func (o *SCIMProviderRequest) GetPropertyMappingsGroup() []string { - if o == nil || o.PropertyMappingsGroup == nil { + if o == nil || IsNil(o.PropertyMappingsGroup) { var ret []string return ret } @@ -117,7 +120,7 @@ func (o *SCIMProviderRequest) GetPropertyMappingsGroup() []string { // GetPropertyMappingsGroupOk returns a tuple with the PropertyMappingsGroup field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SCIMProviderRequest) GetPropertyMappingsGroupOk() ([]string, bool) { - if o == nil || o.PropertyMappingsGroup == nil { + if o == nil || IsNil(o.PropertyMappingsGroup) { return nil, false } return o.PropertyMappingsGroup, true @@ -125,7 +128,7 @@ func (o *SCIMProviderRequest) GetPropertyMappingsGroupOk() ([]string, bool) { // HasPropertyMappingsGroup returns a boolean if a field has been set. func (o *SCIMProviderRequest) HasPropertyMappingsGroup() bool { - if o != nil && o.PropertyMappingsGroup != nil { + if o != nil && !IsNil(o.PropertyMappingsGroup) { return true } @@ -187,7 +190,7 @@ func (o *SCIMProviderRequest) SetToken(v string) { // GetExcludeUsersServiceAccount returns the ExcludeUsersServiceAccount field value if set, zero value otherwise. func (o *SCIMProviderRequest) GetExcludeUsersServiceAccount() bool { - if o == nil || o.ExcludeUsersServiceAccount == nil { + if o == nil || IsNil(o.ExcludeUsersServiceAccount) { var ret bool return ret } @@ -197,7 +200,7 @@ func (o *SCIMProviderRequest) GetExcludeUsersServiceAccount() bool { // GetExcludeUsersServiceAccountOk returns a tuple with the ExcludeUsersServiceAccount field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SCIMProviderRequest) GetExcludeUsersServiceAccountOk() (*bool, bool) { - if o == nil || o.ExcludeUsersServiceAccount == nil { + if o == nil || IsNil(o.ExcludeUsersServiceAccount) { return nil, false } return o.ExcludeUsersServiceAccount, true @@ -205,7 +208,7 @@ func (o *SCIMProviderRequest) GetExcludeUsersServiceAccountOk() (*bool, bool) { // HasExcludeUsersServiceAccount returns a boolean if a field has been set. func (o *SCIMProviderRequest) HasExcludeUsersServiceAccount() bool { - if o != nil && o.ExcludeUsersServiceAccount != nil { + if o != nil && !IsNil(o.ExcludeUsersServiceAccount) { return true } @@ -219,7 +222,7 @@ func (o *SCIMProviderRequest) SetExcludeUsersServiceAccount(v bool) { // GetFilterGroup returns the FilterGroup field value if set, zero value otherwise (both if not set or set to explicit null). func (o *SCIMProviderRequest) GetFilterGroup() string { - if o == nil || o.FilterGroup.Get() == nil { + if o == nil || IsNil(o.FilterGroup.Get()) { var ret string return ret } @@ -261,29 +264,31 @@ func (o *SCIMProviderRequest) UnsetFilterGroup() { } func (o SCIMProviderRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.PropertyMappings != nil { + return json.Marshal(toSerialize) +} + +func (o SCIMProviderRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.PropertyMappings) { toSerialize["property_mappings"] = o.PropertyMappings } - if o.PropertyMappingsGroup != nil { + if !IsNil(o.PropertyMappingsGroup) { toSerialize["property_mappings_group"] = o.PropertyMappingsGroup } - if true { - toSerialize["url"] = o.Url - } - if true { - toSerialize["token"] = o.Token - } - if o.ExcludeUsersServiceAccount != nil { + toSerialize["url"] = o.Url + toSerialize["token"] = o.Token + if !IsNil(o.ExcludeUsersServiceAccount) { toSerialize["exclude_users_service_account"] = o.ExcludeUsersServiceAccount } if o.FilterGroup.IsSet() { toSerialize["filter_group"] = o.FilterGroup.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableSCIMProviderRequest struct { diff --git a/model_scope_mapping.go b/model_scope_mapping.go index a2e14f0a4..2d9ebc495 100644 --- a/model_scope_mapping.go +++ b/model_scope_mapping.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ScopeMapping type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ScopeMapping{} + // ScopeMapping ScopeMapping Serializer type ScopeMapping struct { Pk string `json:"pk"` @@ -87,7 +90,7 @@ func (o *ScopeMapping) SetPk(v string) { // GetManaged returns the Managed field value if set, zero value otherwise (both if not set or set to explicit null). func (o *ScopeMapping) GetManaged() string { - if o == nil || o.Managed.Get() == nil { + if o == nil || IsNil(o.Managed.Get()) { var ret string return ret } @@ -298,7 +301,7 @@ func (o *ScopeMapping) SetScopeName(v string) { // GetDescription returns the Description field value if set, zero value otherwise. func (o *ScopeMapping) GetDescription() string { - if o == nil || o.Description == nil { + if o == nil || IsNil(o.Description) { var ret string return ret } @@ -308,7 +311,7 @@ func (o *ScopeMapping) GetDescription() string { // GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ScopeMapping) GetDescriptionOk() (*string, bool) { - if o == nil || o.Description == nil { + if o == nil || IsNil(o.Description) { return nil, false } return o.Description, true @@ -316,7 +319,7 @@ func (o *ScopeMapping) GetDescriptionOk() (*string, bool) { // HasDescription returns a boolean if a field has been set. func (o *ScopeMapping) HasDescription() bool { - if o != nil && o.Description != nil { + if o != nil && !IsNil(o.Description) { return true } @@ -329,38 +332,30 @@ func (o *ScopeMapping) SetDescription(v string) { } func (o ScopeMapping) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } + return json.Marshal(toSerialize) +} + +func (o ScopeMapping) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly if o.Managed.IsSet() { toSerialize["managed"] = o.Managed.Get() } - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["expression"] = o.Expression - } - if true { - toSerialize["component"] = o.Component - } - if true { - toSerialize["verbose_name"] = o.VerboseName - } - if true { - toSerialize["verbose_name_plural"] = o.VerboseNamePlural - } - if true { - toSerialize["meta_model_name"] = o.MetaModelName - } - if true { - toSerialize["scope_name"] = o.ScopeName - } - if o.Description != nil { + toSerialize["name"] = o.Name + toSerialize["expression"] = o.Expression + // skip: component is readOnly + // skip: verbose_name is readOnly + // skip: verbose_name_plural is readOnly + // skip: meta_model_name is readOnly + toSerialize["scope_name"] = o.ScopeName + if !IsNil(o.Description) { toSerialize["description"] = o.Description } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableScopeMapping struct { diff --git a/model_scope_mapping_request.go b/model_scope_mapping_request.go index a46118d4d..2e00424ba 100644 --- a/model_scope_mapping_request.go +++ b/model_scope_mapping_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ScopeMappingRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ScopeMappingRequest{} + // ScopeMappingRequest ScopeMapping Serializer type ScopeMappingRequest struct { // Objects which are managed by authentik. These objects are created and updated automatically. This is flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. @@ -49,7 +52,7 @@ func NewScopeMappingRequestWithDefaults() *ScopeMappingRequest { // GetManaged returns the Managed field value if set, zero value otherwise (both if not set or set to explicit null). func (o *ScopeMappingRequest) GetManaged() string { - if o == nil || o.Managed.Get() == nil { + if o == nil || IsNil(o.Managed.Get()) { var ret string return ret } @@ -164,7 +167,7 @@ func (o *ScopeMappingRequest) SetScopeName(v string) { // GetDescription returns the Description field value if set, zero value otherwise. func (o *ScopeMappingRequest) GetDescription() string { - if o == nil || o.Description == nil { + if o == nil || IsNil(o.Description) { var ret string return ret } @@ -174,7 +177,7 @@ func (o *ScopeMappingRequest) GetDescription() string { // GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ScopeMappingRequest) GetDescriptionOk() (*string, bool) { - if o == nil || o.Description == nil { + if o == nil || IsNil(o.Description) { return nil, false } return o.Description, true @@ -182,7 +185,7 @@ func (o *ScopeMappingRequest) GetDescriptionOk() (*string, bool) { // HasDescription returns a boolean if a field has been set. func (o *ScopeMappingRequest) HasDescription() bool { - if o != nil && o.Description != nil { + if o != nil && !IsNil(o.Description) { return true } @@ -195,23 +198,25 @@ func (o *ScopeMappingRequest) SetDescription(v string) { } func (o ScopeMappingRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ScopeMappingRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Managed.IsSet() { toSerialize["managed"] = o.Managed.Get() } - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["expression"] = o.Expression - } - if true { - toSerialize["scope_name"] = o.ScopeName - } - if o.Description != nil { + toSerialize["name"] = o.Name + toSerialize["expression"] = o.Expression + toSerialize["scope_name"] = o.ScopeName + if !IsNil(o.Description) { toSerialize["description"] = o.Description } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableScopeMappingRequest struct { diff --git a/model_selectable_stage.go b/model_selectable_stage.go index 55a3c56d2..f1cf3bf85 100644 --- a/model_selectable_stage.go +++ b/model_selectable_stage.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the SelectableStage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SelectableStage{} + // SelectableStage Serializer for stages which can be selected by users type SelectableStage struct { Pk string `json:"pk"` @@ -141,22 +144,22 @@ func (o *SelectableStage) SetMetaModelName(v string) { } func (o SelectableStage) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["verbose_name"] = o.VerboseName - } - if true { - toSerialize["meta_model_name"] = o.MetaModelName + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o SelectableStage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pk"] = o.Pk + toSerialize["name"] = o.Name + toSerialize["verbose_name"] = o.VerboseName + toSerialize["meta_model_name"] = o.MetaModelName + return toSerialize, nil +} + type NullableSelectableStage struct { value *SelectableStage isSet bool diff --git a/model_service_connection.go b/model_service_connection.go index 82ca5adb4..4161a6488 100644 --- a/model_service_connection.go +++ b/model_service_connection.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ServiceConnection type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ServiceConnection{} + // ServiceConnection ServiceConnection Serializer type ServiceConnection struct { Pk string `json:"pk"` @@ -104,7 +107,7 @@ func (o *ServiceConnection) SetName(v string) { // GetLocal returns the Local field value if set, zero value otherwise. func (o *ServiceConnection) GetLocal() bool { - if o == nil || o.Local == nil { + if o == nil || IsNil(o.Local) { var ret bool return ret } @@ -114,7 +117,7 @@ func (o *ServiceConnection) GetLocal() bool { // GetLocalOk returns a tuple with the Local field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ServiceConnection) GetLocalOk() (*bool, bool) { - if o == nil || o.Local == nil { + if o == nil || IsNil(o.Local) { return nil, false } return o.Local, true @@ -122,7 +125,7 @@ func (o *ServiceConnection) GetLocalOk() (*bool, bool) { // HasLocal returns a boolean if a field has been set. func (o *ServiceConnection) HasLocal() bool { - if o != nil && o.Local != nil { + if o != nil && !IsNil(o.Local) { return true } @@ -231,29 +234,25 @@ func (o *ServiceConnection) SetMetaModelName(v string) { } func (o ServiceConnection) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.Local != nil { + return json.Marshal(toSerialize) +} + +func (o ServiceConnection) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name + if !IsNil(o.Local) { toSerialize["local"] = o.Local } - if true { - toSerialize["component"] = o.Component - } - if true { - toSerialize["verbose_name"] = o.VerboseName - } - if true { - toSerialize["verbose_name_plural"] = o.VerboseNamePlural - } - if true { - toSerialize["meta_model_name"] = o.MetaModelName - } - return json.Marshal(toSerialize) + // skip: component is readOnly + // skip: verbose_name is readOnly + // skip: verbose_name_plural is readOnly + // skip: meta_model_name is readOnly + return toSerialize, nil } type NullableServiceConnection struct { diff --git a/model_service_connection_request.go b/model_service_connection_request.go index 62323867f..d2ee21770 100644 --- a/model_service_connection_request.go +++ b/model_service_connection_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ServiceConnectionRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ServiceConnectionRequest{} + // ServiceConnectionRequest ServiceConnection Serializer type ServiceConnectionRequest struct { Name string `json:"name"` @@ -66,7 +69,7 @@ func (o *ServiceConnectionRequest) SetName(v string) { // GetLocal returns the Local field value if set, zero value otherwise. func (o *ServiceConnectionRequest) GetLocal() bool { - if o == nil || o.Local == nil { + if o == nil || IsNil(o.Local) { var ret bool return ret } @@ -76,7 +79,7 @@ func (o *ServiceConnectionRequest) GetLocal() bool { // GetLocalOk returns a tuple with the Local field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ServiceConnectionRequest) GetLocalOk() (*bool, bool) { - if o == nil || o.Local == nil { + if o == nil || IsNil(o.Local) { return nil, false } return o.Local, true @@ -84,7 +87,7 @@ func (o *ServiceConnectionRequest) GetLocalOk() (*bool, bool) { // HasLocal returns a boolean if a field has been set. func (o *ServiceConnectionRequest) HasLocal() bool { - if o != nil && o.Local != nil { + if o != nil && !IsNil(o.Local) { return true } @@ -97,14 +100,20 @@ func (o *ServiceConnectionRequest) SetLocal(v bool) { } func (o ServiceConnectionRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.Local != nil { + return json.Marshal(toSerialize) +} + +func (o ServiceConnectionRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Local) { toSerialize["local"] = o.Local } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableServiceConnectionRequest struct { diff --git a/model_service_connection_state.go b/model_service_connection_state.go index 17e5e1ce9..a17472538 100644 --- a/model_service_connection_state.go +++ b/model_service_connection_state.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ServiceConnectionState type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ServiceConnectionState{} + // ServiceConnectionState Serializer for Service connection state type ServiceConnectionState struct { Healthy bool `json:"healthy"` @@ -89,16 +92,20 @@ func (o *ServiceConnectionState) SetVersion(v string) { } func (o ServiceConnectionState) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["healthy"] = o.Healthy - } - if true { - toSerialize["version"] = o.Version + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o ServiceConnectionState) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: healthy is readOnly + // skip: version is readOnly + return toSerialize, nil +} + type NullableServiceConnectionState struct { value *ServiceConnectionState isSet bool diff --git a/model_session_user.go b/model_session_user.go index b91a22b53..7f6a89c0b 100644 --- a/model_session_user.go +++ b/model_session_user.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the SessionUser type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SessionUser{} + // SessionUser Response for the /user/me endpoint, returns the currently active user (as `user` property) and, if this user is being impersonated, the original user in the `original` property. type SessionUser struct { User UserSelf `json:"user"` @@ -65,7 +68,7 @@ func (o *SessionUser) SetUser(v UserSelf) { // GetOriginal returns the Original field value if set, zero value otherwise. func (o *SessionUser) GetOriginal() UserSelf { - if o == nil || o.Original == nil { + if o == nil || IsNil(o.Original) { var ret UserSelf return ret } @@ -75,7 +78,7 @@ func (o *SessionUser) GetOriginal() UserSelf { // GetOriginalOk returns a tuple with the Original field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SessionUser) GetOriginalOk() (*UserSelf, bool) { - if o == nil || o.Original == nil { + if o == nil || IsNil(o.Original) { return nil, false } return o.Original, true @@ -83,7 +86,7 @@ func (o *SessionUser) GetOriginalOk() (*UserSelf, bool) { // HasOriginal returns a boolean if a field has been set. func (o *SessionUser) HasOriginal() bool { - if o != nil && o.Original != nil { + if o != nil && !IsNil(o.Original) { return true } @@ -96,14 +99,20 @@ func (o *SessionUser) SetOriginal(v UserSelf) { } func (o SessionUser) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["user"] = o.User + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.Original != nil { + return json.Marshal(toSerialize) +} + +func (o SessionUser) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["user"] = o.User + if !IsNil(o.Original) { toSerialize["original"] = o.Original } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableSessionUser struct { diff --git a/model_shell_challenge.go b/model_shell_challenge.go index 1e0497aa3..79e7d4621 100644 --- a/model_shell_challenge.go +++ b/model_shell_challenge.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ShellChallenge type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ShellChallenge{} + // ShellChallenge challenge type to render HTML as-is type ShellChallenge struct { Type ChallengeChoices `json:"type"` @@ -73,7 +76,7 @@ func (o *ShellChallenge) SetType(v ChallengeChoices) { // GetFlowInfo returns the FlowInfo field value if set, zero value otherwise. func (o *ShellChallenge) GetFlowInfo() ContextualFlowInfo { - if o == nil || o.FlowInfo == nil { + if o == nil || IsNil(o.FlowInfo) { var ret ContextualFlowInfo return ret } @@ -83,7 +86,7 @@ func (o *ShellChallenge) GetFlowInfo() ContextualFlowInfo { // GetFlowInfoOk returns a tuple with the FlowInfo field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ShellChallenge) GetFlowInfoOk() (*ContextualFlowInfo, bool) { - if o == nil || o.FlowInfo == nil { + if o == nil || IsNil(o.FlowInfo) { return nil, false } return o.FlowInfo, true @@ -91,7 +94,7 @@ func (o *ShellChallenge) GetFlowInfoOk() (*ContextualFlowInfo, bool) { // HasFlowInfo returns a boolean if a field has been set. func (o *ShellChallenge) HasFlowInfo() bool { - if o != nil && o.FlowInfo != nil { + if o != nil && !IsNil(o.FlowInfo) { return true } @@ -105,7 +108,7 @@ func (o *ShellChallenge) SetFlowInfo(v ContextualFlowInfo) { // GetComponent returns the Component field value if set, zero value otherwise. func (o *ShellChallenge) GetComponent() string { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { var ret string return ret } @@ -115,7 +118,7 @@ func (o *ShellChallenge) GetComponent() string { // GetComponentOk returns a tuple with the Component field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ShellChallenge) GetComponentOk() (*string, bool) { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { return nil, false } return o.Component, true @@ -123,7 +126,7 @@ func (o *ShellChallenge) GetComponentOk() (*string, bool) { // HasComponent returns a boolean if a field has been set. func (o *ShellChallenge) HasComponent() bool { - if o != nil && o.Component != nil { + if o != nil && !IsNil(o.Component) { return true } @@ -137,7 +140,7 @@ func (o *ShellChallenge) SetComponent(v string) { // GetResponseErrors returns the ResponseErrors field value if set, zero value otherwise. func (o *ShellChallenge) GetResponseErrors() map[string][]ErrorDetail { - if o == nil || o.ResponseErrors == nil { + if o == nil || IsNil(o.ResponseErrors) { var ret map[string][]ErrorDetail return ret } @@ -147,7 +150,7 @@ func (o *ShellChallenge) GetResponseErrors() map[string][]ErrorDetail { // GetResponseErrorsOk returns a tuple with the ResponseErrors field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ShellChallenge) GetResponseErrorsOk() (*map[string][]ErrorDetail, bool) { - if o == nil || o.ResponseErrors == nil { + if o == nil || IsNil(o.ResponseErrors) { return nil, false } return o.ResponseErrors, true @@ -155,7 +158,7 @@ func (o *ShellChallenge) GetResponseErrorsOk() (*map[string][]ErrorDetail, bool) // HasResponseErrors returns a boolean if a field has been set. func (o *ShellChallenge) HasResponseErrors() bool { - if o != nil && o.ResponseErrors != nil { + if o != nil && !IsNil(o.ResponseErrors) { return true } @@ -192,23 +195,27 @@ func (o *ShellChallenge) SetBody(v string) { } func (o ShellChallenge) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["type"] = o.Type + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.FlowInfo != nil { + return json.Marshal(toSerialize) +} + +func (o ShellChallenge) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + if !IsNil(o.FlowInfo) { toSerialize["flow_info"] = o.FlowInfo } - if o.Component != nil { + if !IsNil(o.Component) { toSerialize["component"] = o.Component } - if o.ResponseErrors != nil { + if !IsNil(o.ResponseErrors) { toSerialize["response_errors"] = o.ResponseErrors } - if true { - toSerialize["body"] = o.Body - } - return json.Marshal(toSerialize) + toSerialize["body"] = o.Body + return toSerialize, nil } type NullableShellChallenge struct { diff --git a/model_sms_device.go b/model_sms_device.go index 60d079728..4244cd472 100644 --- a/model_sms_device.go +++ b/model_sms_device.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the SMSDevice type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SMSDevice{} + // SMSDevice Serializer for sms authenticator devices type SMSDevice struct { // The human-readable name of this device. @@ -116,19 +119,21 @@ func (o *SMSDevice) SetPhoneNumber(v string) { } func (o SMSDevice) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["phone_number"] = o.PhoneNumber + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o SMSDevice) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + // skip: pk is readOnly + // skip: phone_number is readOnly + return toSerialize, nil +} + type NullableSMSDevice struct { value *SMSDevice isSet bool diff --git a/model_sms_device_request.go b/model_sms_device_request.go index 2c6aa2499..4ef864a14 100644 --- a/model_sms_device_request.go +++ b/model_sms_device_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the SMSDeviceRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SMSDeviceRequest{} + // SMSDeviceRequest Serializer for sms authenticator devices type SMSDeviceRequest struct { // The human-readable name of this device. @@ -64,13 +67,19 @@ func (o *SMSDeviceRequest) SetName(v string) { } func (o SMSDeviceRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o SMSDeviceRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + return toSerialize, nil +} + type NullableSMSDeviceRequest struct { value *SMSDeviceRequest isSet bool diff --git a/model_source.go b/model_source.go index 20746aa7d..70ed8bb81 100644 --- a/model_source.go +++ b/model_source.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the Source type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Source{} + // Source Source Serializer type Source struct { Pk string `json:"pk"` @@ -34,10 +37,9 @@ type Source struct { // Return object's plural verbose_name VerboseNamePlural string `json:"verbose_name_plural"` // Return internal model name - MetaModelName string `json:"meta_model_name"` - PolicyEngineMode *PolicyEngineMode `json:"policy_engine_mode,omitempty"` - // How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. - UserMatchingMode NullableUserMatchingModeEnum `json:"user_matching_mode,omitempty"` + MetaModelName string `json:"meta_model_name"` + PolicyEngineMode *PolicyEngineMode `json:"policy_engine_mode,omitempty"` + UserMatchingMode *UserMatchingModeEnum `json:"user_matching_mode,omitempty"` // Objects which are managed by authentik. These objects are created and updated automatically. This is flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. Managed NullableString `json:"managed"` UserPathTemplate *string `json:"user_path_template,omitempty"` @@ -145,7 +147,7 @@ func (o *Source) SetSlug(v string) { // GetEnabled returns the Enabled field value if set, zero value otherwise. func (o *Source) GetEnabled() bool { - if o == nil || o.Enabled == nil { + if o == nil || IsNil(o.Enabled) { var ret bool return ret } @@ -155,7 +157,7 @@ func (o *Source) GetEnabled() bool { // GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Source) GetEnabledOk() (*bool, bool) { - if o == nil || o.Enabled == nil { + if o == nil || IsNil(o.Enabled) { return nil, false } return o.Enabled, true @@ -163,7 +165,7 @@ func (o *Source) GetEnabledOk() (*bool, bool) { // HasEnabled returns a boolean if a field has been set. func (o *Source) HasEnabled() bool { - if o != nil && o.Enabled != nil { + if o != nil && !IsNil(o.Enabled) { return true } @@ -177,7 +179,7 @@ func (o *Source) SetEnabled(v bool) { // GetAuthenticationFlow returns the AuthenticationFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *Source) GetAuthenticationFlow() string { - if o == nil || o.AuthenticationFlow.Get() == nil { + if o == nil || IsNil(o.AuthenticationFlow.Get()) { var ret string return ret } @@ -220,7 +222,7 @@ func (o *Source) UnsetAuthenticationFlow() { // GetEnrollmentFlow returns the EnrollmentFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *Source) GetEnrollmentFlow() string { - if o == nil || o.EnrollmentFlow.Get() == nil { + if o == nil || IsNil(o.EnrollmentFlow.Get()) { var ret string return ret } @@ -359,7 +361,7 @@ func (o *Source) SetMetaModelName(v string) { // GetPolicyEngineMode returns the PolicyEngineMode field value if set, zero value otherwise. func (o *Source) GetPolicyEngineMode() PolicyEngineMode { - if o == nil || o.PolicyEngineMode == nil { + if o == nil || IsNil(o.PolicyEngineMode) { var ret PolicyEngineMode return ret } @@ -369,7 +371,7 @@ func (o *Source) GetPolicyEngineMode() PolicyEngineMode { // GetPolicyEngineModeOk returns a tuple with the PolicyEngineMode field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Source) GetPolicyEngineModeOk() (*PolicyEngineMode, bool) { - if o == nil || o.PolicyEngineMode == nil { + if o == nil || IsNil(o.PolicyEngineMode) { return nil, false } return o.PolicyEngineMode, true @@ -377,7 +379,7 @@ func (o *Source) GetPolicyEngineModeOk() (*PolicyEngineMode, bool) { // HasPolicyEngineMode returns a boolean if a field has been set. func (o *Source) HasPolicyEngineMode() bool { - if o != nil && o.PolicyEngineMode != nil { + if o != nil && !IsNil(o.PolicyEngineMode) { return true } @@ -389,47 +391,36 @@ func (o *Source) SetPolicyEngineMode(v PolicyEngineMode) { o.PolicyEngineMode = &v } -// GetUserMatchingMode returns the UserMatchingMode field value if set, zero value otherwise (both if not set or set to explicit null). +// GetUserMatchingMode returns the UserMatchingMode field value if set, zero value otherwise. func (o *Source) GetUserMatchingMode() UserMatchingModeEnum { - if o == nil || o.UserMatchingMode.Get() == nil { + if o == nil || IsNil(o.UserMatchingMode) { var ret UserMatchingModeEnum return ret } - return *o.UserMatchingMode.Get() + return *o.UserMatchingMode } // GetUserMatchingModeOk returns a tuple with the UserMatchingMode field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Source) GetUserMatchingModeOk() (*UserMatchingModeEnum, bool) { - if o == nil { + if o == nil || IsNil(o.UserMatchingMode) { return nil, false } - return o.UserMatchingMode.Get(), o.UserMatchingMode.IsSet() + return o.UserMatchingMode, true } // HasUserMatchingMode returns a boolean if a field has been set. func (o *Source) HasUserMatchingMode() bool { - if o != nil && o.UserMatchingMode.IsSet() { + if o != nil && !IsNil(o.UserMatchingMode) { return true } return false } -// SetUserMatchingMode gets a reference to the given NullableUserMatchingModeEnum and assigns it to the UserMatchingMode field. +// SetUserMatchingMode gets a reference to the given UserMatchingModeEnum and assigns it to the UserMatchingMode field. func (o *Source) SetUserMatchingMode(v UserMatchingModeEnum) { - o.UserMatchingMode.Set(&v) -} - -// SetUserMatchingModeNil sets the value for UserMatchingMode to be an explicit nil -func (o *Source) SetUserMatchingModeNil() { - o.UserMatchingMode.Set(nil) -} - -// UnsetUserMatchingMode ensures that no value is present for UserMatchingMode, not even an explicit nil -func (o *Source) UnsetUserMatchingMode() { - o.UserMatchingMode.Unset() + o.UserMatchingMode = &v } // GetManaged returns the Managed field value @@ -460,7 +451,7 @@ func (o *Source) SetManaged(v string) { // GetUserPathTemplate returns the UserPathTemplate field value if set, zero value otherwise. func (o *Source) GetUserPathTemplate() string { - if o == nil || o.UserPathTemplate == nil { + if o == nil || IsNil(o.UserPathTemplate) { var ret string return ret } @@ -470,7 +461,7 @@ func (o *Source) GetUserPathTemplate() string { // GetUserPathTemplateOk returns a tuple with the UserPathTemplate field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Source) GetUserPathTemplateOk() (*string, bool) { - if o == nil || o.UserPathTemplate == nil { + if o == nil || IsNil(o.UserPathTemplate) { return nil, false } return o.UserPathTemplate, true @@ -478,7 +469,7 @@ func (o *Source) GetUserPathTemplateOk() (*string, bool) { // HasUserPathTemplate returns a boolean if a field has been set. func (o *Source) HasUserPathTemplate() bool { - if o != nil && o.UserPathTemplate != nil { + if o != nil && !IsNil(o.UserPathTemplate) { return true } @@ -517,17 +508,19 @@ func (o *Source) SetIcon(v string) { } func (o Source) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if true { - toSerialize["slug"] = o.Slug - } - if o.Enabled != nil { + return json.Marshal(toSerialize) +} + +func (o Source) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name + toSerialize["slug"] = o.Slug + if !IsNil(o.Enabled) { toSerialize["enabled"] = o.Enabled } if o.AuthenticationFlow.IsSet() { @@ -536,34 +529,22 @@ func (o Source) MarshalJSON() ([]byte, error) { if o.EnrollmentFlow.IsSet() { toSerialize["enrollment_flow"] = o.EnrollmentFlow.Get() } - if true { - toSerialize["component"] = o.Component - } - if true { - toSerialize["verbose_name"] = o.VerboseName - } - if true { - toSerialize["verbose_name_plural"] = o.VerboseNamePlural - } - if true { - toSerialize["meta_model_name"] = o.MetaModelName - } - if o.PolicyEngineMode != nil { + // skip: component is readOnly + // skip: verbose_name is readOnly + // skip: verbose_name_plural is readOnly + // skip: meta_model_name is readOnly + if !IsNil(o.PolicyEngineMode) { toSerialize["policy_engine_mode"] = o.PolicyEngineMode } - if o.UserMatchingMode.IsSet() { - toSerialize["user_matching_mode"] = o.UserMatchingMode.Get() - } - if true { - toSerialize["managed"] = o.Managed.Get() + if !IsNil(o.UserMatchingMode) { + toSerialize["user_matching_mode"] = o.UserMatchingMode } - if o.UserPathTemplate != nil { + toSerialize["managed"] = o.Managed.Get() + if !IsNil(o.UserPathTemplate) { toSerialize["user_path_template"] = o.UserPathTemplate } - if true { - toSerialize["icon"] = o.Icon.Get() - } - return json.Marshal(toSerialize) + toSerialize["icon"] = o.Icon.Get() + return toSerialize, nil } type NullableSource struct { diff --git a/model_source_request.go b/model_source_request.go index 1fb13e1fd..6d1dc59ee 100644 --- a/model_source_request.go +++ b/model_source_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the SourceRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SourceRequest{} + // SourceRequest Source Serializer type SourceRequest struct { // Source's display Name. @@ -25,11 +28,10 @@ type SourceRequest struct { // Flow to use when authenticating existing users. AuthenticationFlow NullableString `json:"authentication_flow,omitempty"` // Flow to use when enrolling new users. - EnrollmentFlow NullableString `json:"enrollment_flow,omitempty"` - PolicyEngineMode *PolicyEngineMode `json:"policy_engine_mode,omitempty"` - // How the source determines if an existing user should be authenticated or a new user enrolled. * `identifier` - Use the source-specific identifier * `email_link` - Link to a user with identical email address. Can have security implications when a source doesn't validate email addresses. * `email_deny` - Use the user's email address, but deny enrollment when the email address already exists. * `username_link` - Link to a user with identical username. Can have security implications when a username is used with another source. * `username_deny` - Use the user's username, but deny enrollment when the username already exists. - UserMatchingMode NullableUserMatchingModeEnum `json:"user_matching_mode,omitempty"` - UserPathTemplate *string `json:"user_path_template,omitempty"` + EnrollmentFlow NullableString `json:"enrollment_flow,omitempty"` + PolicyEngineMode *PolicyEngineMode `json:"policy_engine_mode,omitempty"` + UserMatchingMode *UserMatchingModeEnum `json:"user_matching_mode,omitempty"` + UserPathTemplate *string `json:"user_path_template,omitempty"` } // NewSourceRequest instantiates a new SourceRequest object @@ -101,7 +103,7 @@ func (o *SourceRequest) SetSlug(v string) { // GetEnabled returns the Enabled field value if set, zero value otherwise. func (o *SourceRequest) GetEnabled() bool { - if o == nil || o.Enabled == nil { + if o == nil || IsNil(o.Enabled) { var ret bool return ret } @@ -111,7 +113,7 @@ func (o *SourceRequest) GetEnabled() bool { // GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SourceRequest) GetEnabledOk() (*bool, bool) { - if o == nil || o.Enabled == nil { + if o == nil || IsNil(o.Enabled) { return nil, false } return o.Enabled, true @@ -119,7 +121,7 @@ func (o *SourceRequest) GetEnabledOk() (*bool, bool) { // HasEnabled returns a boolean if a field has been set. func (o *SourceRequest) HasEnabled() bool { - if o != nil && o.Enabled != nil { + if o != nil && !IsNil(o.Enabled) { return true } @@ -133,7 +135,7 @@ func (o *SourceRequest) SetEnabled(v bool) { // GetAuthenticationFlow returns the AuthenticationFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *SourceRequest) GetAuthenticationFlow() string { - if o == nil || o.AuthenticationFlow.Get() == nil { + if o == nil || IsNil(o.AuthenticationFlow.Get()) { var ret string return ret } @@ -176,7 +178,7 @@ func (o *SourceRequest) UnsetAuthenticationFlow() { // GetEnrollmentFlow returns the EnrollmentFlow field value if set, zero value otherwise (both if not set or set to explicit null). func (o *SourceRequest) GetEnrollmentFlow() string { - if o == nil || o.EnrollmentFlow.Get() == nil { + if o == nil || IsNil(o.EnrollmentFlow.Get()) { var ret string return ret } @@ -219,7 +221,7 @@ func (o *SourceRequest) UnsetEnrollmentFlow() { // GetPolicyEngineMode returns the PolicyEngineMode field value if set, zero value otherwise. func (o *SourceRequest) GetPolicyEngineMode() PolicyEngineMode { - if o == nil || o.PolicyEngineMode == nil { + if o == nil || IsNil(o.PolicyEngineMode) { var ret PolicyEngineMode return ret } @@ -229,7 +231,7 @@ func (o *SourceRequest) GetPolicyEngineMode() PolicyEngineMode { // GetPolicyEngineModeOk returns a tuple with the PolicyEngineMode field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SourceRequest) GetPolicyEngineModeOk() (*PolicyEngineMode, bool) { - if o == nil || o.PolicyEngineMode == nil { + if o == nil || IsNil(o.PolicyEngineMode) { return nil, false } return o.PolicyEngineMode, true @@ -237,7 +239,7 @@ func (o *SourceRequest) GetPolicyEngineModeOk() (*PolicyEngineMode, bool) { // HasPolicyEngineMode returns a boolean if a field has been set. func (o *SourceRequest) HasPolicyEngineMode() bool { - if o != nil && o.PolicyEngineMode != nil { + if o != nil && !IsNil(o.PolicyEngineMode) { return true } @@ -249,52 +251,41 @@ func (o *SourceRequest) SetPolicyEngineMode(v PolicyEngineMode) { o.PolicyEngineMode = &v } -// GetUserMatchingMode returns the UserMatchingMode field value if set, zero value otherwise (both if not set or set to explicit null). +// GetUserMatchingMode returns the UserMatchingMode field value if set, zero value otherwise. func (o *SourceRequest) GetUserMatchingMode() UserMatchingModeEnum { - if o == nil || o.UserMatchingMode.Get() == nil { + if o == nil || IsNil(o.UserMatchingMode) { var ret UserMatchingModeEnum return ret } - return *o.UserMatchingMode.Get() + return *o.UserMatchingMode } // GetUserMatchingModeOk returns a tuple with the UserMatchingMode field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *SourceRequest) GetUserMatchingModeOk() (*UserMatchingModeEnum, bool) { - if o == nil { + if o == nil || IsNil(o.UserMatchingMode) { return nil, false } - return o.UserMatchingMode.Get(), o.UserMatchingMode.IsSet() + return o.UserMatchingMode, true } // HasUserMatchingMode returns a boolean if a field has been set. func (o *SourceRequest) HasUserMatchingMode() bool { - if o != nil && o.UserMatchingMode.IsSet() { + if o != nil && !IsNil(o.UserMatchingMode) { return true } return false } -// SetUserMatchingMode gets a reference to the given NullableUserMatchingModeEnum and assigns it to the UserMatchingMode field. +// SetUserMatchingMode gets a reference to the given UserMatchingModeEnum and assigns it to the UserMatchingMode field. func (o *SourceRequest) SetUserMatchingMode(v UserMatchingModeEnum) { - o.UserMatchingMode.Set(&v) -} - -// SetUserMatchingModeNil sets the value for UserMatchingMode to be an explicit nil -func (o *SourceRequest) SetUserMatchingModeNil() { - o.UserMatchingMode.Set(nil) -} - -// UnsetUserMatchingMode ensures that no value is present for UserMatchingMode, not even an explicit nil -func (o *SourceRequest) UnsetUserMatchingMode() { - o.UserMatchingMode.Unset() + o.UserMatchingMode = &v } // GetUserPathTemplate returns the UserPathTemplate field value if set, zero value otherwise. func (o *SourceRequest) GetUserPathTemplate() string { - if o == nil || o.UserPathTemplate == nil { + if o == nil || IsNil(o.UserPathTemplate) { var ret string return ret } @@ -304,7 +295,7 @@ func (o *SourceRequest) GetUserPathTemplate() string { // GetUserPathTemplateOk returns a tuple with the UserPathTemplate field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SourceRequest) GetUserPathTemplateOk() (*string, bool) { - if o == nil || o.UserPathTemplate == nil { + if o == nil || IsNil(o.UserPathTemplate) { return nil, false } return o.UserPathTemplate, true @@ -312,7 +303,7 @@ func (o *SourceRequest) GetUserPathTemplateOk() (*string, bool) { // HasUserPathTemplate returns a boolean if a field has been set. func (o *SourceRequest) HasUserPathTemplate() bool { - if o != nil && o.UserPathTemplate != nil { + if o != nil && !IsNil(o.UserPathTemplate) { return true } @@ -325,14 +316,18 @@ func (o *SourceRequest) SetUserPathTemplate(v string) { } func (o SourceRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["slug"] = o.Slug + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.Enabled != nil { + return json.Marshal(toSerialize) +} + +func (o SourceRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["slug"] = o.Slug + if !IsNil(o.Enabled) { toSerialize["enabled"] = o.Enabled } if o.AuthenticationFlow.IsSet() { @@ -341,16 +336,16 @@ func (o SourceRequest) MarshalJSON() ([]byte, error) { if o.EnrollmentFlow.IsSet() { toSerialize["enrollment_flow"] = o.EnrollmentFlow.Get() } - if o.PolicyEngineMode != nil { + if !IsNil(o.PolicyEngineMode) { toSerialize["policy_engine_mode"] = o.PolicyEngineMode } - if o.UserMatchingMode.IsSet() { - toSerialize["user_matching_mode"] = o.UserMatchingMode.Get() + if !IsNil(o.UserMatchingMode) { + toSerialize["user_matching_mode"] = o.UserMatchingMode } - if o.UserPathTemplate != nil { + if !IsNil(o.UserPathTemplate) { toSerialize["user_path_template"] = o.UserPathTemplate } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableSourceRequest struct { diff --git a/model_source_type.go b/model_source_type.go index cbb4a37af..501ddda2d 100644 --- a/model_source_type.go +++ b/model_source_type.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the SourceType type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SourceType{} + // SourceType Serializer for SourceType type SourceType struct { Name string `json:"name"` @@ -227,31 +230,25 @@ func (o *SourceType) SetProfileUrl(v string) { } func (o SourceType) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["slug"] = o.Slug - } - if true { - toSerialize["urls_customizable"] = o.UrlsCustomizable - } - if true { - toSerialize["request_token_url"] = o.RequestTokenUrl.Get() - } - if true { - toSerialize["authorization_url"] = o.AuthorizationUrl.Get() - } - if true { - toSerialize["access_token_url"] = o.AccessTokenUrl.Get() - } - if true { - toSerialize["profile_url"] = o.ProfileUrl.Get() + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o SourceType) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["slug"] = o.Slug + toSerialize["urls_customizable"] = o.UrlsCustomizable + toSerialize["request_token_url"] = o.RequestTokenUrl.Get() + toSerialize["authorization_url"] = o.AuthorizationUrl.Get() + toSerialize["access_token_url"] = o.AccessTokenUrl.Get() + toSerialize["profile_url"] = o.ProfileUrl.Get() + return toSerialize, nil +} + type NullableSourceType struct { value *SourceType isSet bool diff --git a/model_stage.go b/model_stage.go index 36eb3e6f6..25ea87951 100644 --- a/model_stage.go +++ b/model_stage.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the Stage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Stage{} + // Stage Stage Serializer type Stage struct { Pk string `json:"pk"` @@ -199,7 +202,7 @@ func (o *Stage) SetMetaModelName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *Stage) GetFlowSet() []FlowSet { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSet return ret } @@ -209,7 +212,7 @@ func (o *Stage) GetFlowSet() []FlowSet { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Stage) GetFlowSetOk() ([]FlowSet, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -217,7 +220,7 @@ func (o *Stage) GetFlowSetOk() ([]FlowSet, bool) { // HasFlowSet returns a boolean if a field has been set. func (o *Stage) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -230,29 +233,25 @@ func (o *Stage) SetFlowSet(v []FlowSet) { } func (o Stage) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["component"] = o.Component - } - if true { - toSerialize["verbose_name"] = o.VerboseName - } - if true { - toSerialize["verbose_name_plural"] = o.VerboseNamePlural + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if true { - toSerialize["meta_model_name"] = o.MetaModelName - } - if o.FlowSet != nil { + return json.Marshal(toSerialize) +} + +func (o Stage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name + // skip: component is readOnly + // skip: verbose_name is readOnly + // skip: verbose_name_plural is readOnly + // skip: meta_model_name is readOnly + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableStage struct { diff --git a/model_stage_prompt.go b/model_stage_prompt.go index 0bd3df394..17f28b2a3 100644 --- a/model_stage_prompt.go +++ b/model_stage_prompt.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the StagePrompt type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &StagePrompt{} + // StagePrompt Serializer for a single Prompt field type StagePrompt struct { FieldKey string `json:"field_key"` @@ -235,7 +238,7 @@ func (o *StagePrompt) GetChoices() []string { // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *StagePrompt) GetChoicesOk() ([]string, bool) { - if o == nil || o.Choices == nil { + if o == nil || IsNil(o.Choices) { return nil, false } return o.Choices, true @@ -247,32 +250,26 @@ func (o *StagePrompt) SetChoices(v []string) { } func (o StagePrompt) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["field_key"] = o.FieldKey - } - if true { - toSerialize["label"] = o.Label - } - if true { - toSerialize["type"] = o.Type - } - if true { - toSerialize["required"] = o.Required - } - if true { - toSerialize["placeholder"] = o.Placeholder - } - if true { - toSerialize["order"] = o.Order - } - if true { - toSerialize["sub_text"] = o.SubText + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } + return json.Marshal(toSerialize) +} + +func (o StagePrompt) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["field_key"] = o.FieldKey + toSerialize["label"] = o.Label + toSerialize["type"] = o.Type + toSerialize["required"] = o.Required + toSerialize["placeholder"] = o.Placeholder + toSerialize["order"] = o.Order + toSerialize["sub_text"] = o.SubText if o.Choices != nil { toSerialize["choices"] = o.Choices } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableStagePrompt struct { diff --git a/model_stage_request.go b/model_stage_request.go index afe3d9968..3501db81e 100644 --- a/model_stage_request.go +++ b/model_stage_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the StageRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &StageRequest{} + // StageRequest Stage Serializer type StageRequest struct { Name string `json:"name"` @@ -65,7 +68,7 @@ func (o *StageRequest) SetName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *StageRequest) GetFlowSet() []FlowSetRequest { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSetRequest return ret } @@ -75,7 +78,7 @@ func (o *StageRequest) GetFlowSet() []FlowSetRequest { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *StageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -83,7 +86,7 @@ func (o *StageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { // HasFlowSet returns a boolean if a field has been set. func (o *StageRequest) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -96,14 +99,20 @@ func (o *StageRequest) SetFlowSet(v []FlowSetRequest) { } func (o StageRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.FlowSet != nil { + return json.Marshal(toSerialize) +} + +func (o StageRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableStageRequest struct { diff --git a/model_static_device.go b/model_static_device.go index 2932de79e..81ccbcd6f 100644 --- a/model_static_device.go +++ b/model_static_device.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the StaticDevice type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &StaticDevice{} + // StaticDevice Serializer for static authenticator devices type StaticDevice struct { // The human-readable name of this device. @@ -116,19 +119,21 @@ func (o *StaticDevice) SetPk(v int32) { } func (o StaticDevice) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["token_set"] = o.TokenSet - } - if true { - toSerialize["pk"] = o.Pk + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o StaticDevice) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + // skip: token_set is readOnly + // skip: pk is readOnly + return toSerialize, nil +} + type NullableStaticDevice struct { value *StaticDevice isSet bool diff --git a/model_static_device_request.go b/model_static_device_request.go index c3634e124..af436bdbd 100644 --- a/model_static_device_request.go +++ b/model_static_device_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the StaticDeviceRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &StaticDeviceRequest{} + // StaticDeviceRequest Serializer for static authenticator devices type StaticDeviceRequest struct { // The human-readable name of this device. @@ -64,13 +67,19 @@ func (o *StaticDeviceRequest) SetName(v string) { } func (o StaticDeviceRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o StaticDeviceRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + return toSerialize, nil +} + type NullableStaticDeviceRequest struct { value *StaticDeviceRequest isSet bool diff --git a/model_static_device_token.go b/model_static_device_token.go index fbd4f35f4..1d16be93d 100644 --- a/model_static_device_token.go +++ b/model_static_device_token.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the StaticDeviceToken type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &StaticDeviceToken{} + // StaticDeviceToken Serializer for static device's tokens type StaticDeviceToken struct { Token string `json:"token"` @@ -63,13 +66,19 @@ func (o *StaticDeviceToken) SetToken(v string) { } func (o StaticDeviceToken) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["token"] = o.Token + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o StaticDeviceToken) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["token"] = o.Token + return toSerialize, nil +} + type NullableStaticDeviceToken struct { value *StaticDeviceToken isSet bool diff --git a/model_static_device_token_request.go b/model_static_device_token_request.go index 76beae151..fc85a592b 100644 --- a/model_static_device_token_request.go +++ b/model_static_device_token_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the StaticDeviceTokenRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &StaticDeviceTokenRequest{} + // StaticDeviceTokenRequest Serializer for static device's tokens type StaticDeviceTokenRequest struct { Token string `json:"token"` @@ -63,13 +66,19 @@ func (o *StaticDeviceTokenRequest) SetToken(v string) { } func (o StaticDeviceTokenRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["token"] = o.Token + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o StaticDeviceTokenRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["token"] = o.Token + return toSerialize, nil +} + type NullableStaticDeviceTokenRequest struct { value *StaticDeviceTokenRequest isSet bool diff --git a/model_system.go b/model_system.go index c113f6b7f..6a3bc9731 100644 --- a/model_system.go +++ b/model_system.go @@ -16,6 +16,9 @@ import ( "time" ) +// checks if the System type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &System{} + // System Get system information. type System struct { // Get Environment @@ -253,34 +256,26 @@ func (o *System) SetEmbeddedOutpostHost(v string) { } func (o System) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["env"] = o.Env - } - if true { - toSerialize["http_headers"] = o.HttpHeaders - } - if true { - toSerialize["http_host"] = o.HttpHost - } - if true { - toSerialize["http_is_secure"] = o.HttpIsSecure - } - if true { - toSerialize["runtime"] = o.Runtime - } - if true { - toSerialize["tenant"] = o.Tenant - } - if true { - toSerialize["server_time"] = o.ServerTime - } - if true { - toSerialize["embedded_outpost_host"] = o.EmbeddedOutpostHost + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o System) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: env is readOnly + // skip: http_headers is readOnly + // skip: http_host is readOnly + // skip: http_is_secure is readOnly + toSerialize["runtime"] = o.Runtime + // skip: tenant is readOnly + // skip: server_time is readOnly + // skip: embedded_outpost_host is readOnly + return toSerialize, nil +} + type NullableSystem struct { value *System isSet bool diff --git a/model_system_runtime.go b/model_system_runtime.go index e3b55f209..a4ebd8ddf 100644 --- a/model_system_runtime.go +++ b/model_system_runtime.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the SystemRuntime type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SystemRuntime{} + // SystemRuntime Get versions type SystemRuntime struct { PythonVersion string `json:"python_version"` @@ -193,28 +196,24 @@ func (o *SystemRuntime) SetUname(v string) { } func (o SystemRuntime) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["python_version"] = o.PythonVersion - } - if true { - toSerialize["gunicorn_version"] = o.GunicornVersion - } - if true { - toSerialize["environment"] = o.Environment - } - if true { - toSerialize["architecture"] = o.Architecture - } - if true { - toSerialize["platform"] = o.Platform - } - if true { - toSerialize["uname"] = o.Uname + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o SystemRuntime) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["python_version"] = o.PythonVersion + toSerialize["gunicorn_version"] = o.GunicornVersion + toSerialize["environment"] = o.Environment + toSerialize["architecture"] = o.Architecture + toSerialize["platform"] = o.Platform + toSerialize["uname"] = o.Uname + return toSerialize, nil +} + type NullableSystemRuntime struct { value *SystemRuntime isSet bool diff --git a/model_task.go b/model_task.go index e1c3e2b67..df12a0df0 100644 --- a/model_task.go +++ b/model_task.go @@ -16,6 +16,9 @@ import ( "time" ) +// checks if the Task type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Task{} + // Task Serialize TaskInfo and TaskResult type Task struct { TaskName string `json:"task_name"` @@ -195,28 +198,24 @@ func (o *Task) SetMessages(v []interface{}) { } func (o Task) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["task_name"] = o.TaskName - } - if true { - toSerialize["task_description"] = o.TaskDescription - } - if true { - toSerialize["task_finish_timestamp"] = o.TaskFinishTimestamp - } - if true { - toSerialize["task_duration"] = o.TaskDuration - } - if true { - toSerialize["status"] = o.Status - } - if true { - toSerialize["messages"] = o.Messages + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o Task) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["task_name"] = o.TaskName + toSerialize["task_description"] = o.TaskDescription + toSerialize["task_finish_timestamp"] = o.TaskFinishTimestamp + // skip: task_duration is readOnly + toSerialize["status"] = o.Status + toSerialize["messages"] = o.Messages + return toSerialize, nil +} + type NullableTask struct { value *Task isSet bool diff --git a/model_tenant.go b/model_tenant.go index 2618f4f4d..5e6251309 100644 --- a/model_tenant.go +++ b/model_tenant.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the Tenant type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Tenant{} + // Tenant Tenant Serializer type Tenant struct { TenantUuid string `json:"tenant_uuid"` @@ -106,7 +109,7 @@ func (o *Tenant) SetDomain(v string) { // GetDefault returns the Default field value if set, zero value otherwise. func (o *Tenant) GetDefault() bool { - if o == nil || o.Default == nil { + if o == nil || IsNil(o.Default) { var ret bool return ret } @@ -116,7 +119,7 @@ func (o *Tenant) GetDefault() bool { // GetDefaultOk returns a tuple with the Default field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Tenant) GetDefaultOk() (*bool, bool) { - if o == nil || o.Default == nil { + if o == nil || IsNil(o.Default) { return nil, false } return o.Default, true @@ -124,7 +127,7 @@ func (o *Tenant) GetDefaultOk() (*bool, bool) { // HasDefault returns a boolean if a field has been set. func (o *Tenant) HasDefault() bool { - if o != nil && o.Default != nil { + if o != nil && !IsNil(o.Default) { return true } @@ -138,7 +141,7 @@ func (o *Tenant) SetDefault(v bool) { // GetBrandingTitle returns the BrandingTitle field value if set, zero value otherwise. func (o *Tenant) GetBrandingTitle() string { - if o == nil || o.BrandingTitle == nil { + if o == nil || IsNil(o.BrandingTitle) { var ret string return ret } @@ -148,7 +151,7 @@ func (o *Tenant) GetBrandingTitle() string { // GetBrandingTitleOk returns a tuple with the BrandingTitle field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Tenant) GetBrandingTitleOk() (*string, bool) { - if o == nil || o.BrandingTitle == nil { + if o == nil || IsNil(o.BrandingTitle) { return nil, false } return o.BrandingTitle, true @@ -156,7 +159,7 @@ func (o *Tenant) GetBrandingTitleOk() (*string, bool) { // HasBrandingTitle returns a boolean if a field has been set. func (o *Tenant) HasBrandingTitle() bool { - if o != nil && o.BrandingTitle != nil { + if o != nil && !IsNil(o.BrandingTitle) { return true } @@ -170,7 +173,7 @@ func (o *Tenant) SetBrandingTitle(v string) { // GetBrandingLogo returns the BrandingLogo field value if set, zero value otherwise. func (o *Tenant) GetBrandingLogo() string { - if o == nil || o.BrandingLogo == nil { + if o == nil || IsNil(o.BrandingLogo) { var ret string return ret } @@ -180,7 +183,7 @@ func (o *Tenant) GetBrandingLogo() string { // GetBrandingLogoOk returns a tuple with the BrandingLogo field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Tenant) GetBrandingLogoOk() (*string, bool) { - if o == nil || o.BrandingLogo == nil { + if o == nil || IsNil(o.BrandingLogo) { return nil, false } return o.BrandingLogo, true @@ -188,7 +191,7 @@ func (o *Tenant) GetBrandingLogoOk() (*string, bool) { // HasBrandingLogo returns a boolean if a field has been set. func (o *Tenant) HasBrandingLogo() bool { - if o != nil && o.BrandingLogo != nil { + if o != nil && !IsNil(o.BrandingLogo) { return true } @@ -202,7 +205,7 @@ func (o *Tenant) SetBrandingLogo(v string) { // GetBrandingFavicon returns the BrandingFavicon field value if set, zero value otherwise. func (o *Tenant) GetBrandingFavicon() string { - if o == nil || o.BrandingFavicon == nil { + if o == nil || IsNil(o.BrandingFavicon) { var ret string return ret } @@ -212,7 +215,7 @@ func (o *Tenant) GetBrandingFavicon() string { // GetBrandingFaviconOk returns a tuple with the BrandingFavicon field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Tenant) GetBrandingFaviconOk() (*string, bool) { - if o == nil || o.BrandingFavicon == nil { + if o == nil || IsNil(o.BrandingFavicon) { return nil, false } return o.BrandingFavicon, true @@ -220,7 +223,7 @@ func (o *Tenant) GetBrandingFaviconOk() (*string, bool) { // HasBrandingFavicon returns a boolean if a field has been set. func (o *Tenant) HasBrandingFavicon() bool { - if o != nil && o.BrandingFavicon != nil { + if o != nil && !IsNil(o.BrandingFavicon) { return true } @@ -234,7 +237,7 @@ func (o *Tenant) SetBrandingFavicon(v string) { // GetFlowAuthentication returns the FlowAuthentication field value if set, zero value otherwise (both if not set or set to explicit null). func (o *Tenant) GetFlowAuthentication() string { - if o == nil || o.FlowAuthentication.Get() == nil { + if o == nil || IsNil(o.FlowAuthentication.Get()) { var ret string return ret } @@ -277,7 +280,7 @@ func (o *Tenant) UnsetFlowAuthentication() { // GetFlowInvalidation returns the FlowInvalidation field value if set, zero value otherwise (both if not set or set to explicit null). func (o *Tenant) GetFlowInvalidation() string { - if o == nil || o.FlowInvalidation.Get() == nil { + if o == nil || IsNil(o.FlowInvalidation.Get()) { var ret string return ret } @@ -320,7 +323,7 @@ func (o *Tenant) UnsetFlowInvalidation() { // GetFlowRecovery returns the FlowRecovery field value if set, zero value otherwise (both if not set or set to explicit null). func (o *Tenant) GetFlowRecovery() string { - if o == nil || o.FlowRecovery.Get() == nil { + if o == nil || IsNil(o.FlowRecovery.Get()) { var ret string return ret } @@ -363,7 +366,7 @@ func (o *Tenant) UnsetFlowRecovery() { // GetFlowUnenrollment returns the FlowUnenrollment field value if set, zero value otherwise (both if not set or set to explicit null). func (o *Tenant) GetFlowUnenrollment() string { - if o == nil || o.FlowUnenrollment.Get() == nil { + if o == nil || IsNil(o.FlowUnenrollment.Get()) { var ret string return ret } @@ -406,7 +409,7 @@ func (o *Tenant) UnsetFlowUnenrollment() { // GetFlowUserSettings returns the FlowUserSettings field value if set, zero value otherwise (both if not set or set to explicit null). func (o *Tenant) GetFlowUserSettings() string { - if o == nil || o.FlowUserSettings.Get() == nil { + if o == nil || IsNil(o.FlowUserSettings.Get()) { var ret string return ret } @@ -449,7 +452,7 @@ func (o *Tenant) UnsetFlowUserSettings() { // GetFlowDeviceCode returns the FlowDeviceCode field value if set, zero value otherwise (both if not set or set to explicit null). func (o *Tenant) GetFlowDeviceCode() string { - if o == nil || o.FlowDeviceCode.Get() == nil { + if o == nil || IsNil(o.FlowDeviceCode.Get()) { var ret string return ret } @@ -492,7 +495,7 @@ func (o *Tenant) UnsetFlowDeviceCode() { // GetEventRetention returns the EventRetention field value if set, zero value otherwise. func (o *Tenant) GetEventRetention() string { - if o == nil || o.EventRetention == nil { + if o == nil || IsNil(o.EventRetention) { var ret string return ret } @@ -502,7 +505,7 @@ func (o *Tenant) GetEventRetention() string { // GetEventRetentionOk returns a tuple with the EventRetention field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Tenant) GetEventRetentionOk() (*string, bool) { - if o == nil || o.EventRetention == nil { + if o == nil || IsNil(o.EventRetention) { return nil, false } return o.EventRetention, true @@ -510,7 +513,7 @@ func (o *Tenant) GetEventRetentionOk() (*string, bool) { // HasEventRetention returns a boolean if a field has been set. func (o *Tenant) HasEventRetention() bool { - if o != nil && o.EventRetention != nil { + if o != nil && !IsNil(o.EventRetention) { return true } @@ -524,7 +527,7 @@ func (o *Tenant) SetEventRetention(v string) { // GetWebCertificate returns the WebCertificate field value if set, zero value otherwise (both if not set or set to explicit null). func (o *Tenant) GetWebCertificate() string { - if o == nil || o.WebCertificate.Get() == nil { + if o == nil || IsNil(o.WebCertificate.Get()) { var ret string return ret } @@ -567,7 +570,7 @@ func (o *Tenant) UnsetWebCertificate() { // GetAttributes returns the Attributes field value if set, zero value otherwise. func (o *Tenant) GetAttributes() map[string]interface{} { - if o == nil || o.Attributes == nil { + if o == nil || IsNil(o.Attributes) { var ret map[string]interface{} return ret } @@ -577,15 +580,15 @@ func (o *Tenant) GetAttributes() map[string]interface{} { // GetAttributesOk returns a tuple with the Attributes field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Tenant) GetAttributesOk() (map[string]interface{}, bool) { - if o == nil || o.Attributes == nil { - return nil, false + if o == nil || IsNil(o.Attributes) { + return map[string]interface{}{}, false } return o.Attributes, true } // HasAttributes returns a boolean if a field has been set. func (o *Tenant) HasAttributes() bool { - if o != nil && o.Attributes != nil { + if o != nil && !IsNil(o.Attributes) { return true } @@ -598,23 +601,27 @@ func (o *Tenant) SetAttributes(v map[string]interface{}) { } func (o Tenant) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["tenant_uuid"] = o.TenantUuid + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if true { - toSerialize["domain"] = o.Domain - } - if o.Default != nil { + return json.Marshal(toSerialize) +} + +func (o Tenant) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: tenant_uuid is readOnly + toSerialize["domain"] = o.Domain + if !IsNil(o.Default) { toSerialize["default"] = o.Default } - if o.BrandingTitle != nil { + if !IsNil(o.BrandingTitle) { toSerialize["branding_title"] = o.BrandingTitle } - if o.BrandingLogo != nil { + if !IsNil(o.BrandingLogo) { toSerialize["branding_logo"] = o.BrandingLogo } - if o.BrandingFavicon != nil { + if !IsNil(o.BrandingFavicon) { toSerialize["branding_favicon"] = o.BrandingFavicon } if o.FlowAuthentication.IsSet() { @@ -635,16 +642,16 @@ func (o Tenant) MarshalJSON() ([]byte, error) { if o.FlowDeviceCode.IsSet() { toSerialize["flow_device_code"] = o.FlowDeviceCode.Get() } - if o.EventRetention != nil { + if !IsNil(o.EventRetention) { toSerialize["event_retention"] = o.EventRetention } if o.WebCertificate.IsSet() { toSerialize["web_certificate"] = o.WebCertificate.Get() } - if o.Attributes != nil { + if !IsNil(o.Attributes) { toSerialize["attributes"] = o.Attributes } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableTenant struct { diff --git a/model_tenant_request.go b/model_tenant_request.go index a3af49804..d5bb1e3ec 100644 --- a/model_tenant_request.go +++ b/model_tenant_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the TenantRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TenantRequest{} + // TenantRequest Tenant Serializer type TenantRequest struct { // Domain that activates this tenant. Can be a superset, i.e. `a.b` for `aa.b` and `ba.b` @@ -80,7 +83,7 @@ func (o *TenantRequest) SetDomain(v string) { // GetDefault returns the Default field value if set, zero value otherwise. func (o *TenantRequest) GetDefault() bool { - if o == nil || o.Default == nil { + if o == nil || IsNil(o.Default) { var ret bool return ret } @@ -90,7 +93,7 @@ func (o *TenantRequest) GetDefault() bool { // GetDefaultOk returns a tuple with the Default field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *TenantRequest) GetDefaultOk() (*bool, bool) { - if o == nil || o.Default == nil { + if o == nil || IsNil(o.Default) { return nil, false } return o.Default, true @@ -98,7 +101,7 @@ func (o *TenantRequest) GetDefaultOk() (*bool, bool) { // HasDefault returns a boolean if a field has been set. func (o *TenantRequest) HasDefault() bool { - if o != nil && o.Default != nil { + if o != nil && !IsNil(o.Default) { return true } @@ -112,7 +115,7 @@ func (o *TenantRequest) SetDefault(v bool) { // GetBrandingTitle returns the BrandingTitle field value if set, zero value otherwise. func (o *TenantRequest) GetBrandingTitle() string { - if o == nil || o.BrandingTitle == nil { + if o == nil || IsNil(o.BrandingTitle) { var ret string return ret } @@ -122,7 +125,7 @@ func (o *TenantRequest) GetBrandingTitle() string { // GetBrandingTitleOk returns a tuple with the BrandingTitle field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *TenantRequest) GetBrandingTitleOk() (*string, bool) { - if o == nil || o.BrandingTitle == nil { + if o == nil || IsNil(o.BrandingTitle) { return nil, false } return o.BrandingTitle, true @@ -130,7 +133,7 @@ func (o *TenantRequest) GetBrandingTitleOk() (*string, bool) { // HasBrandingTitle returns a boolean if a field has been set. func (o *TenantRequest) HasBrandingTitle() bool { - if o != nil && o.BrandingTitle != nil { + if o != nil && !IsNil(o.BrandingTitle) { return true } @@ -144,7 +147,7 @@ func (o *TenantRequest) SetBrandingTitle(v string) { // GetBrandingLogo returns the BrandingLogo field value if set, zero value otherwise. func (o *TenantRequest) GetBrandingLogo() string { - if o == nil || o.BrandingLogo == nil { + if o == nil || IsNil(o.BrandingLogo) { var ret string return ret } @@ -154,7 +157,7 @@ func (o *TenantRequest) GetBrandingLogo() string { // GetBrandingLogoOk returns a tuple with the BrandingLogo field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *TenantRequest) GetBrandingLogoOk() (*string, bool) { - if o == nil || o.BrandingLogo == nil { + if o == nil || IsNil(o.BrandingLogo) { return nil, false } return o.BrandingLogo, true @@ -162,7 +165,7 @@ func (o *TenantRequest) GetBrandingLogoOk() (*string, bool) { // HasBrandingLogo returns a boolean if a field has been set. func (o *TenantRequest) HasBrandingLogo() bool { - if o != nil && o.BrandingLogo != nil { + if o != nil && !IsNil(o.BrandingLogo) { return true } @@ -176,7 +179,7 @@ func (o *TenantRequest) SetBrandingLogo(v string) { // GetBrandingFavicon returns the BrandingFavicon field value if set, zero value otherwise. func (o *TenantRequest) GetBrandingFavicon() string { - if o == nil || o.BrandingFavicon == nil { + if o == nil || IsNil(o.BrandingFavicon) { var ret string return ret } @@ -186,7 +189,7 @@ func (o *TenantRequest) GetBrandingFavicon() string { // GetBrandingFaviconOk returns a tuple with the BrandingFavicon field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *TenantRequest) GetBrandingFaviconOk() (*string, bool) { - if o == nil || o.BrandingFavicon == nil { + if o == nil || IsNil(o.BrandingFavicon) { return nil, false } return o.BrandingFavicon, true @@ -194,7 +197,7 @@ func (o *TenantRequest) GetBrandingFaviconOk() (*string, bool) { // HasBrandingFavicon returns a boolean if a field has been set. func (o *TenantRequest) HasBrandingFavicon() bool { - if o != nil && o.BrandingFavicon != nil { + if o != nil && !IsNil(o.BrandingFavicon) { return true } @@ -208,7 +211,7 @@ func (o *TenantRequest) SetBrandingFavicon(v string) { // GetFlowAuthentication returns the FlowAuthentication field value if set, zero value otherwise (both if not set or set to explicit null). func (o *TenantRequest) GetFlowAuthentication() string { - if o == nil || o.FlowAuthentication.Get() == nil { + if o == nil || IsNil(o.FlowAuthentication.Get()) { var ret string return ret } @@ -251,7 +254,7 @@ func (o *TenantRequest) UnsetFlowAuthentication() { // GetFlowInvalidation returns the FlowInvalidation field value if set, zero value otherwise (both if not set or set to explicit null). func (o *TenantRequest) GetFlowInvalidation() string { - if o == nil || o.FlowInvalidation.Get() == nil { + if o == nil || IsNil(o.FlowInvalidation.Get()) { var ret string return ret } @@ -294,7 +297,7 @@ func (o *TenantRequest) UnsetFlowInvalidation() { // GetFlowRecovery returns the FlowRecovery field value if set, zero value otherwise (both if not set or set to explicit null). func (o *TenantRequest) GetFlowRecovery() string { - if o == nil || o.FlowRecovery.Get() == nil { + if o == nil || IsNil(o.FlowRecovery.Get()) { var ret string return ret } @@ -337,7 +340,7 @@ func (o *TenantRequest) UnsetFlowRecovery() { // GetFlowUnenrollment returns the FlowUnenrollment field value if set, zero value otherwise (both if not set or set to explicit null). func (o *TenantRequest) GetFlowUnenrollment() string { - if o == nil || o.FlowUnenrollment.Get() == nil { + if o == nil || IsNil(o.FlowUnenrollment.Get()) { var ret string return ret } @@ -380,7 +383,7 @@ func (o *TenantRequest) UnsetFlowUnenrollment() { // GetFlowUserSettings returns the FlowUserSettings field value if set, zero value otherwise (both if not set or set to explicit null). func (o *TenantRequest) GetFlowUserSettings() string { - if o == nil || o.FlowUserSettings.Get() == nil { + if o == nil || IsNil(o.FlowUserSettings.Get()) { var ret string return ret } @@ -423,7 +426,7 @@ func (o *TenantRequest) UnsetFlowUserSettings() { // GetFlowDeviceCode returns the FlowDeviceCode field value if set, zero value otherwise (both if not set or set to explicit null). func (o *TenantRequest) GetFlowDeviceCode() string { - if o == nil || o.FlowDeviceCode.Get() == nil { + if o == nil || IsNil(o.FlowDeviceCode.Get()) { var ret string return ret } @@ -466,7 +469,7 @@ func (o *TenantRequest) UnsetFlowDeviceCode() { // GetEventRetention returns the EventRetention field value if set, zero value otherwise. func (o *TenantRequest) GetEventRetention() string { - if o == nil || o.EventRetention == nil { + if o == nil || IsNil(o.EventRetention) { var ret string return ret } @@ -476,7 +479,7 @@ func (o *TenantRequest) GetEventRetention() string { // GetEventRetentionOk returns a tuple with the EventRetention field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *TenantRequest) GetEventRetentionOk() (*string, bool) { - if o == nil || o.EventRetention == nil { + if o == nil || IsNil(o.EventRetention) { return nil, false } return o.EventRetention, true @@ -484,7 +487,7 @@ func (o *TenantRequest) GetEventRetentionOk() (*string, bool) { // HasEventRetention returns a boolean if a field has been set. func (o *TenantRequest) HasEventRetention() bool { - if o != nil && o.EventRetention != nil { + if o != nil && !IsNil(o.EventRetention) { return true } @@ -498,7 +501,7 @@ func (o *TenantRequest) SetEventRetention(v string) { // GetWebCertificate returns the WebCertificate field value if set, zero value otherwise (both if not set or set to explicit null). func (o *TenantRequest) GetWebCertificate() string { - if o == nil || o.WebCertificate.Get() == nil { + if o == nil || IsNil(o.WebCertificate.Get()) { var ret string return ret } @@ -541,7 +544,7 @@ func (o *TenantRequest) UnsetWebCertificate() { // GetAttributes returns the Attributes field value if set, zero value otherwise. func (o *TenantRequest) GetAttributes() map[string]interface{} { - if o == nil || o.Attributes == nil { + if o == nil || IsNil(o.Attributes) { var ret map[string]interface{} return ret } @@ -551,15 +554,15 @@ func (o *TenantRequest) GetAttributes() map[string]interface{} { // GetAttributesOk returns a tuple with the Attributes field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *TenantRequest) GetAttributesOk() (map[string]interface{}, bool) { - if o == nil || o.Attributes == nil { - return nil, false + if o == nil || IsNil(o.Attributes) { + return map[string]interface{}{}, false } return o.Attributes, true } // HasAttributes returns a boolean if a field has been set. func (o *TenantRequest) HasAttributes() bool { - if o != nil && o.Attributes != nil { + if o != nil && !IsNil(o.Attributes) { return true } @@ -572,20 +575,26 @@ func (o *TenantRequest) SetAttributes(v map[string]interface{}) { } func (o TenantRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["domain"] = o.Domain + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.Default != nil { + return json.Marshal(toSerialize) +} + +func (o TenantRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["domain"] = o.Domain + if !IsNil(o.Default) { toSerialize["default"] = o.Default } - if o.BrandingTitle != nil { + if !IsNil(o.BrandingTitle) { toSerialize["branding_title"] = o.BrandingTitle } - if o.BrandingLogo != nil { + if !IsNil(o.BrandingLogo) { toSerialize["branding_logo"] = o.BrandingLogo } - if o.BrandingFavicon != nil { + if !IsNil(o.BrandingFavicon) { toSerialize["branding_favicon"] = o.BrandingFavicon } if o.FlowAuthentication.IsSet() { @@ -606,16 +615,16 @@ func (o TenantRequest) MarshalJSON() ([]byte, error) { if o.FlowDeviceCode.IsSet() { toSerialize["flow_device_code"] = o.FlowDeviceCode.Get() } - if o.EventRetention != nil { + if !IsNil(o.EventRetention) { toSerialize["event_retention"] = o.EventRetention } if o.WebCertificate.IsSet() { toSerialize["web_certificate"] = o.WebCertificate.Get() } - if o.Attributes != nil { + if !IsNil(o.Attributes) { toSerialize["attributes"] = o.Attributes } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableTenantRequest struct { diff --git a/model_token.go b/model_token.go index f6c34b68f..e2947383d 100644 --- a/model_token.go +++ b/model_token.go @@ -16,25 +16,28 @@ import ( "time" ) +// checks if the Token type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Token{} + // Token Token Serializer type Token struct { Pk string `json:"pk"` // Objects which are managed by authentik. These objects are created and updated automatically. This is flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. - Managed NullableString `json:"managed,omitempty"` - Identifier string `json:"identifier"` - Intent *IntentEnum `json:"intent,omitempty"` - User *int32 `json:"user,omitempty"` - UserObj PolicyBindingUserObj `json:"user_obj"` - Description *string `json:"description,omitempty"` - Expires *time.Time `json:"expires,omitempty"` - Expiring *bool `json:"expiring,omitempty"` + Managed NullableString `json:"managed,omitempty"` + Identifier string `json:"identifier"` + Intent *IntentEnum `json:"intent,omitempty"` + User *int32 `json:"user,omitempty"` + UserObj User `json:"user_obj"` + Description *string `json:"description,omitempty"` + Expires *time.Time `json:"expires,omitempty"` + Expiring *bool `json:"expiring,omitempty"` } // NewToken instantiates a new Token object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewToken(pk string, identifier string, userObj PolicyBindingUserObj) *Token { +func NewToken(pk string, identifier string, userObj User) *Token { this := Token{} this.Pk = pk this.Identifier = identifier @@ -76,7 +79,7 @@ func (o *Token) SetPk(v string) { // GetManaged returns the Managed field value if set, zero value otherwise (both if not set or set to explicit null). func (o *Token) GetManaged() string { - if o == nil || o.Managed.Get() == nil { + if o == nil || IsNil(o.Managed.Get()) { var ret string return ret } @@ -143,7 +146,7 @@ func (o *Token) SetIdentifier(v string) { // GetIntent returns the Intent field value if set, zero value otherwise. func (o *Token) GetIntent() IntentEnum { - if o == nil || o.Intent == nil { + if o == nil || IsNil(o.Intent) { var ret IntentEnum return ret } @@ -153,7 +156,7 @@ func (o *Token) GetIntent() IntentEnum { // GetIntentOk returns a tuple with the Intent field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Token) GetIntentOk() (*IntentEnum, bool) { - if o == nil || o.Intent == nil { + if o == nil || IsNil(o.Intent) { return nil, false } return o.Intent, true @@ -161,7 +164,7 @@ func (o *Token) GetIntentOk() (*IntentEnum, bool) { // HasIntent returns a boolean if a field has been set. func (o *Token) HasIntent() bool { - if o != nil && o.Intent != nil { + if o != nil && !IsNil(o.Intent) { return true } @@ -175,7 +178,7 @@ func (o *Token) SetIntent(v IntentEnum) { // GetUser returns the User field value if set, zero value otherwise. func (o *Token) GetUser() int32 { - if o == nil || o.User == nil { + if o == nil || IsNil(o.User) { var ret int32 return ret } @@ -185,7 +188,7 @@ func (o *Token) GetUser() int32 { // GetUserOk returns a tuple with the User field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Token) GetUserOk() (*int32, bool) { - if o == nil || o.User == nil { + if o == nil || IsNil(o.User) { return nil, false } return o.User, true @@ -193,7 +196,7 @@ func (o *Token) GetUserOk() (*int32, bool) { // HasUser returns a boolean if a field has been set. func (o *Token) HasUser() bool { - if o != nil && o.User != nil { + if o != nil && !IsNil(o.User) { return true } @@ -206,9 +209,9 @@ func (o *Token) SetUser(v int32) { } // GetUserObj returns the UserObj field value -func (o *Token) GetUserObj() PolicyBindingUserObj { +func (o *Token) GetUserObj() User { if o == nil { - var ret PolicyBindingUserObj + var ret User return ret } @@ -217,7 +220,7 @@ func (o *Token) GetUserObj() PolicyBindingUserObj { // GetUserObjOk returns a tuple with the UserObj field value // and a boolean to check if the value has been set. -func (o *Token) GetUserObjOk() (*PolicyBindingUserObj, bool) { +func (o *Token) GetUserObjOk() (*User, bool) { if o == nil { return nil, false } @@ -225,13 +228,13 @@ func (o *Token) GetUserObjOk() (*PolicyBindingUserObj, bool) { } // SetUserObj sets field value -func (o *Token) SetUserObj(v PolicyBindingUserObj) { +func (o *Token) SetUserObj(v User) { o.UserObj = v } // GetDescription returns the Description field value if set, zero value otherwise. func (o *Token) GetDescription() string { - if o == nil || o.Description == nil { + if o == nil || IsNil(o.Description) { var ret string return ret } @@ -241,7 +244,7 @@ func (o *Token) GetDescription() string { // GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Token) GetDescriptionOk() (*string, bool) { - if o == nil || o.Description == nil { + if o == nil || IsNil(o.Description) { return nil, false } return o.Description, true @@ -249,7 +252,7 @@ func (o *Token) GetDescriptionOk() (*string, bool) { // HasDescription returns a boolean if a field has been set. func (o *Token) HasDescription() bool { - if o != nil && o.Description != nil { + if o != nil && !IsNil(o.Description) { return true } @@ -263,7 +266,7 @@ func (o *Token) SetDescription(v string) { // GetExpires returns the Expires field value if set, zero value otherwise. func (o *Token) GetExpires() time.Time { - if o == nil || o.Expires == nil { + if o == nil || IsNil(o.Expires) { var ret time.Time return ret } @@ -273,7 +276,7 @@ func (o *Token) GetExpires() time.Time { // GetExpiresOk returns a tuple with the Expires field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Token) GetExpiresOk() (*time.Time, bool) { - if o == nil || o.Expires == nil { + if o == nil || IsNil(o.Expires) { return nil, false } return o.Expires, true @@ -281,7 +284,7 @@ func (o *Token) GetExpiresOk() (*time.Time, bool) { // HasExpires returns a boolean if a field has been set. func (o *Token) HasExpires() bool { - if o != nil && o.Expires != nil { + if o != nil && !IsNil(o.Expires) { return true } @@ -295,7 +298,7 @@ func (o *Token) SetExpires(v time.Time) { // GetExpiring returns the Expiring field value if set, zero value otherwise. func (o *Token) GetExpiring() bool { - if o == nil || o.Expiring == nil { + if o == nil || IsNil(o.Expiring) { var ret bool return ret } @@ -305,7 +308,7 @@ func (o *Token) GetExpiring() bool { // GetExpiringOk returns a tuple with the Expiring field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Token) GetExpiringOk() (*bool, bool) { - if o == nil || o.Expiring == nil { + if o == nil || IsNil(o.Expiring) { return nil, false } return o.Expiring, true @@ -313,7 +316,7 @@ func (o *Token) GetExpiringOk() (*bool, bool) { // HasExpiring returns a boolean if a field has been set. func (o *Token) HasExpiring() bool { - if o != nil && o.Expiring != nil { + if o != nil && !IsNil(o.Expiring) { return true } @@ -326,35 +329,37 @@ func (o *Token) SetExpiring(v bool) { } func (o Token) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } + return json.Marshal(toSerialize) +} + +func (o Token) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly if o.Managed.IsSet() { toSerialize["managed"] = o.Managed.Get() } - if true { - toSerialize["identifier"] = o.Identifier - } - if o.Intent != nil { + toSerialize["identifier"] = o.Identifier + if !IsNil(o.Intent) { toSerialize["intent"] = o.Intent } - if o.User != nil { + if !IsNil(o.User) { toSerialize["user"] = o.User } - if true { - toSerialize["user_obj"] = o.UserObj - } - if o.Description != nil { + // skip: user_obj is readOnly + if !IsNil(o.Description) { toSerialize["description"] = o.Description } - if o.Expires != nil { + if !IsNil(o.Expires) { toSerialize["expires"] = o.Expires } - if o.Expiring != nil { + if !IsNil(o.Expiring) { toSerialize["expiring"] = o.Expiring } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableToken struct { diff --git a/model_token_model.go b/model_token_model.go index 467fb2067..ebfa401af 100644 --- a/model_token_model.go +++ b/model_token_model.go @@ -16,6 +16,9 @@ import ( "time" ) +// checks if the TokenModel type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TokenModel{} + // TokenModel Serializer for BaseGrantModel and RefreshToken type TokenModel struct { Pk int32 `json:"pk"` @@ -151,7 +154,7 @@ func (o *TokenModel) SetIsExpired(v bool) { // GetExpires returns the Expires field value if set, zero value otherwise. func (o *TokenModel) GetExpires() time.Time { - if o == nil || o.Expires == nil { + if o == nil || IsNil(o.Expires) { var ret time.Time return ret } @@ -161,7 +164,7 @@ func (o *TokenModel) GetExpires() time.Time { // GetExpiresOk returns a tuple with the Expires field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *TokenModel) GetExpiresOk() (*time.Time, bool) { - if o == nil || o.Expires == nil { + if o == nil || IsNil(o.Expires) { return nil, false } return o.Expires, true @@ -169,7 +172,7 @@ func (o *TokenModel) GetExpiresOk() (*time.Time, bool) { // HasExpires returns a boolean if a field has been set. func (o *TokenModel) HasExpires() bool { - if o != nil && o.Expires != nil { + if o != nil && !IsNil(o.Expires) { return true } @@ -231,7 +234,7 @@ func (o *TokenModel) SetIdToken(v string) { // GetRevoked returns the Revoked field value if set, zero value otherwise. func (o *TokenModel) GetRevoked() bool { - if o == nil || o.Revoked == nil { + if o == nil || IsNil(o.Revoked) { var ret bool return ret } @@ -241,7 +244,7 @@ func (o *TokenModel) GetRevoked() bool { // GetRevokedOk returns a tuple with the Revoked field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *TokenModel) GetRevokedOk() (*bool, bool) { - if o == nil || o.Revoked == nil { + if o == nil || IsNil(o.Revoked) { return nil, false } return o.Revoked, true @@ -249,7 +252,7 @@ func (o *TokenModel) GetRevokedOk() (*bool, bool) { // HasRevoked returns a boolean if a field has been set. func (o *TokenModel) HasRevoked() bool { - if o != nil && o.Revoked != nil { + if o != nil && !IsNil(o.Revoked) { return true } @@ -262,32 +265,28 @@ func (o *TokenModel) SetRevoked(v bool) { } func (o TokenModel) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["provider"] = o.Provider + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if true { - toSerialize["user"] = o.User - } - if true { - toSerialize["is_expired"] = o.IsExpired - } - if o.Expires != nil { + return json.Marshal(toSerialize) +} + +func (o TokenModel) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["provider"] = o.Provider + toSerialize["user"] = o.User + // skip: is_expired is readOnly + if !IsNil(o.Expires) { toSerialize["expires"] = o.Expires } - if true { - toSerialize["scope"] = o.Scope - } - if true { - toSerialize["id_token"] = o.IdToken - } - if o.Revoked != nil { + toSerialize["scope"] = o.Scope + // skip: id_token is readOnly + if !IsNil(o.Revoked) { toSerialize["revoked"] = o.Revoked } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableTokenModel struct { diff --git a/model_token_request.go b/model_token_request.go index 050000268..d11ff4e93 100644 --- a/model_token_request.go +++ b/model_token_request.go @@ -16,6 +16,9 @@ import ( "time" ) +// checks if the TokenRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TokenRequest{} + // TokenRequest Token Serializer type TokenRequest struct { // Objects which are managed by authentik. These objects are created and updated automatically. This is flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. @@ -48,7 +51,7 @@ func NewTokenRequestWithDefaults() *TokenRequest { // GetManaged returns the Managed field value if set, zero value otherwise (both if not set or set to explicit null). func (o *TokenRequest) GetManaged() string { - if o == nil || o.Managed.Get() == nil { + if o == nil || IsNil(o.Managed.Get()) { var ret string return ret } @@ -115,7 +118,7 @@ func (o *TokenRequest) SetIdentifier(v string) { // GetIntent returns the Intent field value if set, zero value otherwise. func (o *TokenRequest) GetIntent() IntentEnum { - if o == nil || o.Intent == nil { + if o == nil || IsNil(o.Intent) { var ret IntentEnum return ret } @@ -125,7 +128,7 @@ func (o *TokenRequest) GetIntent() IntentEnum { // GetIntentOk returns a tuple with the Intent field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *TokenRequest) GetIntentOk() (*IntentEnum, bool) { - if o == nil || o.Intent == nil { + if o == nil || IsNil(o.Intent) { return nil, false } return o.Intent, true @@ -133,7 +136,7 @@ func (o *TokenRequest) GetIntentOk() (*IntentEnum, bool) { // HasIntent returns a boolean if a field has been set. func (o *TokenRequest) HasIntent() bool { - if o != nil && o.Intent != nil { + if o != nil && !IsNil(o.Intent) { return true } @@ -147,7 +150,7 @@ func (o *TokenRequest) SetIntent(v IntentEnum) { // GetUser returns the User field value if set, zero value otherwise. func (o *TokenRequest) GetUser() int32 { - if o == nil || o.User == nil { + if o == nil || IsNil(o.User) { var ret int32 return ret } @@ -157,7 +160,7 @@ func (o *TokenRequest) GetUser() int32 { // GetUserOk returns a tuple with the User field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *TokenRequest) GetUserOk() (*int32, bool) { - if o == nil || o.User == nil { + if o == nil || IsNil(o.User) { return nil, false } return o.User, true @@ -165,7 +168,7 @@ func (o *TokenRequest) GetUserOk() (*int32, bool) { // HasUser returns a boolean if a field has been set. func (o *TokenRequest) HasUser() bool { - if o != nil && o.User != nil { + if o != nil && !IsNil(o.User) { return true } @@ -179,7 +182,7 @@ func (o *TokenRequest) SetUser(v int32) { // GetDescription returns the Description field value if set, zero value otherwise. func (o *TokenRequest) GetDescription() string { - if o == nil || o.Description == nil { + if o == nil || IsNil(o.Description) { var ret string return ret } @@ -189,7 +192,7 @@ func (o *TokenRequest) GetDescription() string { // GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *TokenRequest) GetDescriptionOk() (*string, bool) { - if o == nil || o.Description == nil { + if o == nil || IsNil(o.Description) { return nil, false } return o.Description, true @@ -197,7 +200,7 @@ func (o *TokenRequest) GetDescriptionOk() (*string, bool) { // HasDescription returns a boolean if a field has been set. func (o *TokenRequest) HasDescription() bool { - if o != nil && o.Description != nil { + if o != nil && !IsNil(o.Description) { return true } @@ -211,7 +214,7 @@ func (o *TokenRequest) SetDescription(v string) { // GetExpires returns the Expires field value if set, zero value otherwise. func (o *TokenRequest) GetExpires() time.Time { - if o == nil || o.Expires == nil { + if o == nil || IsNil(o.Expires) { var ret time.Time return ret } @@ -221,7 +224,7 @@ func (o *TokenRequest) GetExpires() time.Time { // GetExpiresOk returns a tuple with the Expires field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *TokenRequest) GetExpiresOk() (*time.Time, bool) { - if o == nil || o.Expires == nil { + if o == nil || IsNil(o.Expires) { return nil, false } return o.Expires, true @@ -229,7 +232,7 @@ func (o *TokenRequest) GetExpiresOk() (*time.Time, bool) { // HasExpires returns a boolean if a field has been set. func (o *TokenRequest) HasExpires() bool { - if o != nil && o.Expires != nil { + if o != nil && !IsNil(o.Expires) { return true } @@ -243,7 +246,7 @@ func (o *TokenRequest) SetExpires(v time.Time) { // GetExpiring returns the Expiring field value if set, zero value otherwise. func (o *TokenRequest) GetExpiring() bool { - if o == nil || o.Expiring == nil { + if o == nil || IsNil(o.Expiring) { var ret bool return ret } @@ -253,7 +256,7 @@ func (o *TokenRequest) GetExpiring() bool { // GetExpiringOk returns a tuple with the Expiring field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *TokenRequest) GetExpiringOk() (*bool, bool) { - if o == nil || o.Expiring == nil { + if o == nil || IsNil(o.Expiring) { return nil, false } return o.Expiring, true @@ -261,7 +264,7 @@ func (o *TokenRequest) GetExpiringOk() (*bool, bool) { // HasExpiring returns a boolean if a field has been set. func (o *TokenRequest) HasExpiring() bool { - if o != nil && o.Expiring != nil { + if o != nil && !IsNil(o.Expiring) { return true } @@ -274,29 +277,35 @@ func (o *TokenRequest) SetExpiring(v bool) { } func (o TokenRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TokenRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Managed.IsSet() { toSerialize["managed"] = o.Managed.Get() } - if true { - toSerialize["identifier"] = o.Identifier - } - if o.Intent != nil { + toSerialize["identifier"] = o.Identifier + if !IsNil(o.Intent) { toSerialize["intent"] = o.Intent } - if o.User != nil { + if !IsNil(o.User) { toSerialize["user"] = o.User } - if o.Description != nil { + if !IsNil(o.Description) { toSerialize["description"] = o.Description } - if o.Expires != nil { + if !IsNil(o.Expires) { toSerialize["expires"] = o.Expires } - if o.Expiring != nil { + if !IsNil(o.Expiring) { toSerialize["expiring"] = o.Expiring } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableTokenRequest struct { diff --git a/model_token_set_key_request.go b/model_token_set_key_request.go index b6af7cdd3..70c08e0ab 100644 --- a/model_token_set_key_request.go +++ b/model_token_set_key_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the TokenSetKeyRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TokenSetKeyRequest{} + // TokenSetKeyRequest struct for TokenSetKeyRequest type TokenSetKeyRequest struct { Key string `json:"key"` @@ -63,13 +66,19 @@ func (o *TokenSetKeyRequest) SetKey(v string) { } func (o TokenSetKeyRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["key"] = o.Key + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o TokenSetKeyRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["key"] = o.Key + return toSerialize, nil +} + type NullableTokenSetKeyRequest struct { value *TokenSetKeyRequest isSet bool diff --git a/model_token_view.go b/model_token_view.go index 25158de42..0bec581c7 100644 --- a/model_token_view.go +++ b/model_token_view.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the TokenView type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TokenView{} + // TokenView Show token's current key type TokenView struct { Key string `json:"key"` @@ -63,13 +66,19 @@ func (o *TokenView) SetKey(v string) { } func (o TokenView) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["key"] = o.Key + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o TokenView) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: key is readOnly + return toSerialize, nil +} + type NullableTokenView struct { value *TokenView isSet bool diff --git a/model_totp_device.go b/model_totp_device.go index 44b83cee6..16d1aceab 100644 --- a/model_totp_device.go +++ b/model_totp_device.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the TOTPDevice type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TOTPDevice{} + // TOTPDevice Serializer for totp authenticator devices type TOTPDevice struct { // The human-readable name of this device. @@ -90,16 +93,20 @@ func (o *TOTPDevice) SetPk(v int32) { } func (o TOTPDevice) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["pk"] = o.Pk + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o TOTPDevice) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + // skip: pk is readOnly + return toSerialize, nil +} + type NullableTOTPDevice struct { value *TOTPDevice isSet bool diff --git a/model_totp_device_request.go b/model_totp_device_request.go index d1ac132dd..46e43f28f 100644 --- a/model_totp_device_request.go +++ b/model_totp_device_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the TOTPDeviceRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TOTPDeviceRequest{} + // TOTPDeviceRequest Serializer for totp authenticator devices type TOTPDeviceRequest struct { // The human-readable name of this device. @@ -64,13 +67,19 @@ func (o *TOTPDeviceRequest) SetName(v string) { } func (o TOTPDeviceRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o TOTPDeviceRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + return toSerialize, nil +} + type NullableTOTPDeviceRequest struct { value *TOTPDeviceRequest isSet bool diff --git a/model_type_create.go b/model_type_create.go index 10670a6d2..dfaaf496d 100644 --- a/model_type_create.go +++ b/model_type_create.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the TypeCreate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TypeCreate{} + // TypeCreate Types of an object that can be created type TypeCreate struct { Name string `json:"name"` @@ -141,22 +144,22 @@ func (o *TypeCreate) SetModelName(v string) { } func (o TypeCreate) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["description"] = o.Description - } - if true { - toSerialize["component"] = o.Component - } - if true { - toSerialize["model_name"] = o.ModelName + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o TypeCreate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["description"] = o.Description + toSerialize["component"] = o.Component + toSerialize["model_name"] = o.ModelName + return toSerialize, nil +} + type NullableTypeCreate struct { value *TypeCreate isSet bool diff --git a/model_used_by.go b/model_used_by.go index 9b8b067d1..669ae546c 100644 --- a/model_used_by.go +++ b/model_used_by.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the UsedBy type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UsedBy{} + // UsedBy A list of all objects referencing the queried object type UsedBy struct { App string `json:"app"` @@ -167,25 +170,23 @@ func (o *UsedBy) SetAction(v UsedByActionEnum) { } func (o UsedBy) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["app"] = o.App - } - if true { - toSerialize["model_name"] = o.ModelName - } - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["action"] = o.Action + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o UsedBy) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["app"] = o.App + toSerialize["model_name"] = o.ModelName + toSerialize["pk"] = o.Pk + toSerialize["name"] = o.Name + toSerialize["action"] = o.Action + return toSerialize, nil +} + type NullableUsedBy struct { value *UsedBy isSet bool diff --git a/model_user.go b/model_user.go index 1c12eec64..963c1032b 100644 --- a/model_user.go +++ b/model_user.go @@ -16,6 +16,9 @@ import ( "time" ) +// checks if the User type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &User{} + // User User Serializer type User struct { Pk int32 `json:"pk"` @@ -134,7 +137,7 @@ func (o *User) SetName(v string) { // GetIsActive returns the IsActive field value if set, zero value otherwise. func (o *User) GetIsActive() bool { - if o == nil || o.IsActive == nil { + if o == nil || IsNil(o.IsActive) { var ret bool return ret } @@ -144,7 +147,7 @@ func (o *User) GetIsActive() bool { // GetIsActiveOk returns a tuple with the IsActive field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *User) GetIsActiveOk() (*bool, bool) { - if o == nil || o.IsActive == nil { + if o == nil || IsNil(o.IsActive) { return nil, false } return o.IsActive, true @@ -152,7 +155,7 @@ func (o *User) GetIsActiveOk() (*bool, bool) { // HasIsActive returns a boolean if a field has been set. func (o *User) HasIsActive() bool { - if o != nil && o.IsActive != nil { + if o != nil && !IsNil(o.IsActive) { return true } @@ -166,7 +169,7 @@ func (o *User) SetIsActive(v bool) { // GetLastLogin returns the LastLogin field value if set, zero value otherwise (both if not set or set to explicit null). func (o *User) GetLastLogin() time.Time { - if o == nil || o.LastLogin.Get() == nil { + if o == nil || IsNil(o.LastLogin.Get()) { var ret time.Time return ret } @@ -281,7 +284,7 @@ func (o *User) SetGroupsObj(v []UserGroup) { // GetEmail returns the Email field value if set, zero value otherwise. func (o *User) GetEmail() string { - if o == nil || o.Email == nil { + if o == nil || IsNil(o.Email) { var ret string return ret } @@ -291,7 +294,7 @@ func (o *User) GetEmail() string { // GetEmailOk returns a tuple with the Email field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *User) GetEmailOk() (*string, bool) { - if o == nil || o.Email == nil { + if o == nil || IsNil(o.Email) { return nil, false } return o.Email, true @@ -299,7 +302,7 @@ func (o *User) GetEmailOk() (*string, bool) { // HasEmail returns a boolean if a field has been set. func (o *User) HasEmail() bool { - if o != nil && o.Email != nil { + if o != nil && !IsNil(o.Email) { return true } @@ -337,7 +340,7 @@ func (o *User) SetAvatar(v string) { // GetAttributes returns the Attributes field value if set, zero value otherwise. func (o *User) GetAttributes() map[string]interface{} { - if o == nil || o.Attributes == nil { + if o == nil || IsNil(o.Attributes) { var ret map[string]interface{} return ret } @@ -347,15 +350,15 @@ func (o *User) GetAttributes() map[string]interface{} { // GetAttributesOk returns a tuple with the Attributes field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *User) GetAttributesOk() (map[string]interface{}, bool) { - if o == nil || o.Attributes == nil { - return nil, false + if o == nil || IsNil(o.Attributes) { + return map[string]interface{}{}, false } return o.Attributes, true } // HasAttributes returns a boolean if a field has been set. func (o *User) HasAttributes() bool { - if o != nil && o.Attributes != nil { + if o != nil && !IsNil(o.Attributes) { return true } @@ -393,7 +396,7 @@ func (o *User) SetUid(v string) { // GetPath returns the Path field value if set, zero value otherwise. func (o *User) GetPath() string { - if o == nil || o.Path == nil { + if o == nil || IsNil(o.Path) { var ret string return ret } @@ -403,7 +406,7 @@ func (o *User) GetPath() string { // GetPathOk returns a tuple with the Path field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *User) GetPathOk() (*string, bool) { - if o == nil || o.Path == nil { + if o == nil || IsNil(o.Path) { return nil, false } return o.Path, true @@ -411,7 +414,7 @@ func (o *User) GetPathOk() (*string, bool) { // HasPath returns a boolean if a field has been set. func (o *User) HasPath() bool { - if o != nil && o.Path != nil { + if o != nil && !IsNil(o.Path) { return true } @@ -424,47 +427,39 @@ func (o *User) SetPath(v string) { } func (o User) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["username"] = o.Username + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if true { - toSerialize["name"] = o.Name - } - if o.IsActive != nil { + return json.Marshal(toSerialize) +} + +func (o User) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["username"] = o.Username + toSerialize["name"] = o.Name + if !IsNil(o.IsActive) { toSerialize["is_active"] = o.IsActive } if o.LastLogin.IsSet() { toSerialize["last_login"] = o.LastLogin.Get() } - if true { - toSerialize["is_superuser"] = o.IsSuperuser - } - if true { - toSerialize["groups"] = o.Groups - } - if true { - toSerialize["groups_obj"] = o.GroupsObj - } - if o.Email != nil { + // skip: is_superuser is readOnly + toSerialize["groups"] = o.Groups + // skip: groups_obj is readOnly + if !IsNil(o.Email) { toSerialize["email"] = o.Email } - if true { - toSerialize["avatar"] = o.Avatar - } - if o.Attributes != nil { + // skip: avatar is readOnly + if !IsNil(o.Attributes) { toSerialize["attributes"] = o.Attributes } - if true { - toSerialize["uid"] = o.Uid - } - if o.Path != nil { + // skip: uid is readOnly + if !IsNil(o.Path) { toSerialize["path"] = o.Path } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableUser struct { diff --git a/model_user_account_request.go b/model_user_account_request.go index 663e3983a..4f373c071 100644 --- a/model_user_account_request.go +++ b/model_user_account_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the UserAccountRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserAccountRequest{} + // UserAccountRequest Account adding/removing operations type UserAccountRequest struct { Pk int32 `json:"pk"` @@ -63,13 +66,19 @@ func (o *UserAccountRequest) SetPk(v int32) { } func (o UserAccountRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o UserAccountRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pk"] = o.Pk + return toSerialize, nil +} + type NullableUserAccountRequest struct { value *UserAccountRequest isSet bool diff --git a/model_user_consent.go b/model_user_consent.go index b8766142c..7fd8ff556 100644 --- a/model_user_consent.go +++ b/model_user_consent.go @@ -16,6 +16,9 @@ import ( "time" ) +// checks if the UserConsent type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserConsent{} + // UserConsent UserConsent Serializer type UserConsent struct { Pk int32 `json:"pk"` @@ -75,7 +78,7 @@ func (o *UserConsent) SetPk(v int32) { // GetExpires returns the Expires field value if set, zero value otherwise. func (o *UserConsent) GetExpires() time.Time { - if o == nil || o.Expires == nil { + if o == nil || IsNil(o.Expires) { var ret time.Time return ret } @@ -85,7 +88,7 @@ func (o *UserConsent) GetExpires() time.Time { // GetExpiresOk returns a tuple with the Expires field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UserConsent) GetExpiresOk() (*time.Time, bool) { - if o == nil || o.Expires == nil { + if o == nil || IsNil(o.Expires) { return nil, false } return o.Expires, true @@ -93,7 +96,7 @@ func (o *UserConsent) GetExpiresOk() (*time.Time, bool) { // HasExpires returns a boolean if a field has been set. func (o *UserConsent) HasExpires() bool { - if o != nil && o.Expires != nil { + if o != nil && !IsNil(o.Expires) { return true } @@ -155,7 +158,7 @@ func (o *UserConsent) SetApplication(v Application) { // GetPermissions returns the Permissions field value if set, zero value otherwise. func (o *UserConsent) GetPermissions() string { - if o == nil || o.Permissions == nil { + if o == nil || IsNil(o.Permissions) { var ret string return ret } @@ -165,7 +168,7 @@ func (o *UserConsent) GetPermissions() string { // GetPermissionsOk returns a tuple with the Permissions field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UserConsent) GetPermissionsOk() (*string, bool) { - if o == nil || o.Permissions == nil { + if o == nil || IsNil(o.Permissions) { return nil, false } return o.Permissions, true @@ -173,7 +176,7 @@ func (o *UserConsent) GetPermissionsOk() (*string, bool) { // HasPermissions returns a boolean if a field has been set. func (o *UserConsent) HasPermissions() bool { - if o != nil && o.Permissions != nil { + if o != nil && !IsNil(o.Permissions) { return true } @@ -186,23 +189,25 @@ func (o *UserConsent) SetPermissions(v string) { } func (o UserConsent) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.Expires != nil { + return json.Marshal(toSerialize) +} + +func (o UserConsent) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + if !IsNil(o.Expires) { toSerialize["expires"] = o.Expires } - if true { - toSerialize["user"] = o.User - } - if true { - toSerialize["application"] = o.Application - } - if o.Permissions != nil { + toSerialize["user"] = o.User + toSerialize["application"] = o.Application + if !IsNil(o.Permissions) { toSerialize["permissions"] = o.Permissions } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableUserConsent struct { diff --git a/model_user_delete_stage.go b/model_user_delete_stage.go index 27d80feb3..c7f0ce008 100644 --- a/model_user_delete_stage.go +++ b/model_user_delete_stage.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the UserDeleteStage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserDeleteStage{} + // UserDeleteStage UserDeleteStage Serializer type UserDeleteStage struct { Pk string `json:"pk"` @@ -199,7 +202,7 @@ func (o *UserDeleteStage) SetMetaModelName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *UserDeleteStage) GetFlowSet() []FlowSet { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSet return ret } @@ -209,7 +212,7 @@ func (o *UserDeleteStage) GetFlowSet() []FlowSet { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UserDeleteStage) GetFlowSetOk() ([]FlowSet, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -217,7 +220,7 @@ func (o *UserDeleteStage) GetFlowSetOk() ([]FlowSet, bool) { // HasFlowSet returns a boolean if a field has been set. func (o *UserDeleteStage) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -230,29 +233,25 @@ func (o *UserDeleteStage) SetFlowSet(v []FlowSet) { } func (o UserDeleteStage) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["component"] = o.Component - } - if true { - toSerialize["verbose_name"] = o.VerboseName - } - if true { - toSerialize["verbose_name_plural"] = o.VerboseNamePlural + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if true { - toSerialize["meta_model_name"] = o.MetaModelName - } - if o.FlowSet != nil { + return json.Marshal(toSerialize) +} + +func (o UserDeleteStage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name + // skip: component is readOnly + // skip: verbose_name is readOnly + // skip: verbose_name_plural is readOnly + // skip: meta_model_name is readOnly + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableUserDeleteStage struct { diff --git a/model_user_delete_stage_request.go b/model_user_delete_stage_request.go index 093efb887..f53f75275 100644 --- a/model_user_delete_stage_request.go +++ b/model_user_delete_stage_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the UserDeleteStageRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserDeleteStageRequest{} + // UserDeleteStageRequest UserDeleteStage Serializer type UserDeleteStageRequest struct { Name string `json:"name"` @@ -65,7 +68,7 @@ func (o *UserDeleteStageRequest) SetName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *UserDeleteStageRequest) GetFlowSet() []FlowSetRequest { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSetRequest return ret } @@ -75,7 +78,7 @@ func (o *UserDeleteStageRequest) GetFlowSet() []FlowSetRequest { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UserDeleteStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -83,7 +86,7 @@ func (o *UserDeleteStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { // HasFlowSet returns a boolean if a field has been set. func (o *UserDeleteStageRequest) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -96,14 +99,20 @@ func (o *UserDeleteStageRequest) SetFlowSet(v []FlowSetRequest) { } func (o UserDeleteStageRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.FlowSet != nil { + return json.Marshal(toSerialize) +} + +func (o UserDeleteStageRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableUserDeleteStageRequest struct { diff --git a/model_user_group.go b/model_user_group.go index f3b4893d8..ad4de3dbd 100644 --- a/model_user_group.go +++ b/model_user_group.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the UserGroup type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserGroup{} + // UserGroup Simplified Group Serializer for user's groups type UserGroup struct { Pk string `json:"pk"` @@ -123,7 +126,7 @@ func (o *UserGroup) SetName(v string) { // GetIsSuperuser returns the IsSuperuser field value if set, zero value otherwise. func (o *UserGroup) GetIsSuperuser() bool { - if o == nil || o.IsSuperuser == nil { + if o == nil || IsNil(o.IsSuperuser) { var ret bool return ret } @@ -133,7 +136,7 @@ func (o *UserGroup) GetIsSuperuser() bool { // GetIsSuperuserOk returns a tuple with the IsSuperuser field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UserGroup) GetIsSuperuserOk() (*bool, bool) { - if o == nil || o.IsSuperuser == nil { + if o == nil || IsNil(o.IsSuperuser) { return nil, false } return o.IsSuperuser, true @@ -141,7 +144,7 @@ func (o *UserGroup) GetIsSuperuserOk() (*bool, bool) { // HasIsSuperuser returns a boolean if a field has been set. func (o *UserGroup) HasIsSuperuser() bool { - if o != nil && o.IsSuperuser != nil { + if o != nil && !IsNil(o.IsSuperuser) { return true } @@ -155,7 +158,7 @@ func (o *UserGroup) SetIsSuperuser(v bool) { // GetParent returns the Parent field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UserGroup) GetParent() string { - if o == nil || o.Parent.Get() == nil { + if o == nil || IsNil(o.Parent.Get()) { var ret string return ret } @@ -222,7 +225,7 @@ func (o *UserGroup) SetParentName(v string) { // GetAttributes returns the Attributes field value if set, zero value otherwise. func (o *UserGroup) GetAttributes() map[string]interface{} { - if o == nil || o.Attributes == nil { + if o == nil || IsNil(o.Attributes) { var ret map[string]interface{} return ret } @@ -232,15 +235,15 @@ func (o *UserGroup) GetAttributes() map[string]interface{} { // GetAttributesOk returns a tuple with the Attributes field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UserGroup) GetAttributesOk() (map[string]interface{}, bool) { - if o == nil || o.Attributes == nil { - return nil, false + if o == nil || IsNil(o.Attributes) { + return map[string]interface{}{}, false } return o.Attributes, true } // HasAttributes returns a boolean if a field has been set. func (o *UserGroup) HasAttributes() bool { - if o != nil && o.Attributes != nil { + if o != nil && !IsNil(o.Attributes) { return true } @@ -253,29 +256,29 @@ func (o *UserGroup) SetAttributes(v map[string]interface{}) { } func (o UserGroup) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if true { - toSerialize["num_pk"] = o.NumPk - } - if true { - toSerialize["name"] = o.Name - } - if o.IsSuperuser != nil { + return json.Marshal(toSerialize) +} + +func (o UserGroup) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + // skip: num_pk is readOnly + toSerialize["name"] = o.Name + if !IsNil(o.IsSuperuser) { toSerialize["is_superuser"] = o.IsSuperuser } if o.Parent.IsSet() { toSerialize["parent"] = o.Parent.Get() } - if true { - toSerialize["parent_name"] = o.ParentName - } - if o.Attributes != nil { + // skip: parent_name is readOnly + if !IsNil(o.Attributes) { toSerialize["attributes"] = o.Attributes } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableUserGroup struct { diff --git a/model_user_group_request.go b/model_user_group_request.go index 4c6738968..f39ddd134 100644 --- a/model_user_group_request.go +++ b/model_user_group_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the UserGroupRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserGroupRequest{} + // UserGroupRequest Simplified Group Serializer for user's groups type UserGroupRequest struct { Name string `json:"name"` @@ -68,7 +71,7 @@ func (o *UserGroupRequest) SetName(v string) { // GetIsSuperuser returns the IsSuperuser field value if set, zero value otherwise. func (o *UserGroupRequest) GetIsSuperuser() bool { - if o == nil || o.IsSuperuser == nil { + if o == nil || IsNil(o.IsSuperuser) { var ret bool return ret } @@ -78,7 +81,7 @@ func (o *UserGroupRequest) GetIsSuperuser() bool { // GetIsSuperuserOk returns a tuple with the IsSuperuser field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UserGroupRequest) GetIsSuperuserOk() (*bool, bool) { - if o == nil || o.IsSuperuser == nil { + if o == nil || IsNil(o.IsSuperuser) { return nil, false } return o.IsSuperuser, true @@ -86,7 +89,7 @@ func (o *UserGroupRequest) GetIsSuperuserOk() (*bool, bool) { // HasIsSuperuser returns a boolean if a field has been set. func (o *UserGroupRequest) HasIsSuperuser() bool { - if o != nil && o.IsSuperuser != nil { + if o != nil && !IsNil(o.IsSuperuser) { return true } @@ -100,7 +103,7 @@ func (o *UserGroupRequest) SetIsSuperuser(v bool) { // GetParent returns the Parent field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UserGroupRequest) GetParent() string { - if o == nil || o.Parent.Get() == nil { + if o == nil || IsNil(o.Parent.Get()) { var ret string return ret } @@ -143,7 +146,7 @@ func (o *UserGroupRequest) UnsetParent() { // GetAttributes returns the Attributes field value if set, zero value otherwise. func (o *UserGroupRequest) GetAttributes() map[string]interface{} { - if o == nil || o.Attributes == nil { + if o == nil || IsNil(o.Attributes) { var ret map[string]interface{} return ret } @@ -153,15 +156,15 @@ func (o *UserGroupRequest) GetAttributes() map[string]interface{} { // GetAttributesOk returns a tuple with the Attributes field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UserGroupRequest) GetAttributesOk() (map[string]interface{}, bool) { - if o == nil || o.Attributes == nil { - return nil, false + if o == nil || IsNil(o.Attributes) { + return map[string]interface{}{}, false } return o.Attributes, true } // HasAttributes returns a boolean if a field has been set. func (o *UserGroupRequest) HasAttributes() bool { - if o != nil && o.Attributes != nil { + if o != nil && !IsNil(o.Attributes) { return true } @@ -174,20 +177,26 @@ func (o *UserGroupRequest) SetAttributes(v map[string]interface{}) { } func (o UserGroupRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.IsSuperuser != nil { + return json.Marshal(toSerialize) +} + +func (o UserGroupRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.IsSuperuser) { toSerialize["is_superuser"] = o.IsSuperuser } if o.Parent.IsSet() { toSerialize["parent"] = o.Parent.Get() } - if o.Attributes != nil { + if !IsNil(o.Attributes) { toSerialize["attributes"] = o.Attributes } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableUserGroupRequest struct { diff --git a/model_user_login_challenge.go b/model_user_login_challenge.go index 02c1c3f16..8ed73a73b 100644 --- a/model_user_login_challenge.go +++ b/model_user_login_challenge.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the UserLoginChallenge type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserLoginChallenge{} + // UserLoginChallenge Empty challenge type UserLoginChallenge struct { Type ChallengeChoices `json:"type"` @@ -75,7 +78,7 @@ func (o *UserLoginChallenge) SetType(v ChallengeChoices) { // GetFlowInfo returns the FlowInfo field value if set, zero value otherwise. func (o *UserLoginChallenge) GetFlowInfo() ContextualFlowInfo { - if o == nil || o.FlowInfo == nil { + if o == nil || IsNil(o.FlowInfo) { var ret ContextualFlowInfo return ret } @@ -85,7 +88,7 @@ func (o *UserLoginChallenge) GetFlowInfo() ContextualFlowInfo { // GetFlowInfoOk returns a tuple with the FlowInfo field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UserLoginChallenge) GetFlowInfoOk() (*ContextualFlowInfo, bool) { - if o == nil || o.FlowInfo == nil { + if o == nil || IsNil(o.FlowInfo) { return nil, false } return o.FlowInfo, true @@ -93,7 +96,7 @@ func (o *UserLoginChallenge) GetFlowInfoOk() (*ContextualFlowInfo, bool) { // HasFlowInfo returns a boolean if a field has been set. func (o *UserLoginChallenge) HasFlowInfo() bool { - if o != nil && o.FlowInfo != nil { + if o != nil && !IsNil(o.FlowInfo) { return true } @@ -107,7 +110,7 @@ func (o *UserLoginChallenge) SetFlowInfo(v ContextualFlowInfo) { // GetComponent returns the Component field value if set, zero value otherwise. func (o *UserLoginChallenge) GetComponent() string { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { var ret string return ret } @@ -117,7 +120,7 @@ func (o *UserLoginChallenge) GetComponent() string { // GetComponentOk returns a tuple with the Component field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UserLoginChallenge) GetComponentOk() (*string, bool) { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { return nil, false } return o.Component, true @@ -125,7 +128,7 @@ func (o *UserLoginChallenge) GetComponentOk() (*string, bool) { // HasComponent returns a boolean if a field has been set. func (o *UserLoginChallenge) HasComponent() bool { - if o != nil && o.Component != nil { + if o != nil && !IsNil(o.Component) { return true } @@ -139,7 +142,7 @@ func (o *UserLoginChallenge) SetComponent(v string) { // GetResponseErrors returns the ResponseErrors field value if set, zero value otherwise. func (o *UserLoginChallenge) GetResponseErrors() map[string][]ErrorDetail { - if o == nil || o.ResponseErrors == nil { + if o == nil || IsNil(o.ResponseErrors) { var ret map[string][]ErrorDetail return ret } @@ -149,7 +152,7 @@ func (o *UserLoginChallenge) GetResponseErrors() map[string][]ErrorDetail { // GetResponseErrorsOk returns a tuple with the ResponseErrors field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UserLoginChallenge) GetResponseErrorsOk() (*map[string][]ErrorDetail, bool) { - if o == nil || o.ResponseErrors == nil { + if o == nil || IsNil(o.ResponseErrors) { return nil, false } return o.ResponseErrors, true @@ -157,7 +160,7 @@ func (o *UserLoginChallenge) GetResponseErrorsOk() (*map[string][]ErrorDetail, b // HasResponseErrors returns a boolean if a field has been set. func (o *UserLoginChallenge) HasResponseErrors() bool { - if o != nil && o.ResponseErrors != nil { + if o != nil && !IsNil(o.ResponseErrors) { return true } @@ -218,26 +221,28 @@ func (o *UserLoginChallenge) SetPendingUserAvatar(v string) { } func (o UserLoginChallenge) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["type"] = o.Type + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.FlowInfo != nil { + return json.Marshal(toSerialize) +} + +func (o UserLoginChallenge) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + if !IsNil(o.FlowInfo) { toSerialize["flow_info"] = o.FlowInfo } - if o.Component != nil { + if !IsNil(o.Component) { toSerialize["component"] = o.Component } - if o.ResponseErrors != nil { + if !IsNil(o.ResponseErrors) { toSerialize["response_errors"] = o.ResponseErrors } - if true { - toSerialize["pending_user"] = o.PendingUser - } - if true { - toSerialize["pending_user_avatar"] = o.PendingUserAvatar - } - return json.Marshal(toSerialize) + toSerialize["pending_user"] = o.PendingUser + toSerialize["pending_user_avatar"] = o.PendingUserAvatar + return toSerialize, nil } type NullableUserLoginChallenge struct { diff --git a/model_user_login_challenge_response_request.go b/model_user_login_challenge_response_request.go index 0263190f5..d00f63832 100644 --- a/model_user_login_challenge_response_request.go +++ b/model_user_login_challenge_response_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the UserLoginChallengeResponseRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserLoginChallengeResponseRequest{} + // UserLoginChallengeResponseRequest User login challenge type UserLoginChallengeResponseRequest struct { Component *string `json:"component,omitempty"` @@ -45,7 +48,7 @@ func NewUserLoginChallengeResponseRequestWithDefaults() *UserLoginChallengeRespo // GetComponent returns the Component field value if set, zero value otherwise. func (o *UserLoginChallengeResponseRequest) GetComponent() string { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { var ret string return ret } @@ -55,7 +58,7 @@ func (o *UserLoginChallengeResponseRequest) GetComponent() string { // GetComponentOk returns a tuple with the Component field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UserLoginChallengeResponseRequest) GetComponentOk() (*string, bool) { - if o == nil || o.Component == nil { + if o == nil || IsNil(o.Component) { return nil, false } return o.Component, true @@ -63,7 +66,7 @@ func (o *UserLoginChallengeResponseRequest) GetComponentOk() (*string, bool) { // HasComponent returns a boolean if a field has been set. func (o *UserLoginChallengeResponseRequest) HasComponent() bool { - if o != nil && o.Component != nil { + if o != nil && !IsNil(o.Component) { return true } @@ -100,14 +103,20 @@ func (o *UserLoginChallengeResponseRequest) SetRememberMe(v bool) { } func (o UserLoginChallengeResponseRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UserLoginChallengeResponseRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Component != nil { + if !IsNil(o.Component) { toSerialize["component"] = o.Component } - if true { - toSerialize["remember_me"] = o.RememberMe - } - return json.Marshal(toSerialize) + toSerialize["remember_me"] = o.RememberMe + return toSerialize, nil } type NullableUserLoginChallengeResponseRequest struct { diff --git a/model_user_login_stage.go b/model_user_login_stage.go index 4571965c3..8284e3e4a 100644 --- a/model_user_login_stage.go +++ b/model_user_login_stage.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the UserLoginStage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserLoginStage{} + // UserLoginStage UserLoginStage Serializer type UserLoginStage struct { Pk string `json:"pk"` @@ -205,7 +208,7 @@ func (o *UserLoginStage) SetMetaModelName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *UserLoginStage) GetFlowSet() []FlowSet { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSet return ret } @@ -215,7 +218,7 @@ func (o *UserLoginStage) GetFlowSet() []FlowSet { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UserLoginStage) GetFlowSetOk() ([]FlowSet, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -223,7 +226,7 @@ func (o *UserLoginStage) GetFlowSetOk() ([]FlowSet, bool) { // HasFlowSet returns a boolean if a field has been set. func (o *UserLoginStage) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -237,7 +240,7 @@ func (o *UserLoginStage) SetFlowSet(v []FlowSet) { // GetSessionDuration returns the SessionDuration field value if set, zero value otherwise. func (o *UserLoginStage) GetSessionDuration() string { - if o == nil || o.SessionDuration == nil { + if o == nil || IsNil(o.SessionDuration) { var ret string return ret } @@ -247,7 +250,7 @@ func (o *UserLoginStage) GetSessionDuration() string { // GetSessionDurationOk returns a tuple with the SessionDuration field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UserLoginStage) GetSessionDurationOk() (*string, bool) { - if o == nil || o.SessionDuration == nil { + if o == nil || IsNil(o.SessionDuration) { return nil, false } return o.SessionDuration, true @@ -255,7 +258,7 @@ func (o *UserLoginStage) GetSessionDurationOk() (*string, bool) { // HasSessionDuration returns a boolean if a field has been set. func (o *UserLoginStage) HasSessionDuration() bool { - if o != nil && o.SessionDuration != nil { + if o != nil && !IsNil(o.SessionDuration) { return true } @@ -269,7 +272,7 @@ func (o *UserLoginStage) SetSessionDuration(v string) { // GetTerminateOtherSessions returns the TerminateOtherSessions field value if set, zero value otherwise. func (o *UserLoginStage) GetTerminateOtherSessions() bool { - if o == nil || o.TerminateOtherSessions == nil { + if o == nil || IsNil(o.TerminateOtherSessions) { var ret bool return ret } @@ -279,7 +282,7 @@ func (o *UserLoginStage) GetTerminateOtherSessions() bool { // GetTerminateOtherSessionsOk returns a tuple with the TerminateOtherSessions field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UserLoginStage) GetTerminateOtherSessionsOk() (*bool, bool) { - if o == nil || o.TerminateOtherSessions == nil { + if o == nil || IsNil(o.TerminateOtherSessions) { return nil, false } return o.TerminateOtherSessions, true @@ -287,7 +290,7 @@ func (o *UserLoginStage) GetTerminateOtherSessionsOk() (*bool, bool) { // HasTerminateOtherSessions returns a boolean if a field has been set. func (o *UserLoginStage) HasTerminateOtherSessions() bool { - if o != nil && o.TerminateOtherSessions != nil { + if o != nil && !IsNil(o.TerminateOtherSessions) { return true } @@ -301,7 +304,7 @@ func (o *UserLoginStage) SetTerminateOtherSessions(v bool) { // GetRememberMeOffset returns the RememberMeOffset field value if set, zero value otherwise. func (o *UserLoginStage) GetRememberMeOffset() string { - if o == nil || o.RememberMeOffset == nil { + if o == nil || IsNil(o.RememberMeOffset) { var ret string return ret } @@ -311,7 +314,7 @@ func (o *UserLoginStage) GetRememberMeOffset() string { // GetRememberMeOffsetOk returns a tuple with the RememberMeOffset field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UserLoginStage) GetRememberMeOffsetOk() (*string, bool) { - if o == nil || o.RememberMeOffset == nil { + if o == nil || IsNil(o.RememberMeOffset) { return nil, false } return o.RememberMeOffset, true @@ -319,7 +322,7 @@ func (o *UserLoginStage) GetRememberMeOffsetOk() (*string, bool) { // HasRememberMeOffset returns a boolean if a field has been set. func (o *UserLoginStage) HasRememberMeOffset() bool { - if o != nil && o.RememberMeOffset != nil { + if o != nil && !IsNil(o.RememberMeOffset) { return true } @@ -332,38 +335,34 @@ func (o *UserLoginStage) SetRememberMeOffset(v string) { } func (o UserLoginStage) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["component"] = o.Component - } - if true { - toSerialize["verbose_name"] = o.VerboseName - } - if true { - toSerialize["verbose_name_plural"] = o.VerboseNamePlural + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if true { - toSerialize["meta_model_name"] = o.MetaModelName - } - if o.FlowSet != nil { + return json.Marshal(toSerialize) +} + +func (o UserLoginStage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name + // skip: component is readOnly + // skip: verbose_name is readOnly + // skip: verbose_name_plural is readOnly + // skip: meta_model_name is readOnly + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } - if o.SessionDuration != nil { + if !IsNil(o.SessionDuration) { toSerialize["session_duration"] = o.SessionDuration } - if o.TerminateOtherSessions != nil { + if !IsNil(o.TerminateOtherSessions) { toSerialize["terminate_other_sessions"] = o.TerminateOtherSessions } - if o.RememberMeOffset != nil { + if !IsNil(o.RememberMeOffset) { toSerialize["remember_me_offset"] = o.RememberMeOffset } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableUserLoginStage struct { diff --git a/model_user_login_stage_request.go b/model_user_login_stage_request.go index 404fd985d..28f8fa1bf 100644 --- a/model_user_login_stage_request.go +++ b/model_user_login_stage_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the UserLoginStageRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserLoginStageRequest{} + // UserLoginStageRequest UserLoginStage Serializer type UserLoginStageRequest struct { Name string `json:"name"` @@ -71,7 +74,7 @@ func (o *UserLoginStageRequest) SetName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *UserLoginStageRequest) GetFlowSet() []FlowSetRequest { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSetRequest return ret } @@ -81,7 +84,7 @@ func (o *UserLoginStageRequest) GetFlowSet() []FlowSetRequest { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UserLoginStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -89,7 +92,7 @@ func (o *UserLoginStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { // HasFlowSet returns a boolean if a field has been set. func (o *UserLoginStageRequest) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -103,7 +106,7 @@ func (o *UserLoginStageRequest) SetFlowSet(v []FlowSetRequest) { // GetSessionDuration returns the SessionDuration field value if set, zero value otherwise. func (o *UserLoginStageRequest) GetSessionDuration() string { - if o == nil || o.SessionDuration == nil { + if o == nil || IsNil(o.SessionDuration) { var ret string return ret } @@ -113,7 +116,7 @@ func (o *UserLoginStageRequest) GetSessionDuration() string { // GetSessionDurationOk returns a tuple with the SessionDuration field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UserLoginStageRequest) GetSessionDurationOk() (*string, bool) { - if o == nil || o.SessionDuration == nil { + if o == nil || IsNil(o.SessionDuration) { return nil, false } return o.SessionDuration, true @@ -121,7 +124,7 @@ func (o *UserLoginStageRequest) GetSessionDurationOk() (*string, bool) { // HasSessionDuration returns a boolean if a field has been set. func (o *UserLoginStageRequest) HasSessionDuration() bool { - if o != nil && o.SessionDuration != nil { + if o != nil && !IsNil(o.SessionDuration) { return true } @@ -135,7 +138,7 @@ func (o *UserLoginStageRequest) SetSessionDuration(v string) { // GetTerminateOtherSessions returns the TerminateOtherSessions field value if set, zero value otherwise. func (o *UserLoginStageRequest) GetTerminateOtherSessions() bool { - if o == nil || o.TerminateOtherSessions == nil { + if o == nil || IsNil(o.TerminateOtherSessions) { var ret bool return ret } @@ -145,7 +148,7 @@ func (o *UserLoginStageRequest) GetTerminateOtherSessions() bool { // GetTerminateOtherSessionsOk returns a tuple with the TerminateOtherSessions field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UserLoginStageRequest) GetTerminateOtherSessionsOk() (*bool, bool) { - if o == nil || o.TerminateOtherSessions == nil { + if o == nil || IsNil(o.TerminateOtherSessions) { return nil, false } return o.TerminateOtherSessions, true @@ -153,7 +156,7 @@ func (o *UserLoginStageRequest) GetTerminateOtherSessionsOk() (*bool, bool) { // HasTerminateOtherSessions returns a boolean if a field has been set. func (o *UserLoginStageRequest) HasTerminateOtherSessions() bool { - if o != nil && o.TerminateOtherSessions != nil { + if o != nil && !IsNil(o.TerminateOtherSessions) { return true } @@ -167,7 +170,7 @@ func (o *UserLoginStageRequest) SetTerminateOtherSessions(v bool) { // GetRememberMeOffset returns the RememberMeOffset field value if set, zero value otherwise. func (o *UserLoginStageRequest) GetRememberMeOffset() string { - if o == nil || o.RememberMeOffset == nil { + if o == nil || IsNil(o.RememberMeOffset) { var ret string return ret } @@ -177,7 +180,7 @@ func (o *UserLoginStageRequest) GetRememberMeOffset() string { // GetRememberMeOffsetOk returns a tuple with the RememberMeOffset field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UserLoginStageRequest) GetRememberMeOffsetOk() (*string, bool) { - if o == nil || o.RememberMeOffset == nil { + if o == nil || IsNil(o.RememberMeOffset) { return nil, false } return o.RememberMeOffset, true @@ -185,7 +188,7 @@ func (o *UserLoginStageRequest) GetRememberMeOffsetOk() (*string, bool) { // HasRememberMeOffset returns a boolean if a field has been set. func (o *UserLoginStageRequest) HasRememberMeOffset() bool { - if o != nil && o.RememberMeOffset != nil { + if o != nil && !IsNil(o.RememberMeOffset) { return true } @@ -198,23 +201,29 @@ func (o *UserLoginStageRequest) SetRememberMeOffset(v string) { } func (o UserLoginStageRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.FlowSet != nil { + return json.Marshal(toSerialize) +} + +func (o UserLoginStageRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } - if o.SessionDuration != nil { + if !IsNil(o.SessionDuration) { toSerialize["session_duration"] = o.SessionDuration } - if o.TerminateOtherSessions != nil { + if !IsNil(o.TerminateOtherSessions) { toSerialize["terminate_other_sessions"] = o.TerminateOtherSessions } - if o.RememberMeOffset != nil { + if !IsNil(o.RememberMeOffset) { toSerialize["remember_me_offset"] = o.RememberMeOffset } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableUserLoginStageRequest struct { diff --git a/model_user_logout_stage.go b/model_user_logout_stage.go index b67985776..7a0b310a0 100644 --- a/model_user_logout_stage.go +++ b/model_user_logout_stage.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the UserLogoutStage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserLogoutStage{} + // UserLogoutStage UserLogoutStage Serializer type UserLogoutStage struct { Pk string `json:"pk"` @@ -199,7 +202,7 @@ func (o *UserLogoutStage) SetMetaModelName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *UserLogoutStage) GetFlowSet() []FlowSet { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSet return ret } @@ -209,7 +212,7 @@ func (o *UserLogoutStage) GetFlowSet() []FlowSet { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UserLogoutStage) GetFlowSetOk() ([]FlowSet, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -217,7 +220,7 @@ func (o *UserLogoutStage) GetFlowSetOk() ([]FlowSet, bool) { // HasFlowSet returns a boolean if a field has been set. func (o *UserLogoutStage) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -230,29 +233,25 @@ func (o *UserLogoutStage) SetFlowSet(v []FlowSet) { } func (o UserLogoutStage) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["component"] = o.Component - } - if true { - toSerialize["verbose_name"] = o.VerboseName - } - if true { - toSerialize["verbose_name_plural"] = o.VerboseNamePlural + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if true { - toSerialize["meta_model_name"] = o.MetaModelName - } - if o.FlowSet != nil { + return json.Marshal(toSerialize) +} + +func (o UserLogoutStage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name + // skip: component is readOnly + // skip: verbose_name is readOnly + // skip: verbose_name_plural is readOnly + // skip: meta_model_name is readOnly + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableUserLogoutStage struct { diff --git a/model_user_logout_stage_request.go b/model_user_logout_stage_request.go index d655731e1..e0c410426 100644 --- a/model_user_logout_stage_request.go +++ b/model_user_logout_stage_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the UserLogoutStageRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserLogoutStageRequest{} + // UserLogoutStageRequest UserLogoutStage Serializer type UserLogoutStageRequest struct { Name string `json:"name"` @@ -65,7 +68,7 @@ func (o *UserLogoutStageRequest) SetName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *UserLogoutStageRequest) GetFlowSet() []FlowSetRequest { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSetRequest return ret } @@ -75,7 +78,7 @@ func (o *UserLogoutStageRequest) GetFlowSet() []FlowSetRequest { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UserLogoutStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -83,7 +86,7 @@ func (o *UserLogoutStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { // HasFlowSet returns a boolean if a field has been set. func (o *UserLogoutStageRequest) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -96,14 +99,20 @@ func (o *UserLogoutStageRequest) SetFlowSet(v []FlowSetRequest) { } func (o UserLogoutStageRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.FlowSet != nil { + return json.Marshal(toSerialize) +} + +func (o UserLogoutStageRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableUserLogoutStageRequest struct { diff --git a/model_user_metrics.go b/model_user_metrics.go index 4258198fb..3fa7d42ee 100644 --- a/model_user_metrics.go +++ b/model_user_metrics.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the UserMetrics type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserMetrics{} + // UserMetrics User Metrics type UserMetrics struct { Logins []Coordinate `json:"logins"` @@ -115,19 +118,21 @@ func (o *UserMetrics) SetAuthorizations(v []Coordinate) { } func (o UserMetrics) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["logins"] = o.Logins - } - if true { - toSerialize["logins_failed"] = o.LoginsFailed - } - if true { - toSerialize["authorizations"] = o.Authorizations + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o UserMetrics) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: logins is readOnly + // skip: logins_failed is readOnly + // skip: authorizations is readOnly + return toSerialize, nil +} + type NullableUserMetrics struct { value *UserMetrics isSet bool diff --git a/model_user_o_auth_source_connection.go b/model_user_o_auth_source_connection.go index 77a206a1a..4e0e2a562 100644 --- a/model_user_o_auth_source_connection.go +++ b/model_user_o_auth_source_connection.go @@ -15,19 +15,22 @@ import ( "encoding/json" ) +// checks if the UserOAuthSourceConnection type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserOAuthSourceConnection{} + // UserOAuthSourceConnection OAuth Source Serializer type UserOAuthSourceConnection struct { - Pk int32 `json:"pk"` - User int32 `json:"user"` - Source PlexSourceConnectionSource `json:"source"` - Identifier string `json:"identifier"` + Pk int32 `json:"pk"` + User int32 `json:"user"` + Source Source `json:"source"` + Identifier string `json:"identifier"` } // NewUserOAuthSourceConnection instantiates a new UserOAuthSourceConnection object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewUserOAuthSourceConnection(pk int32, user int32, source PlexSourceConnectionSource, identifier string) *UserOAuthSourceConnection { +func NewUserOAuthSourceConnection(pk int32, user int32, source Source, identifier string) *UserOAuthSourceConnection { this := UserOAuthSourceConnection{} this.Pk = pk this.User = user @@ -93,9 +96,9 @@ func (o *UserOAuthSourceConnection) SetUser(v int32) { } // GetSource returns the Source field value -func (o *UserOAuthSourceConnection) GetSource() PlexSourceConnectionSource { +func (o *UserOAuthSourceConnection) GetSource() Source { if o == nil { - var ret PlexSourceConnectionSource + var ret Source return ret } @@ -104,7 +107,7 @@ func (o *UserOAuthSourceConnection) GetSource() PlexSourceConnectionSource { // GetSourceOk returns a tuple with the Source field value // and a boolean to check if the value has been set. -func (o *UserOAuthSourceConnection) GetSourceOk() (*PlexSourceConnectionSource, bool) { +func (o *UserOAuthSourceConnection) GetSourceOk() (*Source, bool) { if o == nil { return nil, false } @@ -112,7 +115,7 @@ func (o *UserOAuthSourceConnection) GetSourceOk() (*PlexSourceConnectionSource, } // SetSource sets field value -func (o *UserOAuthSourceConnection) SetSource(v PlexSourceConnectionSource) { +func (o *UserOAuthSourceConnection) SetSource(v Source) { o.Source = v } @@ -141,22 +144,22 @@ func (o *UserOAuthSourceConnection) SetIdentifier(v string) { } func (o UserOAuthSourceConnection) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["user"] = o.User - } - if true { - toSerialize["source"] = o.Source - } - if true { - toSerialize["identifier"] = o.Identifier + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o UserOAuthSourceConnection) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["user"] = o.User + // skip: source is readOnly + toSerialize["identifier"] = o.Identifier + return toSerialize, nil +} + type NullableUserOAuthSourceConnection struct { value *UserOAuthSourceConnection isSet bool diff --git a/model_user_o_auth_source_connection_request.go b/model_user_o_auth_source_connection_request.go index 5a6df3733..2165774d5 100644 --- a/model_user_o_auth_source_connection_request.go +++ b/model_user_o_auth_source_connection_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the UserOAuthSourceConnectionRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserOAuthSourceConnectionRequest{} + // UserOAuthSourceConnectionRequest OAuth Source Serializer type UserOAuthSourceConnectionRequest struct { User int32 `json:"user"` @@ -91,7 +94,7 @@ func (o *UserOAuthSourceConnectionRequest) SetIdentifier(v string) { // GetAccessToken returns the AccessToken field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UserOAuthSourceConnectionRequest) GetAccessToken() string { - if o == nil || o.AccessToken.Get() == nil { + if o == nil || IsNil(o.AccessToken.Get()) { var ret string return ret } @@ -133,17 +136,21 @@ func (o *UserOAuthSourceConnectionRequest) UnsetAccessToken() { } func (o UserOAuthSourceConnectionRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["user"] = o.User - } - if true { - toSerialize["identifier"] = o.Identifier + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } + return json.Marshal(toSerialize) +} + +func (o UserOAuthSourceConnectionRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["user"] = o.User + toSerialize["identifier"] = o.Identifier if o.AccessToken.IsSet() { toSerialize["access_token"] = o.AccessToken.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableUserOAuthSourceConnectionRequest struct { diff --git a/model_user_password_set_request.go b/model_user_password_set_request.go index 56d4b6059..327c23f47 100644 --- a/model_user_password_set_request.go +++ b/model_user_password_set_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the UserPasswordSetRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserPasswordSetRequest{} + // UserPasswordSetRequest struct for UserPasswordSetRequest type UserPasswordSetRequest struct { Password string `json:"password"` @@ -63,13 +66,19 @@ func (o *UserPasswordSetRequest) SetPassword(v string) { } func (o UserPasswordSetRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["password"] = o.Password + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o UserPasswordSetRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["password"] = o.Password + return toSerialize, nil +} + type NullableUserPasswordSetRequest struct { value *UserPasswordSetRequest isSet bool diff --git a/model_user_path.go b/model_user_path.go index acf799b22..a0ea515ce 100644 --- a/model_user_path.go +++ b/model_user_path.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the UserPath type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserPath{} + // UserPath struct for UserPath type UserPath struct { Paths []string `json:"paths"` @@ -63,13 +66,19 @@ func (o *UserPath) SetPaths(v []string) { } func (o UserPath) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["paths"] = o.Paths + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o UserPath) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: paths is readOnly + return toSerialize, nil +} + type NullableUserPath struct { value *UserPath isSet bool diff --git a/model_user_request.go b/model_user_request.go index 00e5c8871..bc33b990c 100644 --- a/model_user_request.go +++ b/model_user_request.go @@ -16,6 +16,9 @@ import ( "time" ) +// checks if the UserRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserRequest{} + // UserRequest User Serializer type UserRequest struct { Username string `json:"username"` @@ -100,7 +103,7 @@ func (o *UserRequest) SetName(v string) { // GetIsActive returns the IsActive field value if set, zero value otherwise. func (o *UserRequest) GetIsActive() bool { - if o == nil || o.IsActive == nil { + if o == nil || IsNil(o.IsActive) { var ret bool return ret } @@ -110,7 +113,7 @@ func (o *UserRequest) GetIsActive() bool { // GetIsActiveOk returns a tuple with the IsActive field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UserRequest) GetIsActiveOk() (*bool, bool) { - if o == nil || o.IsActive == nil { + if o == nil || IsNil(o.IsActive) { return nil, false } return o.IsActive, true @@ -118,7 +121,7 @@ func (o *UserRequest) GetIsActiveOk() (*bool, bool) { // HasIsActive returns a boolean if a field has been set. func (o *UserRequest) HasIsActive() bool { - if o != nil && o.IsActive != nil { + if o != nil && !IsNil(o.IsActive) { return true } @@ -132,7 +135,7 @@ func (o *UserRequest) SetIsActive(v bool) { // GetLastLogin returns the LastLogin field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UserRequest) GetLastLogin() time.Time { - if o == nil || o.LastLogin.Get() == nil { + if o == nil || IsNil(o.LastLogin.Get()) { var ret time.Time return ret } @@ -199,7 +202,7 @@ func (o *UserRequest) SetGroups(v []string) { // GetEmail returns the Email field value if set, zero value otherwise. func (o *UserRequest) GetEmail() string { - if o == nil || o.Email == nil { + if o == nil || IsNil(o.Email) { var ret string return ret } @@ -209,7 +212,7 @@ func (o *UserRequest) GetEmail() string { // GetEmailOk returns a tuple with the Email field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UserRequest) GetEmailOk() (*string, bool) { - if o == nil || o.Email == nil { + if o == nil || IsNil(o.Email) { return nil, false } return o.Email, true @@ -217,7 +220,7 @@ func (o *UserRequest) GetEmailOk() (*string, bool) { // HasEmail returns a boolean if a field has been set. func (o *UserRequest) HasEmail() bool { - if o != nil && o.Email != nil { + if o != nil && !IsNil(o.Email) { return true } @@ -231,7 +234,7 @@ func (o *UserRequest) SetEmail(v string) { // GetAttributes returns the Attributes field value if set, zero value otherwise. func (o *UserRequest) GetAttributes() map[string]interface{} { - if o == nil || o.Attributes == nil { + if o == nil || IsNil(o.Attributes) { var ret map[string]interface{} return ret } @@ -241,15 +244,15 @@ func (o *UserRequest) GetAttributes() map[string]interface{} { // GetAttributesOk returns a tuple with the Attributes field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UserRequest) GetAttributesOk() (map[string]interface{}, bool) { - if o == nil || o.Attributes == nil { - return nil, false + if o == nil || IsNil(o.Attributes) { + return map[string]interface{}{}, false } return o.Attributes, true } // HasAttributes returns a boolean if a field has been set. func (o *UserRequest) HasAttributes() bool { - if o != nil && o.Attributes != nil { + if o != nil && !IsNil(o.Attributes) { return true } @@ -263,7 +266,7 @@ func (o *UserRequest) SetAttributes(v map[string]interface{}) { // GetPath returns the Path field value if set, zero value otherwise. func (o *UserRequest) GetPath() string { - if o == nil || o.Path == nil { + if o == nil || IsNil(o.Path) { var ret string return ret } @@ -273,7 +276,7 @@ func (o *UserRequest) GetPath() string { // GetPathOk returns a tuple with the Path field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UserRequest) GetPathOk() (*string, bool) { - if o == nil || o.Path == nil { + if o == nil || IsNil(o.Path) { return nil, false } return o.Path, true @@ -281,7 +284,7 @@ func (o *UserRequest) GetPathOk() (*string, bool) { // HasPath returns a boolean if a field has been set. func (o *UserRequest) HasPath() bool { - if o != nil && o.Path != nil { + if o != nil && !IsNil(o.Path) { return true } @@ -294,32 +297,34 @@ func (o *UserRequest) SetPath(v string) { } func (o UserRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["username"] = o.Username + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if true { - toSerialize["name"] = o.Name - } - if o.IsActive != nil { + return json.Marshal(toSerialize) +} + +func (o UserRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["username"] = o.Username + toSerialize["name"] = o.Name + if !IsNil(o.IsActive) { toSerialize["is_active"] = o.IsActive } if o.LastLogin.IsSet() { toSerialize["last_login"] = o.LastLogin.Get() } - if true { - toSerialize["groups"] = o.Groups - } - if o.Email != nil { + toSerialize["groups"] = o.Groups + if !IsNil(o.Email) { toSerialize["email"] = o.Email } - if o.Attributes != nil { + if !IsNil(o.Attributes) { toSerialize["attributes"] = o.Attributes } - if o.Path != nil { + if !IsNil(o.Path) { toSerialize["path"] = o.Path } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableUserRequest struct { diff --git a/model_user_saml_source_connection.go b/model_user_saml_source_connection.go index f7c357716..558b19f38 100644 --- a/model_user_saml_source_connection.go +++ b/model_user_saml_source_connection.go @@ -15,19 +15,22 @@ import ( "encoding/json" ) +// checks if the UserSAMLSourceConnection type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserSAMLSourceConnection{} + // UserSAMLSourceConnection SAML Source Serializer type UserSAMLSourceConnection struct { - Pk int32 `json:"pk"` - User int32 `json:"user"` - Source PlexSourceConnectionSource `json:"source"` - Identifier string `json:"identifier"` + Pk int32 `json:"pk"` + User int32 `json:"user"` + Source Source `json:"source"` + Identifier string `json:"identifier"` } // NewUserSAMLSourceConnection instantiates a new UserSAMLSourceConnection object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewUserSAMLSourceConnection(pk int32, user int32, source PlexSourceConnectionSource, identifier string) *UserSAMLSourceConnection { +func NewUserSAMLSourceConnection(pk int32, user int32, source Source, identifier string) *UserSAMLSourceConnection { this := UserSAMLSourceConnection{} this.Pk = pk this.User = user @@ -93,9 +96,9 @@ func (o *UserSAMLSourceConnection) SetUser(v int32) { } // GetSource returns the Source field value -func (o *UserSAMLSourceConnection) GetSource() PlexSourceConnectionSource { +func (o *UserSAMLSourceConnection) GetSource() Source { if o == nil { - var ret PlexSourceConnectionSource + var ret Source return ret } @@ -104,7 +107,7 @@ func (o *UserSAMLSourceConnection) GetSource() PlexSourceConnectionSource { // GetSourceOk returns a tuple with the Source field value // and a boolean to check if the value has been set. -func (o *UserSAMLSourceConnection) GetSourceOk() (*PlexSourceConnectionSource, bool) { +func (o *UserSAMLSourceConnection) GetSourceOk() (*Source, bool) { if o == nil { return nil, false } @@ -112,7 +115,7 @@ func (o *UserSAMLSourceConnection) GetSourceOk() (*PlexSourceConnectionSource, b } // SetSource sets field value -func (o *UserSAMLSourceConnection) SetSource(v PlexSourceConnectionSource) { +func (o *UserSAMLSourceConnection) SetSource(v Source) { o.Source = v } @@ -141,22 +144,22 @@ func (o *UserSAMLSourceConnection) SetIdentifier(v string) { } func (o UserSAMLSourceConnection) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["user"] = o.User - } - if true { - toSerialize["source"] = o.Source - } - if true { - toSerialize["identifier"] = o.Identifier + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o UserSAMLSourceConnection) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["user"] = o.User + // skip: source is readOnly + toSerialize["identifier"] = o.Identifier + return toSerialize, nil +} + type NullableUserSAMLSourceConnection struct { value *UserSAMLSourceConnection isSet bool diff --git a/model_user_saml_source_connection_request.go b/model_user_saml_source_connection_request.go index 3d4b2cfa8..82a4a18fb 100644 --- a/model_user_saml_source_connection_request.go +++ b/model_user_saml_source_connection_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the UserSAMLSourceConnectionRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserSAMLSourceConnectionRequest{} + // UserSAMLSourceConnectionRequest SAML Source Serializer type UserSAMLSourceConnectionRequest struct { User int32 `json:"user"` @@ -89,16 +92,20 @@ func (o *UserSAMLSourceConnectionRequest) SetIdentifier(v string) { } func (o UserSAMLSourceConnectionRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["user"] = o.User - } - if true { - toSerialize["identifier"] = o.Identifier + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o UserSAMLSourceConnectionRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["user"] = o.User + toSerialize["identifier"] = o.Identifier + return toSerialize, nil +} + type NullableUserSAMLSourceConnectionRequest struct { value *UserSAMLSourceConnectionRequest isSet bool diff --git a/model_user_self.go b/model_user_self.go index a965cd7a9..0ecd8052d 100644 --- a/model_user_self.go +++ b/model_user_self.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the UserSelf type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserSelf{} + // UserSelf User Serializer for information a user can retrieve about themselves type UserSelf struct { Pk int32 `json:"pk"` @@ -205,7 +208,7 @@ func (o *UserSelf) SetGroups(v []UserSelfGroups) { // GetEmail returns the Email field value if set, zero value otherwise. func (o *UserSelf) GetEmail() string { - if o == nil || o.Email == nil { + if o == nil || IsNil(o.Email) { var ret string return ret } @@ -215,7 +218,7 @@ func (o *UserSelf) GetEmail() string { // GetEmailOk returns a tuple with the Email field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UserSelf) GetEmailOk() (*string, bool) { - if o == nil || o.Email == nil { + if o == nil || IsNil(o.Email) { return nil, false } return o.Email, true @@ -223,7 +226,7 @@ func (o *UserSelf) GetEmailOk() (*string, bool) { // HasEmail returns a boolean if a field has been set. func (o *UserSelf) HasEmail() bool { - if o != nil && o.Email != nil { + if o != nil && !IsNil(o.Email) { return true } @@ -297,7 +300,7 @@ func (o *UserSelf) GetSettings() map[string]interface{} { // and a boolean to check if the value has been set. func (o *UserSelf) GetSettingsOk() (map[string]interface{}, bool) { if o == nil { - return nil, false + return map[string]interface{}{}, false } return o.Settings, true } @@ -308,38 +311,28 @@ func (o *UserSelf) SetSettings(v map[string]interface{}) { } func (o UserSelf) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["username"] = o.Username - } - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["is_active"] = o.IsActive - } - if true { - toSerialize["is_superuser"] = o.IsSuperuser - } - if true { - toSerialize["groups"] = o.Groups + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.Email != nil { + return json.Marshal(toSerialize) +} + +func (o UserSelf) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["username"] = o.Username + toSerialize["name"] = o.Name + // skip: is_active is readOnly + // skip: is_superuser is readOnly + // skip: groups is readOnly + if !IsNil(o.Email) { toSerialize["email"] = o.Email } - if true { - toSerialize["avatar"] = o.Avatar - } - if true { - toSerialize["uid"] = o.Uid - } - if true { - toSerialize["settings"] = o.Settings - } - return json.Marshal(toSerialize) + // skip: avatar is readOnly + // skip: uid is readOnly + // skip: settings is readOnly + return toSerialize, nil } type NullableUserSelf struct { diff --git a/model_user_self_groups.go b/model_user_self_groups.go index e95893a3d..3d213eed5 100644 --- a/model_user_self_groups.go +++ b/model_user_self_groups.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the UserSelfGroups type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserSelfGroups{} + // UserSelfGroups struct for UserSelfGroups type UserSelfGroups struct { Name string `json:"name"` @@ -89,16 +92,20 @@ func (o *UserSelfGroups) SetPk(v string) { } func (o UserSelfGroups) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["pk"] = o.Pk + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o UserSelfGroups) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: name is readOnly + // skip: pk is readOnly + return toSerialize, nil +} + type NullableUserSelfGroups struct { value *UserSelfGroups isSet bool diff --git a/model_user_service_account_request.go b/model_user_service_account_request.go index 7e05c9bd3..1cd6fc0e1 100644 --- a/model_user_service_account_request.go +++ b/model_user_service_account_request.go @@ -16,6 +16,9 @@ import ( "time" ) +// checks if the UserServiceAccountRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserServiceAccountRequest{} + // UserServiceAccountRequest struct for UserServiceAccountRequest type UserServiceAccountRequest struct { Name string `json:"name"` @@ -77,7 +80,7 @@ func (o *UserServiceAccountRequest) SetName(v string) { // GetCreateGroup returns the CreateGroup field value if set, zero value otherwise. func (o *UserServiceAccountRequest) GetCreateGroup() bool { - if o == nil || o.CreateGroup == nil { + if o == nil || IsNil(o.CreateGroup) { var ret bool return ret } @@ -87,7 +90,7 @@ func (o *UserServiceAccountRequest) GetCreateGroup() bool { // GetCreateGroupOk returns a tuple with the CreateGroup field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UserServiceAccountRequest) GetCreateGroupOk() (*bool, bool) { - if o == nil || o.CreateGroup == nil { + if o == nil || IsNil(o.CreateGroup) { return nil, false } return o.CreateGroup, true @@ -95,7 +98,7 @@ func (o *UserServiceAccountRequest) GetCreateGroupOk() (*bool, bool) { // HasCreateGroup returns a boolean if a field has been set. func (o *UserServiceAccountRequest) HasCreateGroup() bool { - if o != nil && o.CreateGroup != nil { + if o != nil && !IsNil(o.CreateGroup) { return true } @@ -109,7 +112,7 @@ func (o *UserServiceAccountRequest) SetCreateGroup(v bool) { // GetExpiring returns the Expiring field value if set, zero value otherwise. func (o *UserServiceAccountRequest) GetExpiring() bool { - if o == nil || o.Expiring == nil { + if o == nil || IsNil(o.Expiring) { var ret bool return ret } @@ -119,7 +122,7 @@ func (o *UserServiceAccountRequest) GetExpiring() bool { // GetExpiringOk returns a tuple with the Expiring field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UserServiceAccountRequest) GetExpiringOk() (*bool, bool) { - if o == nil || o.Expiring == nil { + if o == nil || IsNil(o.Expiring) { return nil, false } return o.Expiring, true @@ -127,7 +130,7 @@ func (o *UserServiceAccountRequest) GetExpiringOk() (*bool, bool) { // HasExpiring returns a boolean if a field has been set. func (o *UserServiceAccountRequest) HasExpiring() bool { - if o != nil && o.Expiring != nil { + if o != nil && !IsNil(o.Expiring) { return true } @@ -141,7 +144,7 @@ func (o *UserServiceAccountRequest) SetExpiring(v bool) { // GetExpires returns the Expires field value if set, zero value otherwise. func (o *UserServiceAccountRequest) GetExpires() time.Time { - if o == nil || o.Expires == nil { + if o == nil || IsNil(o.Expires) { var ret time.Time return ret } @@ -151,7 +154,7 @@ func (o *UserServiceAccountRequest) GetExpires() time.Time { // GetExpiresOk returns a tuple with the Expires field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UserServiceAccountRequest) GetExpiresOk() (*time.Time, bool) { - if o == nil || o.Expires == nil { + if o == nil || IsNil(o.Expires) { return nil, false } return o.Expires, true @@ -159,7 +162,7 @@ func (o *UserServiceAccountRequest) GetExpiresOk() (*time.Time, bool) { // HasExpires returns a boolean if a field has been set. func (o *UserServiceAccountRequest) HasExpires() bool { - if o != nil && o.Expires != nil { + if o != nil && !IsNil(o.Expires) { return true } @@ -172,20 +175,26 @@ func (o *UserServiceAccountRequest) SetExpires(v time.Time) { } func (o UserServiceAccountRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.CreateGroup != nil { + return json.Marshal(toSerialize) +} + +func (o UserServiceAccountRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.CreateGroup) { toSerialize["create_group"] = o.CreateGroup } - if o.Expiring != nil { + if !IsNil(o.Expiring) { toSerialize["expiring"] = o.Expiring } - if o.Expires != nil { + if !IsNil(o.Expires) { toSerialize["expires"] = o.Expires } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableUserServiceAccountRequest struct { diff --git a/model_user_service_account_response.go b/model_user_service_account_response.go index 127160e57..afaaa788d 100644 --- a/model_user_service_account_response.go +++ b/model_user_service_account_response.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the UserServiceAccountResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserServiceAccountResponse{} + // UserServiceAccountResponse struct for UserServiceAccountResponse type UserServiceAccountResponse struct { Username string `json:"username"` @@ -143,7 +146,7 @@ func (o *UserServiceAccountResponse) SetUserPk(v int32) { // GetGroupPk returns the GroupPk field value if set, zero value otherwise. func (o *UserServiceAccountResponse) GetGroupPk() string { - if o == nil || o.GroupPk == nil { + if o == nil || IsNil(o.GroupPk) { var ret string return ret } @@ -153,7 +156,7 @@ func (o *UserServiceAccountResponse) GetGroupPk() string { // GetGroupPkOk returns a tuple with the GroupPk field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UserServiceAccountResponse) GetGroupPkOk() (*string, bool) { - if o == nil || o.GroupPk == nil { + if o == nil || IsNil(o.GroupPk) { return nil, false } return o.GroupPk, true @@ -161,7 +164,7 @@ func (o *UserServiceAccountResponse) GetGroupPkOk() (*string, bool) { // HasGroupPk returns a boolean if a field has been set. func (o *UserServiceAccountResponse) HasGroupPk() bool { - if o != nil && o.GroupPk != nil { + if o != nil && !IsNil(o.GroupPk) { return true } @@ -174,23 +177,23 @@ func (o *UserServiceAccountResponse) SetGroupPk(v string) { } func (o UserServiceAccountResponse) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["username"] = o.Username - } - if true { - toSerialize["token"] = o.Token - } - if true { - toSerialize["user_uid"] = o.UserUid - } - if true { - toSerialize["user_pk"] = o.UserPk + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.GroupPk != nil { + return json.Marshal(toSerialize) +} + +func (o UserServiceAccountResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["username"] = o.Username + toSerialize["token"] = o.Token + toSerialize["user_uid"] = o.UserUid + toSerialize["user_pk"] = o.UserPk + if !IsNil(o.GroupPk) { toSerialize["group_pk"] = o.GroupPk } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableUserServiceAccountResponse struct { diff --git a/model_user_setting.go b/model_user_setting.go index dda31fb4f..648118202 100644 --- a/model_user_setting.go +++ b/model_user_setting.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the UserSetting type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserSetting{} + // UserSetting Serializer for User settings for stages and sources type UserSetting struct { ObjectUid string `json:"object_uid"` @@ -118,7 +121,7 @@ func (o *UserSetting) SetTitle(v string) { // GetConfigureUrl returns the ConfigureUrl field value if set, zero value otherwise. func (o *UserSetting) GetConfigureUrl() string { - if o == nil || o.ConfigureUrl == nil { + if o == nil || IsNil(o.ConfigureUrl) { var ret string return ret } @@ -128,7 +131,7 @@ func (o *UserSetting) GetConfigureUrl() string { // GetConfigureUrlOk returns a tuple with the ConfigureUrl field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UserSetting) GetConfigureUrlOk() (*string, bool) { - if o == nil || o.ConfigureUrl == nil { + if o == nil || IsNil(o.ConfigureUrl) { return nil, false } return o.ConfigureUrl, true @@ -136,7 +139,7 @@ func (o *UserSetting) GetConfigureUrlOk() (*string, bool) { // HasConfigureUrl returns a boolean if a field has been set. func (o *UserSetting) HasConfigureUrl() bool { - if o != nil && o.ConfigureUrl != nil { + if o != nil && !IsNil(o.ConfigureUrl) { return true } @@ -150,7 +153,7 @@ func (o *UserSetting) SetConfigureUrl(v string) { // GetIconUrl returns the IconUrl field value if set, zero value otherwise. func (o *UserSetting) GetIconUrl() string { - if o == nil || o.IconUrl == nil { + if o == nil || IsNil(o.IconUrl) { var ret string return ret } @@ -160,7 +163,7 @@ func (o *UserSetting) GetIconUrl() string { // GetIconUrlOk returns a tuple with the IconUrl field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UserSetting) GetIconUrlOk() (*string, bool) { - if o == nil || o.IconUrl == nil { + if o == nil || IsNil(o.IconUrl) { return nil, false } return o.IconUrl, true @@ -168,7 +171,7 @@ func (o *UserSetting) GetIconUrlOk() (*string, bool) { // HasIconUrl returns a boolean if a field has been set. func (o *UserSetting) HasIconUrl() bool { - if o != nil && o.IconUrl != nil { + if o != nil && !IsNil(o.IconUrl) { return true } @@ -181,23 +184,25 @@ func (o *UserSetting) SetIconUrl(v string) { } func (o UserSetting) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["object_uid"] = o.ObjectUid - } - if true { - toSerialize["component"] = o.Component + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if true { - toSerialize["title"] = o.Title - } - if o.ConfigureUrl != nil { + return json.Marshal(toSerialize) +} + +func (o UserSetting) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["object_uid"] = o.ObjectUid + toSerialize["component"] = o.Component + toSerialize["title"] = o.Title + if !IsNil(o.ConfigureUrl) { toSerialize["configure_url"] = o.ConfigureUrl } - if o.IconUrl != nil { + if !IsNil(o.IconUrl) { toSerialize["icon_url"] = o.IconUrl } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableUserSetting struct { diff --git a/model_user_source_connection.go b/model_user_source_connection.go index 869a87b01..32f78e70c 100644 --- a/model_user_source_connection.go +++ b/model_user_source_connection.go @@ -16,19 +16,22 @@ import ( "time" ) +// checks if the UserSourceConnection type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserSourceConnection{} + // UserSourceConnection OAuth Source Serializer type UserSourceConnection struct { - Pk int32 `json:"pk"` - User int32 `json:"user"` - Source PlexSourceConnectionSource `json:"source"` - Created time.Time `json:"created"` + Pk int32 `json:"pk"` + User int32 `json:"user"` + Source Source `json:"source"` + Created time.Time `json:"created"` } // NewUserSourceConnection instantiates a new UserSourceConnection object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewUserSourceConnection(pk int32, user int32, source PlexSourceConnectionSource, created time.Time) *UserSourceConnection { +func NewUserSourceConnection(pk int32, user int32, source Source, created time.Time) *UserSourceConnection { this := UserSourceConnection{} this.Pk = pk this.User = user @@ -94,9 +97,9 @@ func (o *UserSourceConnection) SetUser(v int32) { } // GetSource returns the Source field value -func (o *UserSourceConnection) GetSource() PlexSourceConnectionSource { +func (o *UserSourceConnection) GetSource() Source { if o == nil { - var ret PlexSourceConnectionSource + var ret Source return ret } @@ -105,7 +108,7 @@ func (o *UserSourceConnection) GetSource() PlexSourceConnectionSource { // GetSourceOk returns a tuple with the Source field value // and a boolean to check if the value has been set. -func (o *UserSourceConnection) GetSourceOk() (*PlexSourceConnectionSource, bool) { +func (o *UserSourceConnection) GetSourceOk() (*Source, bool) { if o == nil { return nil, false } @@ -113,7 +116,7 @@ func (o *UserSourceConnection) GetSourceOk() (*PlexSourceConnectionSource, bool) } // SetSource sets field value -func (o *UserSourceConnection) SetSource(v PlexSourceConnectionSource) { +func (o *UserSourceConnection) SetSource(v Source) { o.Source = v } @@ -142,22 +145,22 @@ func (o *UserSourceConnection) SetCreated(v time.Time) { } func (o UserSourceConnection) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["user"] = o.User - } - if true { - toSerialize["source"] = o.Source - } - if true { - toSerialize["created"] = o.Created + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o UserSourceConnection) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + // skip: user is readOnly + // skip: source is readOnly + // skip: created is readOnly + return toSerialize, nil +} + type NullableUserSourceConnection struct { value *UserSourceConnection isSet bool diff --git a/model_user_write_stage.go b/model_user_write_stage.go index 74c05bfae..010f79587 100644 --- a/model_user_write_stage.go +++ b/model_user_write_stage.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the UserWriteStage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserWriteStage{} + // UserWriteStage UserWriteStage Serializer type UserWriteStage struct { Pk string `json:"pk"` @@ -205,7 +208,7 @@ func (o *UserWriteStage) SetMetaModelName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *UserWriteStage) GetFlowSet() []FlowSet { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSet return ret } @@ -215,7 +218,7 @@ func (o *UserWriteStage) GetFlowSet() []FlowSet { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UserWriteStage) GetFlowSetOk() ([]FlowSet, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -223,7 +226,7 @@ func (o *UserWriteStage) GetFlowSetOk() ([]FlowSet, bool) { // HasFlowSet returns a boolean if a field has been set. func (o *UserWriteStage) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -237,7 +240,7 @@ func (o *UserWriteStage) SetFlowSet(v []FlowSet) { // GetUserCreationMode returns the UserCreationMode field value if set, zero value otherwise. func (o *UserWriteStage) GetUserCreationMode() UserCreationModeEnum { - if o == nil || o.UserCreationMode == nil { + if o == nil || IsNil(o.UserCreationMode) { var ret UserCreationModeEnum return ret } @@ -247,7 +250,7 @@ func (o *UserWriteStage) GetUserCreationMode() UserCreationModeEnum { // GetUserCreationModeOk returns a tuple with the UserCreationMode field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UserWriteStage) GetUserCreationModeOk() (*UserCreationModeEnum, bool) { - if o == nil || o.UserCreationMode == nil { + if o == nil || IsNil(o.UserCreationMode) { return nil, false } return o.UserCreationMode, true @@ -255,7 +258,7 @@ func (o *UserWriteStage) GetUserCreationModeOk() (*UserCreationModeEnum, bool) { // HasUserCreationMode returns a boolean if a field has been set. func (o *UserWriteStage) HasUserCreationMode() bool { - if o != nil && o.UserCreationMode != nil { + if o != nil && !IsNil(o.UserCreationMode) { return true } @@ -269,7 +272,7 @@ func (o *UserWriteStage) SetUserCreationMode(v UserCreationModeEnum) { // GetCreateUsersAsInactive returns the CreateUsersAsInactive field value if set, zero value otherwise. func (o *UserWriteStage) GetCreateUsersAsInactive() bool { - if o == nil || o.CreateUsersAsInactive == nil { + if o == nil || IsNil(o.CreateUsersAsInactive) { var ret bool return ret } @@ -279,7 +282,7 @@ func (o *UserWriteStage) GetCreateUsersAsInactive() bool { // GetCreateUsersAsInactiveOk returns a tuple with the CreateUsersAsInactive field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UserWriteStage) GetCreateUsersAsInactiveOk() (*bool, bool) { - if o == nil || o.CreateUsersAsInactive == nil { + if o == nil || IsNil(o.CreateUsersAsInactive) { return nil, false } return o.CreateUsersAsInactive, true @@ -287,7 +290,7 @@ func (o *UserWriteStage) GetCreateUsersAsInactiveOk() (*bool, bool) { // HasCreateUsersAsInactive returns a boolean if a field has been set. func (o *UserWriteStage) HasCreateUsersAsInactive() bool { - if o != nil && o.CreateUsersAsInactive != nil { + if o != nil && !IsNil(o.CreateUsersAsInactive) { return true } @@ -301,7 +304,7 @@ func (o *UserWriteStage) SetCreateUsersAsInactive(v bool) { // GetCreateUsersGroup returns the CreateUsersGroup field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UserWriteStage) GetCreateUsersGroup() string { - if o == nil || o.CreateUsersGroup.Get() == nil { + if o == nil || IsNil(o.CreateUsersGroup.Get()) { var ret string return ret } @@ -344,7 +347,7 @@ func (o *UserWriteStage) UnsetCreateUsersGroup() { // GetUserPathTemplate returns the UserPathTemplate field value if set, zero value otherwise. func (o *UserWriteStage) GetUserPathTemplate() string { - if o == nil || o.UserPathTemplate == nil { + if o == nil || IsNil(o.UserPathTemplate) { var ret string return ret } @@ -354,7 +357,7 @@ func (o *UserWriteStage) GetUserPathTemplate() string { // GetUserPathTemplateOk returns a tuple with the UserPathTemplate field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UserWriteStage) GetUserPathTemplateOk() (*string, bool) { - if o == nil || o.UserPathTemplate == nil { + if o == nil || IsNil(o.UserPathTemplate) { return nil, false } return o.UserPathTemplate, true @@ -362,7 +365,7 @@ func (o *UserWriteStage) GetUserPathTemplateOk() (*string, bool) { // HasUserPathTemplate returns a boolean if a field has been set. func (o *UserWriteStage) HasUserPathTemplate() bool { - if o != nil && o.UserPathTemplate != nil { + if o != nil && !IsNil(o.UserPathTemplate) { return true } @@ -375,41 +378,37 @@ func (o *UserWriteStage) SetUserPathTemplate(v string) { } func (o UserWriteStage) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["component"] = o.Component - } - if true { - toSerialize["verbose_name"] = o.VerboseName - } - if true { - toSerialize["verbose_name_plural"] = o.VerboseNamePlural + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if true { - toSerialize["meta_model_name"] = o.MetaModelName - } - if o.FlowSet != nil { + return json.Marshal(toSerialize) +} + +func (o UserWriteStage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name + // skip: component is readOnly + // skip: verbose_name is readOnly + // skip: verbose_name_plural is readOnly + // skip: meta_model_name is readOnly + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } - if o.UserCreationMode != nil { + if !IsNil(o.UserCreationMode) { toSerialize["user_creation_mode"] = o.UserCreationMode } - if o.CreateUsersAsInactive != nil { + if !IsNil(o.CreateUsersAsInactive) { toSerialize["create_users_as_inactive"] = o.CreateUsersAsInactive } if o.CreateUsersGroup.IsSet() { toSerialize["create_users_group"] = o.CreateUsersGroup.Get() } - if o.UserPathTemplate != nil { + if !IsNil(o.UserPathTemplate) { toSerialize["user_path_template"] = o.UserPathTemplate } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableUserWriteStage struct { diff --git a/model_user_write_stage_request.go b/model_user_write_stage_request.go index 50c456fdc..3a63525cb 100644 --- a/model_user_write_stage_request.go +++ b/model_user_write_stage_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the UserWriteStageRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserWriteStageRequest{} + // UserWriteStageRequest UserWriteStage Serializer type UserWriteStageRequest struct { Name string `json:"name"` @@ -71,7 +74,7 @@ func (o *UserWriteStageRequest) SetName(v string) { // GetFlowSet returns the FlowSet field value if set, zero value otherwise. func (o *UserWriteStageRequest) GetFlowSet() []FlowSetRequest { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { var ret []FlowSetRequest return ret } @@ -81,7 +84,7 @@ func (o *UserWriteStageRequest) GetFlowSet() []FlowSetRequest { // GetFlowSetOk returns a tuple with the FlowSet field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UserWriteStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { - if o == nil || o.FlowSet == nil { + if o == nil || IsNil(o.FlowSet) { return nil, false } return o.FlowSet, true @@ -89,7 +92,7 @@ func (o *UserWriteStageRequest) GetFlowSetOk() ([]FlowSetRequest, bool) { // HasFlowSet returns a boolean if a field has been set. func (o *UserWriteStageRequest) HasFlowSet() bool { - if o != nil && o.FlowSet != nil { + if o != nil && !IsNil(o.FlowSet) { return true } @@ -103,7 +106,7 @@ func (o *UserWriteStageRequest) SetFlowSet(v []FlowSetRequest) { // GetUserCreationMode returns the UserCreationMode field value if set, zero value otherwise. func (o *UserWriteStageRequest) GetUserCreationMode() UserCreationModeEnum { - if o == nil || o.UserCreationMode == nil { + if o == nil || IsNil(o.UserCreationMode) { var ret UserCreationModeEnum return ret } @@ -113,7 +116,7 @@ func (o *UserWriteStageRequest) GetUserCreationMode() UserCreationModeEnum { // GetUserCreationModeOk returns a tuple with the UserCreationMode field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UserWriteStageRequest) GetUserCreationModeOk() (*UserCreationModeEnum, bool) { - if o == nil || o.UserCreationMode == nil { + if o == nil || IsNil(o.UserCreationMode) { return nil, false } return o.UserCreationMode, true @@ -121,7 +124,7 @@ func (o *UserWriteStageRequest) GetUserCreationModeOk() (*UserCreationModeEnum, // HasUserCreationMode returns a boolean if a field has been set. func (o *UserWriteStageRequest) HasUserCreationMode() bool { - if o != nil && o.UserCreationMode != nil { + if o != nil && !IsNil(o.UserCreationMode) { return true } @@ -135,7 +138,7 @@ func (o *UserWriteStageRequest) SetUserCreationMode(v UserCreationModeEnum) { // GetCreateUsersAsInactive returns the CreateUsersAsInactive field value if set, zero value otherwise. func (o *UserWriteStageRequest) GetCreateUsersAsInactive() bool { - if o == nil || o.CreateUsersAsInactive == nil { + if o == nil || IsNil(o.CreateUsersAsInactive) { var ret bool return ret } @@ -145,7 +148,7 @@ func (o *UserWriteStageRequest) GetCreateUsersAsInactive() bool { // GetCreateUsersAsInactiveOk returns a tuple with the CreateUsersAsInactive field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UserWriteStageRequest) GetCreateUsersAsInactiveOk() (*bool, bool) { - if o == nil || o.CreateUsersAsInactive == nil { + if o == nil || IsNil(o.CreateUsersAsInactive) { return nil, false } return o.CreateUsersAsInactive, true @@ -153,7 +156,7 @@ func (o *UserWriteStageRequest) GetCreateUsersAsInactiveOk() (*bool, bool) { // HasCreateUsersAsInactive returns a boolean if a field has been set. func (o *UserWriteStageRequest) HasCreateUsersAsInactive() bool { - if o != nil && o.CreateUsersAsInactive != nil { + if o != nil && !IsNil(o.CreateUsersAsInactive) { return true } @@ -167,7 +170,7 @@ func (o *UserWriteStageRequest) SetCreateUsersAsInactive(v bool) { // GetCreateUsersGroup returns the CreateUsersGroup field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UserWriteStageRequest) GetCreateUsersGroup() string { - if o == nil || o.CreateUsersGroup.Get() == nil { + if o == nil || IsNil(o.CreateUsersGroup.Get()) { var ret string return ret } @@ -210,7 +213,7 @@ func (o *UserWriteStageRequest) UnsetCreateUsersGroup() { // GetUserPathTemplate returns the UserPathTemplate field value if set, zero value otherwise. func (o *UserWriteStageRequest) GetUserPathTemplate() string { - if o == nil || o.UserPathTemplate == nil { + if o == nil || IsNil(o.UserPathTemplate) { var ret string return ret } @@ -220,7 +223,7 @@ func (o *UserWriteStageRequest) GetUserPathTemplate() string { // GetUserPathTemplateOk returns a tuple with the UserPathTemplate field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UserWriteStageRequest) GetUserPathTemplateOk() (*string, bool) { - if o == nil || o.UserPathTemplate == nil { + if o == nil || IsNil(o.UserPathTemplate) { return nil, false } return o.UserPathTemplate, true @@ -228,7 +231,7 @@ func (o *UserWriteStageRequest) GetUserPathTemplateOk() (*string, bool) { // HasUserPathTemplate returns a boolean if a field has been set. func (o *UserWriteStageRequest) HasUserPathTemplate() bool { - if o != nil && o.UserPathTemplate != nil { + if o != nil && !IsNil(o.UserPathTemplate) { return true } @@ -241,26 +244,32 @@ func (o *UserWriteStageRequest) SetUserPathTemplate(v string) { } func (o UserWriteStageRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.FlowSet != nil { + return json.Marshal(toSerialize) +} + +func (o UserWriteStageRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.FlowSet) { toSerialize["flow_set"] = o.FlowSet } - if o.UserCreationMode != nil { + if !IsNil(o.UserCreationMode) { toSerialize["user_creation_mode"] = o.UserCreationMode } - if o.CreateUsersAsInactive != nil { + if !IsNil(o.CreateUsersAsInactive) { toSerialize["create_users_as_inactive"] = o.CreateUsersAsInactive } if o.CreateUsersGroup.IsSet() { toSerialize["create_users_group"] = o.CreateUsersGroup.Get() } - if o.UserPathTemplate != nil { + if !IsNil(o.UserPathTemplate) { toSerialize["user_path_template"] = o.UserPathTemplate } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableUserWriteStageRequest struct { diff --git a/model_validation_error.go b/model_validation_error.go index 2fe0612bd..4009e84a9 100644 --- a/model_validation_error.go +++ b/model_validation_error.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ValidationError type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ValidationError{} + // ValidationError Validation Error type ValidationError struct { NonFieldErrors []string `json:"non_field_errors,omitempty"` @@ -40,7 +43,7 @@ func NewValidationErrorWithDefaults() *ValidationError { // GetNonFieldErrors returns the NonFieldErrors field value if set, zero value otherwise. func (o *ValidationError) GetNonFieldErrors() []string { - if o == nil || o.NonFieldErrors == nil { + if o == nil || IsNil(o.NonFieldErrors) { var ret []string return ret } @@ -50,7 +53,7 @@ func (o *ValidationError) GetNonFieldErrors() []string { // GetNonFieldErrorsOk returns a tuple with the NonFieldErrors field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ValidationError) GetNonFieldErrorsOk() ([]string, bool) { - if o == nil || o.NonFieldErrors == nil { + if o == nil || IsNil(o.NonFieldErrors) { return nil, false } return o.NonFieldErrors, true @@ -58,7 +61,7 @@ func (o *ValidationError) GetNonFieldErrorsOk() ([]string, bool) { // HasNonFieldErrors returns a boolean if a field has been set. func (o *ValidationError) HasNonFieldErrors() bool { - if o != nil && o.NonFieldErrors != nil { + if o != nil && !IsNil(o.NonFieldErrors) { return true } @@ -72,7 +75,7 @@ func (o *ValidationError) SetNonFieldErrors(v []string) { // GetCode returns the Code field value if set, zero value otherwise. func (o *ValidationError) GetCode() string { - if o == nil || o.Code == nil { + if o == nil || IsNil(o.Code) { var ret string return ret } @@ -82,7 +85,7 @@ func (o *ValidationError) GetCode() string { // GetCodeOk returns a tuple with the Code field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ValidationError) GetCodeOk() (*string, bool) { - if o == nil || o.Code == nil { + if o == nil || IsNil(o.Code) { return nil, false } return o.Code, true @@ -90,7 +93,7 @@ func (o *ValidationError) GetCodeOk() (*string, bool) { // HasCode returns a boolean if a field has been set. func (o *ValidationError) HasCode() bool { - if o != nil && o.Code != nil { + if o != nil && !IsNil(o.Code) { return true } @@ -103,14 +106,22 @@ func (o *ValidationError) SetCode(v string) { } func (o ValidationError) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ValidationError) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.NonFieldErrors != nil { + if !IsNil(o.NonFieldErrors) { toSerialize["non_field_errors"] = o.NonFieldErrors } - if o.Code != nil { + if !IsNil(o.Code) { toSerialize["code"] = o.Code } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableValidationError struct { diff --git a/model_version.go b/model_version.go index a9edb3d8b..ff31507e4 100644 --- a/model_version.go +++ b/model_version.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the Version type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Version{} + // Version Get running and latest version. type Version struct { // Get current version @@ -145,22 +148,22 @@ func (o *Version) SetOutdated(v bool) { } func (o Version) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["version_current"] = o.VersionCurrent - } - if true { - toSerialize["version_latest"] = o.VersionLatest - } - if true { - toSerialize["build_hash"] = o.BuildHash - } - if true { - toSerialize["outdated"] = o.Outdated + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o Version) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: version_current is readOnly + // skip: version_latest is readOnly + // skip: build_hash is readOnly + // skip: outdated is readOnly + return toSerialize, nil +} + type NullableVersion struct { value *Version isSet bool diff --git a/model_web_authn_device.go b/model_web_authn_device.go index 20d642fa3..19c1c7ec2 100644 --- a/model_web_authn_device.go +++ b/model_web_authn_device.go @@ -16,6 +16,9 @@ import ( "time" ) +// checks if the WebAuthnDevice type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WebAuthnDevice{} + // WebAuthnDevice Serializer for WebAuthn authenticator devices type WebAuthnDevice struct { Pk int32 `json:"pk"` @@ -116,19 +119,21 @@ func (o *WebAuthnDevice) SetCreatedOn(v time.Time) { } func (o WebAuthnDevice) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["pk"] = o.Pk - } - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["created_on"] = o.CreatedOn + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o WebAuthnDevice) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: pk is readOnly + toSerialize["name"] = o.Name + // skip: created_on is readOnly + return toSerialize, nil +} + type NullableWebAuthnDevice struct { value *WebAuthnDevice isSet bool diff --git a/model_web_authn_device_request.go b/model_web_authn_device_request.go index adaa825bb..322d78748 100644 --- a/model_web_authn_device_request.go +++ b/model_web_authn_device_request.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the WebAuthnDeviceRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WebAuthnDeviceRequest{} + // WebAuthnDeviceRequest Serializer for WebAuthn authenticator devices type WebAuthnDeviceRequest struct { Name string `json:"name"` @@ -63,13 +66,19 @@ func (o *WebAuthnDeviceRequest) SetName(v string) { } func (o WebAuthnDeviceRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o WebAuthnDeviceRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + return toSerialize, nil +} + type NullableWebAuthnDeviceRequest struct { value *WebAuthnDeviceRequest isSet bool diff --git a/model_workers.go b/model_workers.go index fe1329b96..576e8323a 100644 --- a/model_workers.go +++ b/model_workers.go @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the Workers type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Workers{} + // Workers struct for Workers type Workers struct { Count int32 `json:"count"` @@ -63,13 +66,19 @@ func (o *Workers) SetCount(v int32) { } func (o Workers) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["count"] = o.Count + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o Workers) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["count"] = o.Count + return toSerialize, nil +} + type NullableWorkers struct { value *Workers isSet bool diff --git a/utils.go b/utils.go index 075fa9ed1..17fa1ac54 100644 --- a/utils.go +++ b/utils.go @@ -13,6 +13,7 @@ package api import ( "encoding/json" + "reflect" "time" ) @@ -327,3 +328,21 @@ func (v *NullableTime) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + +// IsNil checks if an input is nil +func IsNil(i interface{}) bool { + if i == nil { + return true + } + switch reflect.TypeOf(i).Kind() { + case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: + return reflect.ValueOf(i).IsNil() + case reflect.Array: + return reflect.ValueOf(i).IsZero() + } + return false +} + +type MappedNullable interface { + ToMap() (map[string]interface{}, error) +}